struct skl_plane_wm *wm =
&crtc_state->wm.skl.optimal.planes[plane_id];
- if (wm->trans_wm.plane_res_b >= total[plane_id])
+ if (wm->trans_wm.min_ddb_alloc > total[plane_id])
memset(&wm->trans_wm, 0, sizeof(wm->trans_wm));
if (wm->sagv.wm0.min_ddb_alloc > total[plane_id])
memset(&wm->sagv.wm0, 0, sizeof(wm->sagv.wm0));
- if (wm->sagv.trans_wm.plane_res_b >= total[plane_id])
+ if (wm->sagv.trans_wm.min_ddb_alloc > total[plane_id])
memset(&wm->sagv.trans_wm, 0, sizeof(wm->sagv.trans_wm));
}
} else {
res_blocks = wm0_sel_res_b + trans_offset_b;
}
+ res_blocks++;
/*
* Just assume we can enable the transition watermark. After
* computing the DDB we'll come back and disable it if that
* assumption turns out to be false.
*/
- trans_wm->plane_res_b = res_blocks + 1;
+ trans_wm->plane_res_b = res_blocks;
+ trans_wm->min_ddb_alloc = max_t(u16, wm0->min_ddb_alloc, res_blocks + 1);
trans_wm->plane_en = true;
}