diff mbox

[5/8] drm/i915: preserve SSC if previously set

Message ID 1394211475-2646-5-git-send-email-jbarnes@virtuousgeek.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jesse Barnes March 7, 2014, 4:57 p.m. UTC
Some machines may have a broken VBT or no VBT at all, but we still want
to use SSC there.  So check for it and keep it enabled if we see it
already on.  Based on an earlier fix from Kristian.

Reported-by: Kristian Høgsberg <hoegsberg@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Daniel Vetter March 8, 2014, 10:34 a.m. UTC | #1
On Fri, Mar 07, 2014 at 08:57:52AM -0800, Jesse Barnes wrote:
> Some machines may have a broken VBT or no VBT at all, but we still want
> to use SSC there.  So check for it and keep it enabled if we see it
> already on.  Based on an earlier fix from Kristian.
> 
> Reported-by: Kristian Høgsberg <hoegsberg@gmail.com>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 479de3b..d450ab6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5806,6 +5806,10 @@ static void ironlake_init_pch_refclk(struct drm_device *dev)
>  	 */
>  	val = I915_READ(PCH_DREF_CONTROL);
>  
> +	/* Preserve SSC if the BIOS set it */
> +	if (val & DREF_SSC1_ENABLE)
> +		i915.panel_use_ssc = 1;

This definitely needs some debug output, and we need to make sure that the
module option still overrides this.
-Daniel

> +
>  	/* As we must carefully and slowly disable/enable each source in turn,
>  	 * compute the final state we want first and check if we need to
>  	 * make any changes at all.
> -- 
> 1.8.4.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 479de3b..d450ab6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5806,6 +5806,10 @@  static void ironlake_init_pch_refclk(struct drm_device *dev)
 	 */
 	val = I915_READ(PCH_DREF_CONTROL);
 
+	/* Preserve SSC if the BIOS set it */
+	if (val & DREF_SSC1_ENABLE)
+		i915.panel_use_ssc = 1;
+
 	/* As we must carefully and slowly disable/enable each source in turn,
 	 * compute the final state we want first and check if we need to
 	 * make any changes at all.