From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/7] drm/i915: Don't disable primary when color keying is used
Date: Fri, 13 Dec 2013 10:41:31 +0200 [thread overview]
Message-ID: <20131213084131.GK10036@intel.com> (raw)
In-Reply-To: <CAKMK7uE9KEoR5fWkT5AUuBN=Lfdj9GFW5paiWKo13o6h7L3ekg@mail.gmail.com>
On Thu, Dec 12, 2013 at 09:58:25PM +0100, Daniel Vetter wrote:
> On Thu, Dec 12, 2013 at 9:56 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Thu, 17 Oct 2013 22:53:13 +0300
> > ville.syrjala@linux.intel.com wrote:
> >
> >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>
> >> When color keying is used, the primary may not be invisible even though
> >> the sprite fully covers it. So check for color keying before deciding to
> >> disable the primary plane.
> >>
> >> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> ---
> >> drivers/gpu/drm/i915/intel_sprite.c | 11 ++++++++++-
> >> 1 file changed, 10 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> >> index 07b13dc..74f6bd4 100644
> >> --- a/drivers/gpu/drm/i915/intel_sprite.c
> >> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> >> @@ -643,6 +643,15 @@ format_is_yuv(uint32_t format)
> >> }
> >> }
> >>
> >> +static bool colorkey_enabled(struct intel_plane *intel_plane)
> >> +{
> >> + struct drm_intel_sprite_colorkey key;
> >> +
> >> + intel_plane->get_colorkey(&intel_plane->base, &key);
> >> +
> >> + return key.flags != I915_SET_COLORKEY_NONE;
> >> +}
> >> +
> >> static int
> >> intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> >> struct drm_framebuffer *fb, int crtc_x, int crtc_y,
> >> @@ -828,7 +837,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> >> * If the sprite is completely covering the primary plane,
> >> * we can disable the primary and save power.
> >> */
> >> - disable_primary = drm_rect_equals(&dst, &clip);
> >> + disable_primary = drm_rect_equals(&dst, &clip) && !colorkey_enabled(intel_plane);
> >> WARN_ON(disable_primary && !visible && intel_crtc->active);
> >>
> >> mutex_lock(&dev->struct_mutex);
> >
> > Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>
> Ready your canisters with gallons full of sore acid and raw hatred,
> maintainer party-crasher coming in: Where's the igt?
>
> Should be fairly simple to exercise with those fancy CRCs we have ...
Whoever ends up writing the basic plane crc tests gets to add some
colorkey tests too. But this fixes a real bug, so my preference
would to to apply it asap, test or no test.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-12-13 8:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 19:53 [PATCH 0/7] drm/i915: Atomic sprites ville.syrjala
2013-10-17 19:53 ` [PATCH 1/7] drm/i915: Don't disable primary when color keying is used ville.syrjala
2013-12-12 20:56 ` Jesse Barnes
2013-12-12 20:58 ` Daniel Vetter
2013-12-13 8:41 ` Ville Syrjälä [this message]
2013-10-17 19:53 ` [PATCH 2/7] drm/i915: Fix non-scaled sprites for ILK ville.syrjala
2013-10-17 20:56 ` Chris Wilson
2013-10-18 7:35 ` Ville Syrjälä
2013-10-17 19:53 ` [PATCH 3/7] drm/i915: Add i915_get_crtc_scanline() ville.syrjala
2013-12-12 20:59 ` Jesse Barnes
2013-10-17 19:53 ` [PATCH 4/7] drm/i915: Shuffle sprite register writes into a tighter group ville.syrjala
2013-12-12 21:00 ` Jesse Barnes
2013-10-17 19:53 ` [PATCH 5/7] drm/i915: Make sprite updates atomic ville.syrjala
2013-12-12 21:04 ` Jesse Barnes
2013-12-12 21:09 ` Jesse Barnes
2013-10-17 19:53 ` [PATCH 6/7] drm/i915: Perform primary enable/disable atomically with sprite updates ville.syrjala
2013-12-12 21:06 ` Jesse Barnes
2013-10-17 19:53 ` [PATCH 7/7] drm/i915: Add pipe update trace points ville.syrjala
2013-12-12 21:08 ` Jesse Barnes
2013-12-13 8:47 ` Ville Syrjälä
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=20131213084131.GK10036@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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.