Skip to content

Commit

Permalink
drm/sun4i: Fix DE2 YVU handling
Browse files Browse the repository at this point in the history
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 <r.stratiienko@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200901220305.6809-1-jernej.skrabec@siol.net
  • Loading branch information
Jernej Skrabec authored and Maxime Ripard committed Sep 4, 2020
1 parent f718002 commit 0ee9f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/sun4i/sun8i_vi_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static int sun8i_vi_layer_update_coord(struct sun8i_mixer *mixer, int channel,
return 0;
}

static bool sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format)
static u32 sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format)
{
if (!format->is_yuv)
return SUN8I_CSC_MODE_OFF;
Expand Down

0 comments on commit 0ee9f60

Please sign in to comment.