drm/i915: Calculate min_ddb_alloc for trans_wm
Let's make all the "do we have enough DDB for this WM level?" checks use min_ddb_alloc. To achieve that we need to populate this for the transition watermarks as well. Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
This commit is contained in:
Родитель
f0dfaa982b
Коммит
18ffd6de8c
|
@ -4986,13 +4986,13 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state,
|
||||||
struct skl_plane_wm *wm =
|
struct skl_plane_wm *wm =
|
||||||
&crtc_state->wm.skl.optimal.planes[plane_id];
|
&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));
|
memset(&wm->trans_wm, 0, sizeof(wm->trans_wm));
|
||||||
|
|
||||||
if (wm->sagv.wm0.min_ddb_alloc > total[plane_id])
|
if (wm->sagv.wm0.min_ddb_alloc > total[plane_id])
|
||||||
memset(&wm->sagv.wm0, 0, sizeof(wm->sagv.wm0));
|
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));
|
memset(&wm->sagv.trans_wm, 0, sizeof(wm->sagv.trans_wm));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5404,13 +5404,15 @@ static void skl_compute_transition_wm(struct drm_i915_private *dev_priv,
|
||||||
} else {
|
} else {
|
||||||
res_blocks = wm0_sel_res_b + trans_offset_b;
|
res_blocks = wm0_sel_res_b + trans_offset_b;
|
||||||
}
|
}
|
||||||
|
res_blocks++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Just assume we can enable the transition watermark. After
|
* Just assume we can enable the transition watermark. After
|
||||||
* computing the DDB we'll come back and disable it if that
|
* computing the DDB we'll come back and disable it if that
|
||||||
* assumption turns out to be false.
|
* 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;
|
trans_wm->plane_en = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче