From: Dmytro Laktyushkin Date: Wed, 10 May 2017 15:35:07 +0000 (-0400) Subject: drm/amd/display: add yuv pixel formats to pixel_format_to_bpp() X-Git-Tag: v5.15~9960^2~23^2~502 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e12c3f6a0a4e73c6b6d11b7aebf20b7026ef18f;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/display: add yuv pixel formats to pixel_format_to_bpp() Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 1e6952bde..bc98081 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1051,8 +1051,13 @@ static bool is_surface_in_context( static unsigned int pixel_format_to_bpp(enum surface_pixel_format format) { switch (format) { + case SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr: + case SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb: + return 12; case SURFACE_PIXEL_FORMAT_GRPH_ARGB1555: case SURFACE_PIXEL_FORMAT_GRPH_RGB565: + case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr: + case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb: return 16; case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888: case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888: