Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Show devices where drmModeGetResources raises EOPNOTSUPP#87

Open
ids1024 wants to merge 1 commit intoascent12:masterfrom
ids1024:no-resources
Open

Show devices where drmModeGetResources raises EOPNOTSUPP#87
ids1024 wants to merge 1 commit intoascent12:masterfrom
ids1024:no-resources

Conversation

@ids1024
Copy link
Copy Markdown

@ids1024 ids1024 commented Jul 26, 2022

It seems DRM devices like the Panfrost driver on the RK3399 in the Pinebook Pro raise this error here. (Connectors, etc. are a separate device provided by the rockchip driver). This allows drm_info to provide some useful output instead of skipping the device.

Example:

Node: /dev/dri/card0
├───Driver: panfrost (panfrost DRM) version 1.2.0 (20180908)
│   ├───DRM_CLIENT_CAP_STEREO_3D not supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES not supported
│   ├───DRM_CLIENT_CAP_ATOMIC not supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO not supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS not supported
│   ├───DRM_CAP_DUMB_BUFFER not supported
│   ├───DRM_CAP_VBLANK_HIGH_CRTC not supported
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH not supported
│   ├───DRM_CAP_DUMB_PREFER_SHADOW not supported
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP not supported
│   ├───DRM_CAP_CURSOR_WIDTH not supported
│   ├───DRM_CAP_CURSOR_HEIGHT not supported
│   ├───DRM_CAP_ADDFB2_MODIFIERS not supported
│   ├───DRM_CAP_PAGE_FLIP_TARGET not supported
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT not supported
│   ├───DRM_CAP_SYNCOBJ = 1
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform rockchip,rk3399-mali arm,mali-t860
│   └───Available nodes: primary, render
├───Framebuffer size
│   ├───Width: [0, 0]
│   └───Height: [0, 0]
├───Connectors
├───Encoders
├───CRTCs
└───Planes

It seems DRM devices like the Panfrost driver on the RK3399 in the
Pinebook Pro raise this error here. (Connectors, etc. are a separate
device provided by the `rockchip` driver). This allows `drm_info` to
provide some useful output instead of skipping the device.

Example:
```
Node: /dev/dri/card0
├───Driver: panfrost (panfrost DRM) version 1.2.0 (20180908)
│   ├───DRM_CLIENT_CAP_STEREO_3D not supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES not supported
│   ├───DRM_CLIENT_CAP_ATOMIC not supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO not supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS not supported
│   ├───DRM_CAP_DUMB_BUFFER not supported
│   ├───DRM_CAP_VBLANK_HIGH_CRTC not supported
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH not supported
│   ├───DRM_CAP_DUMB_PREFER_SHADOW not supported
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP not supported
│   ├───DRM_CAP_CURSOR_WIDTH not supported
│   ├───DRM_CAP_CURSOR_HEIGHT not supported
│   ├───DRM_CAP_ADDFB2_MODIFIERS not supported
│   ├───DRM_CAP_PAGE_FLIP_TARGET not supported
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT not supported
│   ├───DRM_CAP_SYNCOBJ = 1
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform rockchip,rk3399-mali arm,mali-t860
│   └───Available nodes: primary, render
├───Framebuffer size
│   ├───Width: [0, 0]
│   └───Height: [0, 0]
├───Connectors
├───Encoders
├───CRTCs
└───Planes
```
@emersion
Copy link
Copy Markdown
Collaborator

emersion commented Aug 1, 2022

By "useful output", do you mean just the render caps?

We should hide any non-relevant info for render-only devices: KMS caps, framebuffer size, KMS objects.

@ids1024
Copy link
Copy Markdown
Author

ids1024 commented Aug 1, 2022

Specifically it shows what driver provides the DRM device, and lists capabilities. It is also (my opinion) confusing for it to just ignore the device entirely rather than showing that this is a render-only device.

We should hide any non-relevant info for render-only devices: KMS caps, framebuffer size, KMS objects.

Yep, that would probably be better. I haven't looked into exactly what needs to be changed here; without the json_object_object_add calls I added, it segfaulted printing the output.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants