diff mbox

[v4,4/5] drm/i915: only flip frontbuffer if crtc is active

Message ID 1414158695-31605-4-git-send-email-gustavo@padovan.org (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo Padovan Oct. 24, 2014, 1:51 p.m. UTC
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

There is no point in flipping a buffer for a disabled crtc.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ville Syrjala Oct. 24, 2014, 3:07 p.m. UTC | #1
On Fri, Oct 24, 2014 at 02:51:34PM +0100, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> There is no point in flipping a buffer for a disabled crtc.

That thing doesn't actually flip but just signal the frontbuffer
tracking code that either has just flipped or is going to real soon now
(tm). But yeah, still makes no sense when the entire pipe is off, so:

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8530401..9a913f5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8544,9 +8544,9 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
>  		if (old_width != width)
>  			intel_update_watermarks(crtc);
>  		intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
> -	}
>  
> -	intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
> +		intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
> +	}
>  
>  	return 0;
>  fail_unpin:
> -- 
> 1.9.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter Oct. 27, 2014, 9:10 a.m. UTC | #2
On Fri, Oct 24, 2014 at 06:07:15PM +0300, Ville Syrjälä wrote:
> On Fri, Oct 24, 2014 at 02:51:34PM +0100, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > 
> > There is no point in flipping a buffer for a disabled crtc.
> 
> That thing doesn't actually flip but just signal the frontbuffer
> tracking code that either has just flipped or is going to real soon now
> (tm). But yeah, still makes no sense when the entire pipe is off, so:
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8530401..9a913f5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8544,9 +8544,9 @@  static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
 		if (old_width != width)
 			intel_update_watermarks(crtc);
 		intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
-	}
 
-	intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
+		intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
+	}
 
 	return 0;
 fail_unpin: