Skip to content

Commit b230555

Browse files
Brian Starkeydliviu
authored andcommitted
drm/fourcc: Fix vsub/hsub for Q410 and Q401
These formats are not subsampled, but that means hsub and vsub should be 1, not 0. Fixes: 94b292b ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") Reported-by: George Kennedy <[email protected]> Reported-by: butt3rflyh4ck <[email protected]> Signed-off-by: Brian Starkey <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Signed-off-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f574f37 commit b230555

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/drm_fourcc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ const struct drm_format_info *__drm_format_info(u32 format)
297297
.vsub = 2, .is_yuv = true },
298298
{ .format = DRM_FORMAT_Q410, .depth = 0,
299299
.num_planes = 3, .char_per_block = { 2, 2, 2 },
300-
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0,
301-
.vsub = 0, .is_yuv = true },
300+
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1,
301+
.vsub = 1, .is_yuv = true },
302302
{ .format = DRM_FORMAT_Q401, .depth = 0,
303303
.num_planes = 3, .char_per_block = { 2, 2, 2 },
304-
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0,
305-
.vsub = 0, .is_yuv = true },
304+
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1,
305+
.vsub = 1, .is_yuv = true },
306306
{ .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2,
307307
.char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 },
308308
.hsub = 2, .vsub = 2, .is_yuv = true},

0 commit comments

Comments
 (0)