From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
laurent.pinchart@ideasonboard.com, jsarha@ti.com
Subject: Re: [PATCH 1/2] drm/blend: Account also the primary plane of the crtc for normalized_zpos
Date: Fri, 22 Dec 2017 17:15:05 +0200 [thread overview]
Message-ID: <bc889d63-6f81-4f78-40cc-7572fc22a93e@ti.com> (raw)
In-Reply-To: <20171222101252.GP10981@intel.com>
Hi,
On 2017-12-22 12:12, Ville Syrjälä wrote:
> On Fri, Dec 22, 2017 at 11:16:47AM +0200, Tomi Valkeinen wrote:
>> On 21/12/17 17:12, Ville Syrjälä wrote:
>>
>>>> If the userspace knows this, then it knows which primary plane is for
>>>> which crtc, right?
>>>>
>>>> And if it doesn't know this, then the userspace cannot associate any
>>>> plane to any crtc (except what it configures itself).
>>>>
>>>> So... If using legacy modesetting (and non-universal planes), there's no
>>>> problem, primary planes are fixed and at low zpos. If using atomic
>>>> modesetting and universal planes, there's really no (default)
>>>> association between planes and crtcs, and "primary plane" doesn't have
>>>> much meaning. Is that correct?
>>>>
>>>> If so... Then I guess the atomic modesetting client essentially randomly
>>>> picks which plane it uses as a "root plane" (if it even needs such), and
>>>> which planes as overlay planes? If that's the case, then this patch
>>>> doesn't quite fix the issue...
>>>
>>> I'm not sure anyone has really thought how userspace would/should assign
>>> planes to crtcs. My only idea so far has been the crtc and their
>>> preferred primary planes should be registered in the same order. But
>>> someone should then also implement that same policy in userspace when
>>> it's trying to figure out which plane to use. There are other
>>> heuristics it should probably use, like preferring to pick a primary
>>> plane for any fullscreen surface.
>>>
>>> I guess from functional point of view it shouldn't matter which plane
>>> you pick as long as the plane's user visible capabilities are
>>> sufficient. But there might be user invisible power saving features and
>>> whatnot that only work with specific planes. So from that point of view
>>> maybe the order in which the planes get registered is important. Or we
>>> could maybe come up with some kind of plane usage hints in the uapi
>>> which could help userspace decide?
>>
>> I was thinking about this, and... maybe there isn't even any problem (at
>> least for OMAP). So lets say we set the default plane zpos to the plane
>> index, and that the primary planes are reserved first (i.e. have lower
>> zpos than overlay planes).
>>
>> We have three different cases:
>>
>> Legacy modesetting: No problems, primary plane is always at the bottom.
>> If the userspace uses 2+ overlay planes, it can expect the zpos to be
>> based on the plane id, or it can set the zpos.
>>
>> Atomic+Universal, the application uses one primary plane, and zero or
>> more overlay planes: No problems here, the situation is the same as for
>> legacy.
>>
>> Atomic+Universal, the application uses more than one primary plane, and
>> zero or more overlay planes: in this case the app _has_ to manage zpos,
>> because using two primary planes in a single screen, and expecting it to
>> work by default, doesn't make sense.
>>
>> If the above "rules" are valid, then there's no need for this patch.
>>
>> But one question I don't have a good answer is that why would we want to
>> normalize the zpos, instead of returning an error? If the above rules
>> are valid, I think returning an error is better than normalizing and
>> hiding the bad configuration.
>
> IIRC I argued against the normalization, but some people really
> wanted it for whatever reason.
OK, please ignore this series, I'll send a patch instead next year.
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-12-22 15:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 12:10 [PATCH 0/2] drm blend/omap: normalized zpos handling Peter Ujfalusi
2017-12-21 12:11 ` [PATCH 1/2] drm/blend: Account also the primary plane of the crtc for normalized_zpos Peter Ujfalusi
2017-12-21 12:55 ` Ville Syrjälä
2017-12-21 13:44 ` Tomi Valkeinen
2017-12-21 14:20 ` Ville Syrjälä
2017-12-21 14:31 ` Tomi Valkeinen
2017-12-21 15:12 ` Ville Syrjälä
2017-12-22 9:16 ` Tomi Valkeinen
2017-12-22 10:12 ` Ville Syrjälä
2017-12-22 15:15 ` Peter Ujfalusi [this message]
2018-01-09 12:42 ` Daniel Vetter
2018-01-09 13:40 ` Laurent Pinchart
2018-01-09 14:29 ` Daniel Vetter
2017-12-21 12:11 ` [PATCH 2/2] drm/omap: Normalize the zpos and use the normalized_zpos in runtime Peter Ujfalusi
2017-12-21 13:17 ` Daniel Vetter
2017-12-22 6:38 ` Peter Ujfalusi
2018-01-09 8:51 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc889d63-6f81-4f78-40cc-7572fc22a93e@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=tomi.valkeinen@ti.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox