[BISECTED, -next] drm/i915: blurred HDMI output
Jesse Barnes
jbarnes at virtuousgeek.org
Mon Oct 18 11:56:48 PDT 2010
On Sun, 17 Oct 2010 19:37:13 +0200
Arnd Bergmann <arnd at 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 at 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;
More information about the dri-devel
mailing list