Skip to content

Commit 01d5a75

Browse files
Andy Yanmmind
authored andcommitted
drm/rockchip: vop2: remove the unsupported format of cluster window
The cluster window on vop2 doesn't support linear yuv format(NV12/16/24), it only support afbc based yuv format(DRM_FORMAT_YUV420_8BIT/10BIT), which will be added in next patch. Fixes: 604be85 ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231018094239.2475851-1-andyshrk@163.com
1 parent 45ad07c commit 01d5a75

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

drivers/gpu/drm/rockchip/rockchip_drm_vop2.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,6 @@ static enum vop2_afbc_format vop2_convert_afbc_format(u32 format)
342342
case DRM_FORMAT_RGB565:
343343
case DRM_FORMAT_BGR565:
344344
return VOP2_AFBC_FMT_RGB565;
345-
case DRM_FORMAT_NV12:
346-
return VOP2_AFBC_FMT_YUV420;
347-
case DRM_FORMAT_NV16:
348-
return VOP2_AFBC_FMT_YUV422;
349345
default:
350346
return VOP2_AFBC_FMT_INVALID;
351347
}
@@ -366,25 +362,9 @@ static bool vop2_win_rb_swap(u32 format)
366362
}
367363
}
368364

369-
static bool vop2_afbc_rb_swap(u32 format)
370-
{
371-
switch (format) {
372-
case DRM_FORMAT_NV24:
373-
return true;
374-
default:
375-
return false;
376-
}
377-
}
378-
379365
static bool vop2_afbc_uv_swap(u32 format)
380366
{
381-
switch (format) {
382-
case DRM_FORMAT_NV12:
383-
case DRM_FORMAT_NV16:
384-
return true;
385-
default:
386-
return false;
387-
}
367+
return false;
388368
}
389369

390370
static bool vop2_win_uv_swap(u32 format)
@@ -1232,7 +1212,6 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
12321212
drm_err(vop2->drm, "vp%d %s stride[%d] not 64 pixel aligned\n",
12331213
vp->id, win->data->name, stride);
12341214

1235-
rb_swap = vop2_afbc_rb_swap(fb->format->format);
12361215
uv_swap = vop2_afbc_uv_swap(fb->format->format);
12371216
/*
12381217
* This is a workaround for crazy IC design, Cluster
@@ -1249,7 +1228,6 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
12491228
if (vop2_cluster_window(win))
12501229
vop2_win_write(win, VOP2_WIN_AFBC_ENABLE, 1);
12511230
vop2_win_write(win, VOP2_WIN_AFBC_FORMAT, afbc_format);
1252-
vop2_win_write(win, VOP2_WIN_AFBC_RB_SWAP, rb_swap);
12531231
vop2_win_write(win, VOP2_WIN_AFBC_UV_SWAP, uv_swap);
12541232
vop2_win_write(win, VOP2_WIN_AFBC_AUTO_GATING_EN, 0);
12551233
vop2_win_write(win, VOP2_WIN_AFBC_BLOCK_SPLIT_EN, 0);

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ static const uint32_t formats_win_full_10bit[] = {
2424
DRM_FORMAT_BGR888,
2525
DRM_FORMAT_RGB565,
2626
DRM_FORMAT_BGR565,
27-
DRM_FORMAT_NV12,
28-
DRM_FORMAT_NV16,
29-
DRM_FORMAT_NV24,
3027
};
3128

3229
static const uint32_t formats_win_full_10bit_yuyv[] = {

0 commit comments

Comments
 (0)