Re: [PATCH v3 1/3] drm/framebuffer: Check for valid formats

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

 



On Friday, January 13th, 2023 at 17:59, Maíra Canal <mcanal@xxxxxxxxxx> wrote:

> +	/* Verify that the modifier is supported. */
> +	if (r->modifier[0] && drm_drv_uses_atomic_modeset(dev) &&
> +	    !drm_any_plane_has_format(dev, r->pixel_format, r->modifier[0])) {
> +		drm_dbg_kms(dev, "Unsupported pixel format %p4cc / modifier 0x%llx\n",
> +			    &r->pixel_format, r->modifier[0]);
> +		return -EINVAL;
> +	}

User-space indicates whether there is a modifier in the IOCTL data by supplying
the DRM_MODE_FB_MODIFIERS flag. I believe we need to check that flag instead of
r->modifier[0]: the zero modifier is a valid modifier (LINEAR).




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux