From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/i915: Don't disable primary when color keying is used
Date: Thu, 12 Dec 2013 12:56:19 -0800 [thread overview]
Message-ID: <20131212125619.4d4c58bb@jbarnes-desktop> (raw)
In-Reply-To: <1382039599-31605-2-git-send-email-ville.syrjala@linux.intel.com>
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>
--
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-12-12 20:54 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 [this message]
2013-12-12 20:58 ` Daniel Vetter
2013-12-13 8:41 ` Ville Syrjälä
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=20131212125619.4d4c58bb@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--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