[Intel-gfx] [PATCH v2 07/15] drm/omap: Use per-plane rotation property

Tomi Valkeinen tomi.valkeinen at ti.com
Thu Oct 6 10:32:20 UTC 2016



On 06/10/16 13:30, Ville Syrjälä wrote:
> On Thu, Oct 06, 2016 at 12:59:17PM +0300, Tomi Valkeinen wrote:
>>
>> On 26/09/16 19:30, ville.syrjala at linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>>
>>> The global mode_config.rotation_property is going away, switch over to
>>> per-plane rotation_property.
>>>
>>> Not sure I got the annoying crtc rotation_property handling right.
>>> Might work, or migth not.
>>>
>>> v2: Drop the BIT()
>>>     Don't create rotation property twice for each primary plane
>>>
>>> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
>>> Cc: Rob Clark <robdclark at gmail.com>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>> ---
>>
>>
>>> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
>>> index 6ddaa5ea4b6b..b272f810989e 100644
>>> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
>>> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
>>> @@ -211,9 +211,16 @@ void omap_plane_install_properties(struct drm_plane *plane,
>>>  	struct omap_drm_private *priv = dev->dev_private;
>>>  
>>>  	if (priv->has_dmm) {
>>> -		struct drm_property *prop = dev->mode_config.rotation_property;
>>> -
>>> -		drm_object_attach_property(obj, prop, DRM_ROTATE_0);
>>> +		if (!plane->rotation_property)
>>> +			drm_plane_create_rotation_property(plane,
>>> +							   DRM_ROTATE_0,
>>> +							   DRM_ROTATE_0 | DRM_ROTATE_90 |
>>> +							   DRM_ROTATE_180 | DRM_ROTATE_270 |
>>> +							   DRM_REFLECT_X | DRM_REFLECT_Y);
>>> +
>>> +		if (plane->rotation_property && obj != &plane->base)
>>> +			drm_object_attach_property(obj, plane->rotation_property,
>>> +						   DRM_ROTATE_0);
>>
>> I think this could use a short comment, as it's not obvious wth is going
>> on here =).
> 
> /* Attach the rotation property also to the crtc object */ ?

Yes, sounds fine to me.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20161006/9d0bd3d7/attachment-0001.sig>


More information about the Intel-gfx mailing list