Skip to content

Commit

Permalink
drm/i915: Call drm_vblank_post_modeset() on error paths.
Browse files Browse the repository at this point in the history
Ensure that the drm_vblank_pre_modeset() is always balanced by
drm_vblank_post_modeset() within intel_crtc_mode_set().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Chris Wilson authored and Eric Anholt committed Jun 9, 2009
1 parent 5f26a2c commit 1f803ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
ok = limit->find_pll(limit, crtc, adjusted_mode->clock, refclk, &clock);
if (!ok) {
DRM_ERROR("Couldn't find PLL settings for mode!\n");
drm_vblank_post_modeset(dev, pipe);
return -EINVAL;
}

Expand Down Expand Up @@ -1858,12 +1859,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,

/* Flush the plane changes */
ret = intel_pipe_set_base(crtc, x, y, old_fb);
if (ret != 0)
return ret;

drm_vblank_post_modeset(dev, pipe);

return 0;
return ret;
}

/** Loads the palette/gamma unit for the CRTC with the prepared values */
Expand Down

0 comments on commit 1f803ee

Please sign in to comment.