[Intel-gfx] [PATCH v3] drm/i915: add immutable zpos plane properties

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Apr 16 19:04:45 UTC 2019


On Tue, Apr 16, 2019 at 08:13:12PM +0200, Maarten Lankhorst wrote:
> Op 16-04-2019 om 15:42 schreef Ville Syrjälä:
> > On Tue, Apr 16, 2019 at 03:28:15PM +0200, Maarten Lankhorst wrote:
> >> Op 16-04-2019 om 15:20 schreef Ville Syrjälä:
> >>> On Sat, Apr 13, 2019 at 11:13:27AM +0000, Simon Ser wrote:
> >>>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >>>>
> >>>> This adds basic immutable support for the zpos property. The zpos increases
> >>>> from bottom to top: primary, sprites, cursor.
> >>> I was thinking a bit about how we might go about testing this.
> >>>
> >>> We probably want a basic test that just checks that if any
> >>> plane has a zpos prop then all planes should have it.
> >> This would be a good test for BAT.
> >>> A functional test would stack the planes up in some way and
> >>> compare against a software rendered reference. IIRC there was 
> >>> a zpos test case floating around but that depended on alpha
> >>> blending which we don't necessarily have.
> >> But with semi-overlapping planes you would accomplish the same, without alpha dependency.
> >>
> >> Something like this?
> >>
> >> [BG]   [Sprite 1]    [Cursor]
> >>   [Primary]   [Sprite 2]
> > Should probably be good enough. Though I was pondering is there a
> > way to position an arbitraty number of planes such that the
> > resulting picture has a visible region for every possible
> > combination of planes?
> 
> n planes, width = width / (n + 1)
> 
> position = n * 3/4 * plane_width ? or something
> 
> If each plane has its own color, then it would work..

That's not going to hit all the combinations.

Three is easy, you just position the planes in a triangular sort
of shape. But four already seems hard. Or maybe I'm just not smart
enough. Probably needs some graph theory math proof or something.

I suppose you could do thatr staircase type approach you suggested,
and them swap the planes around a bit. I think that should cover
everything eventually. But I was hoping for a cool way to check
everything from a single frame :)

> 
> >> Perhaps primary fullscreen to prevent issues with hw that doesn't support partial planes?
> > I guess. And maybe a second test that disables the primary
> > so that we can also get the bg color into the picture?
> 
> I don't think we finalized the bg color api yet, else it would be good to have..

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list