[Intel-gfx] [PATCH 01/20] drm: Let userspace check if driver supports modeset

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 9 08:34:10 UTC 2018


Quoting José Roberto de Souza (2018-08-09 01:15:47)
> GPU accelerators usually don't have display block or the display
> driver part can be disabled when building driver(for servers it saves
> some resources) so it is important let userspace check this
> capability too.
> 
> Right now we are checking
> drmModeGetResources()/drm_mode_getresources() for a error to detect
> if display is enabled but it is a hackish way as it can fail for
> other reasons too.

Literally there are no other ways to fail. It reports -EINVAL if
!MODESET and the counts otherwise. No allocations, no pointer chasing.
-Chris


More information about the Intel-gfx mailing list