Skip to content

Commit

Permalink
drm/i915: Don't forget to mark crtc as inactive after disable
Browse files Browse the repository at this point in the history
Watermark calculations depend on the intel_crtc->active flag to be set
properly. Suspend/resume is broken on SKL and we also get DDB mismatches
without this patch.

The regression was introduced in:

commit eddfcbc
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Jun 15 12:33:53 2015 +0200

    drm/i915: Update less state during modeset.

    No need to repeatedly call update_watermarks, or update_fbc.
    Down to a single call to update_watermarks in .crtc_enable

    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
    Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

v2: Don't touch disable_shared_dpll()

Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91203
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Patrik Jakobsson authored and Daniel Vetter committed Jul 13, 2015
1 parent cd25dd5 commit e4ca061
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5049,6 +5049,9 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)

ironlake_fdi_pll_disable(intel_crtc);
}

intel_crtc->active = false;
intel_update_watermarks(crtc);
}

static void haswell_crtc_disable(struct drm_crtc *crtc)
Expand Down Expand Up @@ -5094,6 +5097,9 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
for_each_encoder_on_crtc(dev, crtc, encoder)
if (encoder->post_disable)
encoder->post_disable(encoder);

intel_crtc->active = false;
intel_update_watermarks(crtc);
}

static void i9xx_pfit_enable(struct intel_crtc *crtc)
Expand Down Expand Up @@ -6158,6 +6164,9 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)

if (!IS_GEN2(dev))
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);

intel_crtc->active = false;
intel_update_watermarks(crtc);
}

static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
Expand Down

0 comments on commit e4ca061

Please sign in to comment.