@@ -1507,6 +1507,8 @@ typedef struct drm_i915_private {
struct intel_opregion opregion;
struct intel_vbt_data vbt;
+ bool bios_ssc; /* BIOS had SSC enabled at boot? */
+
/* overlay */
struct intel_overlay *overlay;
@@ -4986,7 +4986,7 @@ static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
{
if (i915.panel_use_ssc >= 0)
return i915.panel_use_ssc != 0;
- return dev_priv->vbt.lvds_use_ssc
+ return (dev_priv->vbt.lvds_use_ssc || dev_priv->bios_ssc)
&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
}
@@ -11732,9 +11732,18 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
void intel_modeset_gem_init(struct drm_device *dev)
{
+ struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *c;
struct intel_framebuffer *fb;
+ /*
+ * There may be no VBT; and if the BIOS enabled SSC we can
+ * just keep using it to avoid unnecessary flicker.
+ */
+ if ((HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) &&
+ (I915_READ(PCH_DREF_CONTROL) & DREF_SSC1_ENABLE))
+ dev_priv->bios_ssc = true;
+
intel_modeset_init_hw(dev);
intel_setup_overlay(dev);
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. v2: honor modparam if set too (Daniel) read out at init time and store for panel_use_ssc() use (Jesse) Reported-by: Kristian Høgsberg <hoegsberg@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-)