Re: [PATCH 09/11] drm/i915: Add rotation property for sprites

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

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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