Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: fixup the plane->pipe fixup code
Date: Fri, 07 Sep 2012 10:46:04 +0100	[thread overview]
Message-ID: <275ffc$6gs6ns@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <1346962175-7356-1-git-send-email-daniel.vetter@ffwll.ch>

On Thu,  6 Sep 2012 22:09:35 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> We need to check whether the _other plane is on our pipe, not whether
> our plane is on the other pipe. Otherwise if not both pipes/planes are
> active, we won't properly clean up the mess and set up our desired
> plane->pipe mapping.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51265
> Tested-by: Vladyslav Shtabovenko <DFEW.Entwickler@googlemail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++++++++----------
>  1 file changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index fd9c275..ce9b247 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7994,11 +7994,27 @@ static void intel_enable_pipe_a(struct drm_device *dev)
>  
>  }
>  
> +static bool
> +intel_check_plane_mapping(struct intel_crtc *crtc)
> +{
> +	struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
> +	u32 reg, val;
> +
> +	reg = DSPCNTR(!crtc->plane);
> +	val = I915_READ(reg);
> +
> +	if ((val & DISPLAY_PLANE_ENABLE) == 0 &&
> +	    (!!(val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe))
> +		return false;

If the other plane is off but has our pipe selected, turn off our plane.
Try again.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-09-07  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 20:09 [PATCH] drm/i915: fixup the plane->pipe fixup code Daniel Vetter
2012-09-07  9:46 ` Chris Wilson [this message]
2012-09-08 16:14   ` Daniel Vetter
2012-09-08 19:00     ` Chris Wilson
2012-09-11  6:17     ` Daniel Vetter
2012-09-12 10:34       ` 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='275ffc$6gs6ns@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox