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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeff Smith <whydoubt@xxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux