[Intel-gfx] [PATCH 17/19] drm/i915: Use new atomic iterator macros in wm code

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Nov 3 16:49:04 UTC 2016


On Mon, Oct 17, 2016 at 02:37:16PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2df06b703e3d..163b73b493bf 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3227,7 +3227,7 @@ skl_get_total_relative_data_rate(struct intel_crtc_state *intel_cstate)
>  		return 0;
>  
>  	/* Calculate and cache data rate for each plane */
> -	for_each_plane_in_state(state, plane, pstate, i) {
> +	for_each_new_plane_in_state(state, plane, pstate, i) {

Looks like this patch needs a refresh due to my tardiness in reviewing
it.

Also unrelated, but I recently noticed that
skl_get_total_relative_data_rate() doesn't exclude the cursor plane
from the calculation. I'm thinking it should. Adding some Cc:s...

>  		id = skl_wm_plane_id(to_intel_plane(plane));
>  		intel_plane = to_intel_plane(plane);
>  
> @@ -3364,14 +3364,14 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
>  	alloc_size -= cursor_blocks;
>  
>  	/* 1. Allocate the mininum required blocks for each active plane */
> -	for_each_plane_in_state(state, plane, pstate, i) {
> +	for_each_new_plane_in_state(state, plane, pstate, i) {
>  		intel_plane = to_intel_plane(plane);
>  		id = skl_wm_plane_id(intel_plane);
>  
>  		if (intel_plane->pipe != pipe)
>  			continue;
>  
> -		if (!to_intel_plane_state(pstate)->base.visible) {
> +		if (!pstate->visible) {
>  			minimum[id] = 0;
>  			y_minimum[id] = 0;
>  			continue;
> @@ -3933,7 +3933,7 @@ pipes_modified(struct drm_atomic_state *state)
>  	struct drm_crtc_state *cstate;
>  	uint32_t i, ret = 0;
>  
> -	for_each_crtc_in_state(state, crtc, cstate, i)
> +	for_each_new_crtc_in_state(state, crtc, cstate, i)
>  		ret |= drm_crtc_mask(crtc);
>  
>  	return ret;
> @@ -4048,7 +4048,7 @@ skl_compute_wm(struct drm_atomic_state *state)
>  	 * since any racing commits that want to update them would need to
>  	 * hold _all_ CRTC state mutexes.
>  	 */
> -	for_each_crtc_in_state(state, crtc, cstate, i)
> +	for_each_new_crtc_in_state(state, crtc, cstate, i)
>  		changed = true;
>  	if (!changed)
>  		return 0;
> @@ -4070,7 +4070,7 @@ skl_compute_wm(struct drm_atomic_state *state)
>  	 * should allow skl_update_pipe_wm() to return failure in cases where
>  	 * no suitable watermark values can be found.
>  	 */
> -	for_each_crtc_in_state(state, crtc, cstate, i) {
> +	for_each_new_crtc_in_state(state, crtc, cstate, i) {
>  		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>  		struct intel_crtc_state *intel_cstate =
>  			to_intel_crtc_state(cstate);
> -- 
> 2.7.4
> 
> _______________________________________________
> 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