----- Original Message -----
> From: [email protected]
> To: [email protected], "daniel vetter" <[email protected]>
> Cc: [email protected]
> Sent: Tuesday, January 15, 2013 2:58:42 AM
> Subject: FAILED: patch "[PATCH] i915: ensure that VGA plane is disabled" 
> failed to apply to 3.7-stable tree
> 
> 
> The patch below does not apply to the 3.7-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git
> commit
> id to <[email protected]>.
Hi, after back-ported the commit 45e2b5f640b3766da3eda48f6c35f088155c06f3
(drm/i915: force restore on lid open) first, this commit can be applied
and built without problem. I'll send out a back-port version for that
pre-request patch shortly.

Regards,
CAI Qian
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 0fde901f1ddd2ce0e380a6444f1fb7ca555859e9 Mon Sep 17 00:00:00
> 2001
> From: Krzysztof Mazur <[email protected]>
> Date: Wed, 19 Dec 2012 11:03:41 +0100
> Subject: [PATCH] i915: ensure that VGA plane is disabled
> 
> Some broken systems (like HP nc6120) in some cases, usually after LID
> close/open, enable VGA plane, making display unusable (black screen
> on LVDS,
> some strange mode on VGA output). We used to disable VGA plane only
> once at
> startup. Now we also check, if VGA plane is still disabled while
> changing
> mode, and fix that if something changed it.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57434
> Signed-off-by: Krzysztof Mazur <[email protected]>
> Cc: [email protected]
> Signed-off-by: Daniel Vetter <[email protected]>
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index bc0b7aa..7395f6a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9152,6 +9152,23 @@ static void intel_sanitize_encoder(struct
> intel_encoder *encoder)
>        * the crtc fixup. */
>  }
>  
> +static void i915_redisable_vga(struct drm_device *dev)
> +{
> +     struct drm_i915_private *dev_priv = dev->dev_private;
> +     u32 vga_reg;
> +
> +     if (HAS_PCH_SPLIT(dev))
> +             vga_reg = CPU_VGACNTRL;
> +     else
> +             vga_reg = VGACNTRL;
> +
> +     if (I915_READ(vga_reg) != VGA_DISP_DISABLE) {
> +             DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n");
> +             I915_WRITE(vga_reg, VGA_DISP_DISABLE);
> +             POSTING_READ(vga_reg);
> +     }
> +}
> +
>  /* Scan out the current hw modeset state, sanitizes it and maps it
>  into the drm
>   * and i915 state tracking structures. */
>  void intel_modeset_setup_hw_state(struct drm_device *dev,
> @@ -9260,6 +9277,8 @@ void intel_modeset_setup_hw_state(struct
> drm_device *dev,
>                       intel_set_mode(&crtc->base, &crtc->base.mode,
>                                      crtc->base.x, crtc->base.y, 
> crtc->base.fb);
>               }
> +
> +             i915_redisable_vga(dev);
>       } else {
>               intel_modeset_update_staged_output_state(dev);
>       }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to