Message ID | 1349211142-4802-11-git-send-email-przanoni@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 2, 2012 at 9:51 PM, Paulo Zanoni <przanoni@gmail.com> wrote: > @@ -5356,8 +5361,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, > > haswell_set_pipeconf(crtc, adjusted_mode, dither); > > - intel_wait_for_vblank(dev, pipe); > - I guess this hunk could go into a separate commit.
2012/10/4 Lespiau, Damien <damien.lespiau@intel.com>: > On Tue, Oct 2, 2012 at 9:51 PM, Paulo Zanoni <przanoni@gmail.com> wrote: >> @@ -5356,8 +5361,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, >> >> haswell_set_pipeconf(crtc, adjusted_mode, dither); >> >> - intel_wait_for_vblank(dev, pipe); >> - > > I guess this hunk could go into a separate commit. My way of thinking is that since the pipe is disabled there's no reason to wait for vblank here. > > -- > Damien
On Fri, Oct 5, 2012 at 1:53 PM, Paulo Zanoni <przanoni@gmail.com> wrote: > 2012/10/4 Lespiau, Damien <damien.lespiau@intel.com>: >> On Tue, Oct 2, 2012 at 9:51 PM, Paulo Zanoni <przanoni@gmail.com> wrote: >>> @@ -5356,8 +5361,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, >>> >>> haswell_set_pipeconf(crtc, adjusted_mode, dither); >>> >>> - intel_wait_for_vblank(dev, pipe); >>> - >> >> I guess this hunk could go into a separate commit. > > My way of thinking is that since the pipe is disabled there's no > reason to wait for vblank here. Oh, sure I was just saying that it could deserve a separate commit from the one adding the warning, but bikeshedding really.
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a6562a8..5080b53 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5216,6 +5216,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; @@ -5356,8 +5361,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));