drm/i915: optimize vblank waits in set_base_atomic
Subsystems (2)
PATCH 1/1 drm/i915: optimize vblank waits in set_base_atomic
We only need to do them if the pipe is actually running and if the framebuffers have changed. Removes two "wait for vblank timed out" messages when doing a suspend/resume cycle on my i855gm.
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
@@ -2203,7 +2203,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, crtc->y = y;if (old_fb) { -intel_wait_for_vblank (dev, intel_crtc->pipe); +if (to_intel_crtc (crtc)->active && old_fb != fb) +intel_wait_for_vblank (dev, intel_crtc->pipe);intel_unpin_fb_obj (to_intel_framebuffer (old_fb)->obj); }
Signature · 1 line
1.7.11.7
Quoted 5 lines · Daniel Vetter
We only need to do them if the pipe is actually running and if the framebuffers have changed. Removes two "wait for vblank timed out" messages when doing a suspend/resume cycle on my i855gm.
Signed-off-by Daniel Vetter <[email protected]>
Comments inline.
Quoted 9 lines
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2206
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -2203,7 +2203,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, crtc->y = y;if (old_fb) { -intel_wait_for_vblank (dev, intel_crtc->pipe); +if (to_intel_crtc (crtc)->active && old_fb != fb)
if (intel_crtc->active && old_fb != fb)
drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2208
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1
-0+intel_wait_for_vblank (dev, intel_crtc->pipe);intel_unpin_fb_obj (to_intel_framebuffer (old_fb)->obj);
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 21 lines · Chris Wilson
Quoted 5 lines · Daniel Vetter
We only need to do them if the pipe is actually running and if the framebuffers have changed. Removes two "wait for vblank timed out" messages when doing a suspend/resume cycle on my i855gm.
Signed-off-by Daniel Vetter <[email protected]>Reviewed-by Chris Wilson <[email protected]>Comments inline.
Quoted 11 lines
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -2203,7 +2203,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, crtc->y = y;
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, · line 2206
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +1
-1if (old_fb) { -intel_wait_for_vblank (dev, intel_crtc->pipe); +if (to_intel_crtc (crtc)->active && old_fb != fb)if (intel_crtc->active && old_fb != fb)
Oops, missed that one. Queued for -next, thanks for the review. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch