Skip to content

Commit 9212278

Browse files
jbarnes993danvet
authored andcommitted
drm/i915: preserve SSC if previously set v3
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) v3: trust BIOS configuration over VBT like we do for DP (Jani) Reported-by: Kristian Høgsberg <[email protected]> Signed-off-by: Jesse Barnes <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 3581f30 commit 9212278

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13331,13 +13331,24 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
1333113331

1333213332
void intel_modeset_gem_init(struct drm_device *dev)
1333313333
{
13334+
struct drm_i915_private *dev_priv = dev->dev_private;
1333413335
struct drm_crtc *c;
1333513336
struct drm_i915_gem_object *obj;
1333613337

1333713338
mutex_lock(&dev->struct_mutex);
1333813339
intel_init_gt_powersave(dev);
1333913340
mutex_unlock(&dev->struct_mutex);
1334013341

13342+
/*
13343+
* There may be no VBT; and if the BIOS enabled SSC we can
13344+
* just keep using it to avoid unnecessary flicker. Whereas if the
13345+
* BIOS isn't using it, don't assume it will work even if the VBT
13346+
* indicates as much.
13347+
*/
13348+
if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev))
13349+
dev_priv->vbt.lvds_use_ssc = !!(I915_READ(PCH_DREF_CONTROL) &
13350+
DREF_SSC1_ENABLE);
13351+
1334113352
intel_modeset_init_hw(dev);
1334213353

1334313354
intel_setup_overlay(dev);

0 commit comments

Comments
 (0)