[Intel-gfx] [PATCH 09/11] drm/i915: Add rotation property for sprites

Damien Lespiau damien.lespiau at intel.com
Wed Jun 18 15:09:09 CEST 2014


On Wed, Jun 18, 2014 at 05:24:56PM +0530, Jindal, Sonika wrote:
> >Shouldn't we add a:
> >	
> >		if (val & (BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_180)))
> >			return -EINVAL;
> >
> >To ensure userspace doesn't send garbage in the upper bits so we can
> >reuse them down the road?
> >
> But we are checking if more than one bit is set, we return EINVAL.
> So we only care for one rotation angle being sent from user.
> Shouldn't that suffice?

Nop. If given (1 << 50) we'd still pass the test but with an invalid
(reserved) value.

I didn't spot the generic drm_property_change_is_valid() (Ville's
answer), so it should be handled for us by the DRM core already.

All is fine.

-- 
Damien



More information about the Intel-gfx mailing list