Skip to content

Commit 0ee9f60

Browse files
jernejskmripard
authored andcommitted
drm/sun4i: Fix DE2 YVU handling
Function sun8i_vi_layer_get_csc_mode() is supposed to return CSC mode but due to inproper return type (bool instead of u32) it returns just 0 or 1. Colors are wrong for YVU formats because of that. Fixes: daab3d0 ("drm/sun4i: de2: csc_mode in de2 format struct is mostly redundant") Reported-by: Roman Stratiienko <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Tested-by: Roman Stratiienko <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f718002 commit 0ee9f60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/sun4i/sun8i_vi_layer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static int sun8i_vi_layer_update_coord(struct sun8i_mixer *mixer, int channel,
211211
return 0;
212212
}
213213

214-
static bool sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format)
214+
static u32 sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format)
215215
{
216216
if (!format->is_yuv)
217217
return SUN8I_CSC_MODE_OFF;

0 commit comments

Comments
 (0)