All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/5] drm/i915: Fix sprite destination colorkeying on SKL+
Date: Fri, 8 Jun 2018 21:29:15 +0300	[thread overview]
Message-ID: <20180608182915.GU23723@intel.com> (raw)
In-Reply-To: <a5258d197b21d9e1df5b871a3f53cba82bba103d.camel@intel.com>

On Tue, Jun 05, 2018 at 08:10:36AM +0000, Lisovskiy, Stanislav wrote:
> On Tue, 2018-05-29 at 21:28 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > On SKL+ the dst colorkey must be configured on the lower
> > plane that contains the colorkey. This is in contrast to
> > most earlier platforms where the dst colorkey is configured
> > on the plane above.
> > 
> > The hardware will peform dst keying only between two immediately
> > adjacent (in zorder) planes. Plane 1 will be keyed against plane 0,
> > plane 2 againts plane 1, and so on. There is no way to key arbitrary
> > planes against plane 0. Thus offering dst color keying on plane 2+
> > is pointless. In fact it can be harmful since enabling dst keying on
> > more than one plane on the same pipe leads to only the top-most of
> > the planes performing the keying. For any plane lower in zorder the
> > dst key enable is simply ignored.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> 
> > ---
> >  drivers/gpu/drm/i915/intel_sprite.c | 63
> > +++++++++++++++++++++++++++++++++++--
> >  1 file changed, 60 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c
> > b/drivers/gpu/drm/i915/intel_sprite.c
> > index ee23613f9fd4..6164c2ca20c3 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -1071,6 +1071,36 @@ intel_check_sprite_plane(struct intel_plane
> > *plane,
> >  	return 0;
> >  }
> >  
> > +static bool has_dst_key_in_primary_plane(struct drm_i915_private
> > *dev_priv)
> > +{
> > +	return INTEL_GEN(dev_priv) >= 9;
> > +}
> > +
> > +static void intel_plane_set_ckey(struct intel_plane_state
> > *plane_state,
> > +				 const struct
> > drm_intel_sprite_colorkey *set)
> > +{
> > +	struct intel_plane *plane = to_intel_plane(plane_state-
> > >base.plane);
> > +	struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
> > +
> > +	*key = *set;
> > +
> > +	/*
> > +	 * We want src key enabled on the
> > +	 * sprite and not on the primary.
> > +	 */
> > +	if (plane->id == PLANE_PRIMARY &&
> > +	    set->flags & I915_SET_COLORKEY_SOURCE)
> > +		key->flags = 0;
> > +
> > +	/*
> > +	 * On SKL+ we want dst key enabled on
> > +	 * the primary and not on the sprite.
> > +	 */
> > +	if (plane->id != PLANE_PRIMARY &&

The 'INTEL_GEN(dev_priv) >= 9' check that was supposed to be here ended
up in the wrong patch. I moved it over while applying this to avoid
breaking the pre-SKL sprites. Only caught it when glancing at the
resulting code before pushing. Might be time to write some real
colorkeying igts...

Patch pushed to dinq. Thanks for the review.

> > +	    set->flags & I915_SET_COLORKEY_DESTINATION)
> > +		key->flags = 0;
> > +}
> > +
-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2018-06-08 18:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 18:28 [PATCH 1/5] drm/i915: Fix sprite destination colorkeying on SKL+ Ville Syrjala
2018-05-29 18:28 ` [PATCH 2/5] drm/i915: Fix VLV/CHV sprite src colorkey mask Ville Syrjala
2018-05-29 18:28 ` [PATCH 3/5] drm/i915: Add basic immutable zpos properties for all planes Ville Syrjala
2018-05-29 18:28 ` [PATCH 4/5] drm/i915: Make primary/sprite zpos configurable on VLV/CHV Ville Syrjala
2018-05-29 18:28 ` [PATCH 5/5] drm/i915: Implement dst colorkeying for VLV/CHV sprites Ville Syrjala
2018-05-29 18:34 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: Fix sprite destination colorkeying on SKL+ Patchwork
2018-05-29 18:50 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-29 20:01 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-05  8:10 ` [PATCH 1/5] " Lisovskiy, Stanislav
2018-06-08 18:29   ` Ville Syrjälä [this message]

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=20180608182915.GU23723@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stanislav.lisovskiy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.