All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Wessel <jason.wessel@windriver.com>,
	Jason@freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [BISECTED, -next] drm/i915: blurred HDMI output
Date: Mon, 18 Oct 2010 11:56:48 -0700	[thread overview]
Message-ID: <20101018115648.09bac8be@jbarnes-desktop> (raw)
In-Reply-To: <201010171937.13642.arnd@arndb.de>

On Sun, 17 Oct 2010 19:37:13 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> Commit e9e331a8ab "drm/i915/lvds: Ensure panel is unlocked for Ironlake or
> the panel fitter" broke my HDMI output on GMA4500HD, it seemed to be driving
> the output with the wrong resolution, while still showing the native panel
> resolution of 1680x1050 being in use. This caused a very irritating blur
> on the screen.
> 
> After bisecting the problem, I managed to do a partial revert which fixes
> the problem and applies on top of linux-next. I have no idea what this patch
> actually does or if it can break any other configuration, but it solves the
> problem for me.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 9109c00..2d47161 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3921,6 +3921,10 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
>  	pipeconf |= PIPECONF_ENABLE;
>  	dpll |= DPLL_VCO_ENABLE;
>  
> +	/* Disable the panel fitter if it was on our pipe */
> +	if (!HAS_PCH_SPLIT(dev) && intel_panel_fitter_pipe(dev) == pipe)
> +		I915_WRITE(PFIT_CONTROL, 0);
> +
>  	DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
>  	drm_mode_debug_printmodeline(mode);
>  
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 40e99bf..de21a82 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -224,6 +224,7 @@ extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
>  extern u32 intel_panel_get_backlight(struct drm_device *dev);
>  extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
>  
> +extern int intel_panel_fitter_pipe (struct drm_device *dev);
>  extern void intel_crtc_load_lut(struct drm_crtc *crtc);
>  extern void intel_encoder_prepare (struct drm_encoder *encoder);
>  extern void intel_encoder_commit (struct drm_encoder *encoder);
> diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
> index 375316a..da65d95 100644
> --- a/drivers/gpu/drm/i915/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/intel_overlay.c
> @@ -1053,7 +1053,7 @@ static int check_overlay_src(struct drm_device *dev,
>   * Return the pipe currently connected to the panel fitter,
>   * or -1 if the panel fitter is not present or not in use
>   */
> -static int intel_panel_fitter_pipe(struct drm_device *dev)
> +int intel_panel_fitter_pipe(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	u32  pfit_control;
> 

Hm, the LVDS code should take care of panel fitting in
the !HAS_PCH_SPLIT case.  Does this patch achieve the same thing as
yours?  Maybe we were leaving a stale PFIT value in place...

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds
index f1a6499..bc1e1c1 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1000,6 +1000,8 @@ void intel_lvds_init(struct drm_device *dev)
        if (!intel_lvds->fixed_mode)
                goto failed;
 
+       intel_lvds->pfit_dirty = true;
+
 out:
        if (HAS_PCH_SPLIT(dev)) {
                u32 pwm;

  reply	other threads:[~2010-10-18 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 17:37 [BISECTED, -next] drm/i915: blurred HDMI output Arnd Bergmann
2010-10-18 18:56 ` Jesse Barnes [this message]
2010-10-18 19:13   ` Arnd Bergmann
2010-10-18 19:28     ` Jesse Barnes
2010-10-18 19:57       ` Arnd Bergmann
2010-10-18 20:15         ` Jesse Barnes
2010-10-18 20:30           ` Arnd Bergmann
2010-10-18 20:37             ` Arnd Bergmann
2010-10-18 21:05               ` Jesse Barnes

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=20101018115648.09bac8be@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=Jason@freedesktop.org \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jason.wessel@windriver.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.