[PATCH] drm/gem: Check for valid formats

Maíra Canal mcanal at igalia.com
Wed Jan 4 01:11:40 UTC 2023


On 1/3/23 19:46, Rob Clark wrote:
> drive-by thought/concern, what are the odds that there is some wayland
> compositor out there that creates an fb for every window surface, even
> if it later decides to composite on the GPU because the display does
> not support the format?  It seems like there is a non-zero chance of
> breaking userspace..
>

As Simon pointed out, drivers like i915 and AMDGPU already reject IOCTLs
with invalid parameters, as you can see on [1] and [2], so this patch
would make the behavior more consistent between the drivers. That said,
I don't believe that this patch would break userspace, as userspace
already needs to handle with the existing drivers.

[1] https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/i915/display/intel_fb.c#n1917
[2] https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c#n1124

Best Regards,
- Maíra Canal
  
> BR,
> -R
> 



More information about the dri-devel mailing list