Re: [PATCH v3] drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2018-09-05 16:31:16)
> Since this is handling user provided bpp and depth, we need to sanity
> check and propagate the EINVAL back rather than assume what the insane
> client intended and fill the logs with DRM_ERROR.
> 
> v2: Check both bpp and depth match the builtin pixel format, and
> introduce a canonical DRM_FORMAT_INVALID to reserve 0 against any future
> fourcc.
> 
> v3: Mark up DRM_FORMAT_C8 as being {bpp:8, depth:8}
> 
> Testcase: igt/kms_addfb_basic/legacy-format
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Michel Dänzer <michel.daenzer@xxxxxxx>
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

Pushed the sanity check. Hopefully we are all happy with
DRM_FORMAT_C8:          {bpp:8,  depth:8}
DRM_FORMAT_XRGB1555:    {bpp:16, depth:15}
DRM_FORMAT_RGB565:      {bpp:16, depth:16}
DRM_FORMAT_RGB888:      {bpp:24, depth:24}
DRM_FORMAT_XRGB8888:    {bpp:32, depth:24}
DRM_FORMAT_XRGB2101010: {bpp:32, depth:30}
DRM_FORMAT_ARGB8888:    {bpp:32, depth:32}

Thanks,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux