Re: [PATCH 08/14] drm/i915: Pre-compute plane control register value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 17, 2017 at 11:18:02PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Computing the plane control register value is branchy so moving it out
> from the plane commit hook seems prudent. Let's pre-compute it during
> the atomic check phase and store the result in the plane state.

i845_cursor_ctl parameters starting to look more sensible.

> @@ -986,6 +978,14 @@ intel_check_sprite_plane(struct drm_plane *plane,

This function still doesn't do what it says on the tin!!!

>  		ret = skl_check_plane_surface(state);
>  		if (ret)
>  			return ret;
> +
> +		state->ctl = skl_plane_ctl(crtc_state, state);
> +	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
> +		state->ctl = vlv_sprite_ctl(crtc_state, state);
> +	} else if (INTEL_GEN(dev_priv) >= 7) {
> +		state->ctl = ivb_sprite_ctl(crtc_state, state);
> +	} else {
> +		state->ctl = ilk_sprite_ctl(crtc_state, state);
>  	}

Precomputing these is a very good idea.
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux