[PATCH 4/7] drm/amd/display: Adding 10 bpcc video P010 format

Harry Wentland harry.wentland at amd.com
Tue Feb 7 00:18:09 UTC 2017


From: Vitaly Prosyak <vitaly.prosyak at amd.com>

Change-Id: Ibd6c485431d8f789ebfea699d780ac318ced66e8
Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 5 +++++
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c      | 6 ++++--
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h           | 5 ++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c
index 946379852b2a..ab8d1e931846 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c
@@ -2534,6 +2534,8 @@ static void populate_initial_data(
 		case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010:
 		case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010:
 		case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS:
+		case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr:
+		case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb:
 			data->bytes_per_pixel[num_displays + 4] = 4;
 			break;
 		case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
@@ -2621,6 +2623,7 @@ static void populate_initial_data(
 			}
 			switch (pipe[i].surface->public.format) {
 			case SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr:
+			case SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb:
 			case SURFACE_PIXEL_FORMAT_GRPH_ARGB1555:
 			case SURFACE_PIXEL_FORMAT_GRPH_RGB565:
 				data->bytes_per_pixel[num_displays + 4] = 2;
@@ -2630,6 +2633,8 @@ static void populate_initial_data(
 			case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010:
 			case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010:
 			case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS:
+			case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr:
+			case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb:
 				data->bytes_per_pixel[num_displays + 4] = 4;
 				break;
 			case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 856a33ad8ec1..e4e86110d45d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -358,11 +358,13 @@ static enum pixel_format convert_pixel_format_to_dalsurface(
 		dal_pixel_format = PIXEL_FORMAT_FP16;
 		break;
 	case SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr:
-		dal_pixel_format = PIXEL_FORMAT_420BPP12;
-		break;
 	case SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb:
 		dal_pixel_format = PIXEL_FORMAT_420BPP12;
 		break;
+	case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr:
+	case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb:
+		dal_pixel_format = PIXEL_FORMAT_420BPP15;
+		break;
 	case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
 	default:
 		dal_pixel_format = PIXEL_FORMAT_UNKNOWN;
diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
index 21092f33c83b..75e16ac70f5f 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
@@ -195,6 +195,8 @@ enum surface_pixel_format {
 	SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr =
 		SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
 	SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,
+	SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
+	SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
 	SURFACE_PIXEL_FORMAT_INVALID
 
 	/*grow 444 video here if necessary */
@@ -212,13 +214,14 @@ enum pixel_format {
 	PIXEL_FORMAT_FP16,
 	/*video*/
 	PIXEL_FORMAT_420BPP12,
+	PIXEL_FORMAT_420BPP15,
 	/*end of pixel format definition*/
 	PIXEL_FORMAT_INVALID,
 
 	PIXEL_FORMAT_GRPH_BEGIN = PIXEL_FORMAT_INDEX8,
 	PIXEL_FORMAT_GRPH_END = PIXEL_FORMAT_FP16,
 	PIXEL_FORMAT_VIDEO_BEGIN = PIXEL_FORMAT_420BPP12,
-	PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_420BPP12,
+	PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_420BPP15,
 	PIXEL_FORMAT_UNKNOWN
 };
 
-- 
2.9.3



More information about the amd-gfx mailing list