[Intel-gfx] [PATCH 2/2] drm/i915: Skip vblank waits for cursor updates when watermarks dont need updating

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Sep 19 14:03:14 UTC 2017


On Tue, Sep 19, 2017 at 02:14:19PM +0200, Maarten Lankhorst wrote:

Could use a commit message of some sort.

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index a85ca19a0c45..8d051256da1e 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12538,8 +12538,16 @@ static int intel_atomic_commit(struct drm_device *dev,
>  	 * FIXME doing watermarks and fb cleanup from a vblank worker
>  	 * (assuming we had any) would solve these problems.
>  	 */
> -	if (INTEL_GEN(dev_priv) < 9)
> -		state->legacy_cursor_update = false;
> +	if (INTEL_GEN(dev_priv) < 9 && state->legacy_cursor_update) {
> +		struct intel_crtc_state *new_crtc_state;
> +		struct intel_crtc *crtc;
> +		int i;
> +
> +		for_each_new_intel_crtc_in_state(intel_state, crtc, new_crtc_state, i)
> +			if (new_crtc_state->wm.need_postvbl_update ||
> +			    new_crtc_state->update_wm_post)
> +				state->legacy_cursor_update = false;
> +	}

Not sure this is going to buy us much actually. I don't recall off hand
whether it's likely/possible that we'll get the same watermark for a
different sized cursors. VLV/CHV are the exception since we currently
use a fixed watermark for cursors on those platforms because the normal
formula didn't actually work there and I was too lazy to come up with
anything better.

Either way I don't think this should make things worse, so
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

>  
>  	ret = intel_atomic_prepare_commit(dev, state);
>  	if (ret) {
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list