Show devices where `drmModeGetResources` raises `EOPNOTSUPP`
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
Merge request reports
Activity
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.