[PATCH v2 2/3] drm/amd/display: use stereo-3D-aware methods to calculate dimensions

[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 | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

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 a4d5536..73aedd1 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
@@ -691,8 +691,7 @@ static void update_stream_scaling_settings(
 		return;
 
 	/* Full screen scaling by default */
-	src.width = mode->hdisplay;
-	src.height = mode->vdisplay;
+	drm_crtc_get_hv_timing(mode, &src.width, &src.height);
 	dst.width = stream->timing.h_addressable;
 	dst.height = stream->timing.v_addressable;
 
@@ -1089,6 +1088,7 @@ static struct dc_stream *create_stream_for_sink(
 				dm_state->scaling != RMX_OFF);
 	}
 
+	drm_mode_set_crtcinfo(&mode, CRTC_STEREO_DOUBLE_ONLY);
 	fill_stream_properties_from_drm_display_mode(stream,
 			&mode, &aconnector->base);
 	update_stream_scaling_settings(&mode, dm_state, stream);
@@ -1579,13 +1579,12 @@ int amdgpu_dm_connector_mode_valid(
 		goto stream_create_fail;
 	}
 
-	drm_mode_set_crtcinfo(mode, 0);
+	drm_mode_set_crtcinfo(mode, CRTC_STEREO_DOUBLE);
 	fill_stream_properties_from_drm_display_mode(stream, mode, connector);
 
 	val_set.stream = stream;
 	val_set.surface_count = 0;
-	stream->src.width = mode->hdisplay;
-	stream->src.height = mode->vdisplay;
+	drm_crtc_get_hv_timing(mode, &stream->src.width, &stream->src.height);
 	stream->dst = stream->src;
 
 	context = dc_get_validate_context(adev->dm.dc, &val_set, 1);
@@ -1799,14 +1798,13 @@ int dm_create_validation_set_for_connector(struct drm_connector *connector,
 		return result;
 	}
 
-	drm_mode_set_crtcinfo(mode, 0);
+	drm_mode_set_crtcinfo(mode, CRTC_STEREO_DOUBLE);
 
 	fill_stream_properties_from_drm_display_mode(stream, mode, connector);
 
 	val_set->stream = stream;
 
-	stream->src.width = mode->hdisplay;
-	stream->src.height = mode->vdisplay;
+	drm_crtc_get_hv_timing(mode, &stream->src.width, &stream->src.height);
 	stream->dst = stream->src;
 
 	return MODE_OK;
-- 
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