From: Chris Wilson Date: Thu, 23 May 2013 12:57:17 +0000 (+0100) Subject: drm/i915: Treat resetting of the current framebuffer as a no-op X-Git-Tag: next-20130527~50^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ef8a07483211668b8490ac3311c7ad6d2e92117b;p=karo-tx-linux.git drm/i915: Treat resetting of the current framebuffer as a no-op If none of the CRTC parameters change along with the framebuffer, we can forgo rewriting the register and waiting for a vblank. There are a few calls made by the display managers as they start up which tend to end up performing no-ops on the current CRTC settings. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2a9d0671f8c3..d63bb3fa3d41 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2188,6 +2188,11 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, return -EINVAL; } + if (fb == crtc->fb && crtc->x == x && crtc->y == y) { + DRM_DEBUG_KMS("skipping reset of current fb"); + return 0; + } + mutex_lock(&dev->struct_mutex); ret = intel_pin_and_fence_fb_obj(dev, to_intel_framebuffer(fb)->obj,