From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Recompute WM when the cursor size changes Date: Wed, 26 Mar 2014 17:35:09 +0100 Message-ID: <20140326163509.GU26878@phenom.ffwll.local> References: <1395758972-31316-4-git-send-email-damien.lespiau@intel.com> <1395837495-29870-1-git-send-email-chris@chris-wilson.co.uk> <1395837495-29870-2-git-send-email-chris@chris-wilson.co.uk> <20140326152103.GH1729@strange.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 68E896E6D3 for ; Wed, 26 Mar 2014 09:35:15 -0700 (PDT) Received: by mail-ee0-f52.google.com with SMTP id e49so1817346eek.25 for ; Wed, 26 Mar 2014 09:35:13 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140326152103.GH1729@strange.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org, Sagar Kamble List-Id: intel-gfx@lists.freedesktop.org On Wed, Mar 26, 2014 at 03:21:03PM +0000, Damien Lespiau wrote: > On Wed, Mar 26, 2014 at 12:38:15PM +0000, Chris Wilson wrote: > > If the cursor width is changed, we may need to recompute our WM to > > prevent untold flickering. We hope that the registers are flushed on the > > same vblank to prevent underruns... > > > > Cc: Damien Lespiau > > Cc: Sagar Kamble > > Signed-off-by: Chris Wilson > > Indeed, I'll learn to see the bigger picture one day, one day... > > Reviewed-by: Damien Lespiau Both merged, thanks for patches&review. -Daniel > > > --- > > drivers/gpu/drm/i915/intel_display.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index c8c52d105b8c..e15b3abe1350 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -7763,6 +7763,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, > > struct drm_i915_private *dev_priv = dev->dev_private; > > struct intel_crtc *intel_crtc = to_intel_crtc(crtc); > > struct drm_i915_gem_object *obj; > > + unsigned old_width; > > uint32_t addr; > > int ret; > > > > @@ -7853,13 +7854,18 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, > > > > mutex_unlock(&dev->struct_mutex); > > > > + old_width = intel_crtc->cursor_width; > > + > > intel_crtc->cursor_addr = addr; > > intel_crtc->cursor_bo = obj; > > intel_crtc->cursor_width = width; > > intel_crtc->cursor_height = height; > > > > - if (intel_crtc->active) > > + if (intel_crtc->active) { > > + if (old_width != width) > > + intel_update_watermarks(crtc); > > intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); > > + } > > > > return 0; > > fail_unpin: > > -- > > 1.9.1 > > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch