drm/rockchip: vop2: Fix Esmart test condition

If we want to find out if a window is Esmart or not, test for not being
a cluster window, rather than AFBDC presence.

No functional effect as only cluster windows support AFBC decode.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251215-vop2-atomic-fixups-v5-3-83463c075a8d@collabora.com
This commit is contained in:
Daniel Stone 2025-12-15 15:09:19 +01:00 committed by Heiko Stuebner
parent 2f4e3f2bef
commit f403945d24

View File

@ -1229,12 +1229,10 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
* This is workaround solution for IC design:
* esmart can't support scale down when src_w % 16 == 1.
*/
if (!(win->data->feature & WIN_FEATURE_AFBDC)) {
if (src_w > dsp_w && (src_w & 0xf) == 1) {
drm_dbg_kms(vop2->drm, "vp%d %s act_w[%d] MODE 16 == 1\n",
vp->id, win->data->name, src_w);
src_w -= 1;
}
if (!vop2_cluster_window(win) && src_w > dsp_w && (src_w & 1)) {
drm_dbg_kms(vop2->drm, "vp%d %s act_w[%d] MODE 16 == 1\n",
vp->id, win->data->name, src_w);
src_w -= 1;
}
if (afbc_en && src_w % 4) {