[PATCH v2 5/5] drm: omapdrm: Add zpos property

Tomi Valkeinen tomi.valkeinen at ti.com
Tue Apr 25 08:56:20 UTC 2017


On 24/04/17 17:05, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Monday 24 Apr 2017 17:00:52 Laurent Pinchart wrote:
>> On Monday 24 Apr 2017 12:37:24 Tomi Valkeinen wrote:
>>> On 15/04/17 12:16, Laurent Pinchart wrote:
>>>> Create a standard zpos property for every plane as an alias to the
>>>> omapdrm-specific zorder property. Unlike the zorder property that has to
>>>> be instantiated for both planes and CRTCs due to backward compatibility,
>>>> the zpos property is only instantiated for planes. When userspace will
>>>> have switched to the zpos property the zorder property will be removed.
>>>>
>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>>>> ---
>>>>
>>>>  drivers/gpu/drm/omapdrm/omap_plane.c | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c
>>>> b/drivers/gpu/drm/omapdrm/omap_plane.c index 521dd2ea519a..871a89b87e72
>>>> 100644
>>>> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
>>>> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
>>>> @@ -324,6 +324,7 @@ struct drm_plane *omap_plane_init(struct drm_device
>>>> *dev,
>>>>
>>>>  	drm_plane_helper_add(plane, &omap_plane_helper_funcs);
>>>>  	
>>>>  	omap_plane_install_properties(plane, &plane->base);
>>>>
>>>> +	drm_plane_create_zpos_property(plane, 0, 0, 3);
>>>
>>> I think this should use get_num_ovls() to get the max value.
>>
>> That's fine with me, but note that the code currently hardcodes the value to
>> 3 for the zorder property. I can submit an addition patch on top of this to
>> change both if you think it would be better.

Ah, right, we have it already at 3 currently...

> And should it be get_num_ovls() - 1 ? The zorder register field is two bits 
> wide, and we have up to 4 overlays on OMAP4. This will change the maximum 
> value of the property from 3 to 2 on OMAP3. Do you think that could cause 
> issues ?

Yes, num_ovls - 1. On OMAP2/3 we can't even set the zorder, so it
doesn't matter. Of course, we shouldn't even have the property for
OMAP2/3... Or maybe we could have it, but as read-only.

 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/dri-devel/attachments/20170425/6be0ceb1/attachment.sig>


More information about the dri-devel mailing list