@@ -4986,13 +4986,13 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state,
4986
4986
struct skl_plane_wm * wm =
4987
4987
& crtc_state -> wm .skl .optimal .planes [plane_id ];
4988
4988
4989
- if (wm -> trans_wm .plane_res_b >= total [plane_id ])
4989
+ if (wm -> trans_wm .min_ddb_alloc > total [plane_id ])
4990
4990
memset (& wm -> trans_wm , 0 , sizeof (wm -> trans_wm ));
4991
4991
4992
4992
if (wm -> sagv .wm0 .min_ddb_alloc > total [plane_id ])
4993
4993
memset (& wm -> sagv .wm0 , 0 , sizeof (wm -> sagv .wm0 ));
4994
4994
4995
- if (wm -> sagv .trans_wm .plane_res_b >= total [plane_id ])
4995
+ if (wm -> sagv .trans_wm .min_ddb_alloc > total [plane_id ])
4996
4996
memset (& wm -> sagv .trans_wm , 0 , sizeof (wm -> sagv .trans_wm ));
4997
4997
}
4998
4998
@@ -5404,13 +5404,15 @@ static void skl_compute_transition_wm(struct drm_i915_private *dev_priv,
5404
5404
} else {
5405
5405
res_blocks = wm0_sel_res_b + trans_offset_b ;
5406
5406
}
5407
+ res_blocks ++ ;
5407
5408
5408
5409
/*
5409
5410
* Just assume we can enable the transition watermark. After
5410
5411
* computing the DDB we'll come back and disable it if that
5411
5412
* assumption turns out to be false.
5412
5413
*/
5413
- trans_wm -> plane_res_b = res_blocks + 1 ;
5414
+ trans_wm -> plane_res_b = res_blocks ;
5415
+ trans_wm -> min_ddb_alloc = max_t (u16 , wm0 -> min_ddb_alloc , res_blocks + 1 );
5414
5416
trans_wm -> plane_en = true;
5415
5417
}
5416
5418
0 commit comments