Skip to content

Commit

Permalink
drm/i915: pipe and planes should be disabled on haswell_crtc_mode_set
Browse files Browse the repository at this point in the history
So WARN in case they're not. It also does not make any sense to
wait_for_vblank at this point.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed Oct 10, 2012
1 parent 2886e93 commit 1ce4292
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5217,6 +5217,11 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc,
WARN(num_connectors != 1, "%d connectors attached to pipe %c\n",
num_connectors, pipe_name(pipe));

WARN_ON(I915_READ(PIPECONF(pipe)) &
(PIPECONF_ENABLE | I965_PIPECONF_ACTIVE));

WARN_ON(I915_READ(DSPCNTR(plane)) & DISPLAY_PLANE_ENABLE);

if (!intel_ddi_pll_mode_set(crtc, adjusted_mode->clock))
return -EINVAL;

Expand Down Expand Up @@ -5357,8 +5362,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc,

haswell_set_pipeconf(crtc, adjusted_mode, dither);

intel_wait_for_vblank(dev, pipe);

/* Set up the display plane register */
I915_WRITE(DSPCNTR(plane), DISPPLANE_GAMMA_ENABLE);
POSTING_READ(DSPCNTR(plane));
Expand Down

0 comments on commit 1ce4292

Please sign in to comment.