Re: [PATCH v2 3/8] drm/rockchip: vop2: Fix Esmart test condition

Thomas Zimmermann
2026-01-20T12:58:22Z

Hi

Am 06.12.25 um 21:45 schrieb Nicolas Frattaroli:
> From: Daniel Stone <daniels@collabora.com>
>
> 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>
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index 81b3eba07095..9d715d7659af 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1230,12 +1230,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);

Drivers should usually be using drm_dbg(), drm_err(), drm_warn() etc.
Print functions with _kms postfix are for the DRM helpers. Here and in
all other patches.

Best regards
Thomas

> + src_w -= 1;
> }
>
> if (afbc_en && src_w % 4) {
>

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)