[PATCH v2 1/3] drm/amd/display: translate drm's mode to display's stereo-3D timing

Jeff Smith whydoubt at gmail.com
Mon May 8 16:35:54 UTC 2017


Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
index 96f3cc1..a4d5536 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
@@ -899,7 +899,22 @@ static void fill_stream_properties_from_drm_display_mode(
 	else
 		timing_out->pixel_encoding = PIXEL_ENCODING_RGB;
 
-	timing_out->timing_3d_format = TIMING_3D_FORMAT_NONE;
+	switch (mode_in->flags & DRM_MODE_FLAG_3D_MASK) {
+	case DRM_MODE_FLAG_3D_FRAME_PACKING:
+		timing_out->timing_3d_format = TIMING_3D_FORMAT_SW_FRAME_PACKING;
+		break;
+	case DRM_MODE_FLAG_3D_TOP_AND_BOTTOM:
+		timing_out->timing_3d_format = TIMING_3D_FORMAT_TB_SW_PACKED;
+		break;
+	case DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF:
+		timing_out->timing_3d_format = TIMING_3D_FORMAT_SBS_SW_PACKED;
+		break;
+	case DRM_MODE_FLAG_3D_NONE:
+	default:
+		timing_out->timing_3d_format = TIMING_3D_FORMAT_NONE;
+		break;
+	}
+
 	timing_out->display_color_depth = convert_color_depth_from_display_info(
 			connector);
 	timing_out->scan_type = SCANNING_TYPE_NODATA;
-- 
2.9.3



More information about the dri-devel mailing list