Commit 9182b4cb authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Call update_stream_signal directly from amdgpu_dm

There's no good place in DC to cover all place where stream signal should
be updated. update_stream_signal depends on timing which comes from DM.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d1bd7d61
...@@ -2448,6 +2448,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, ...@@ -2448,6 +2448,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
dm_state ? (dm_state->scaling != RMX_OFF) : false); dm_state ? (dm_state->scaling != RMX_OFF) : false);
} }
drm_mode_set_crtcinfo(&mode, 0);
fill_stream_properties_from_drm_display_mode(stream, fill_stream_properties_from_drm_display_mode(stream,
&mode, &aconnector->base); &mode, &aconnector->base);
update_stream_scaling_settings(&mode, dm_state, stream); update_stream_scaling_settings(&mode, dm_state, stream);
...@@ -2457,6 +2458,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, ...@@ -2457,6 +2458,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
drm_connector, drm_connector,
aconnector->dc_sink); aconnector->dc_sink);
update_stream_signal(stream);
return stream; return stream;
} }
...@@ -2835,13 +2838,6 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector, ...@@ -2835,13 +2838,6 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
goto fail; goto fail;
} }
drm_mode_set_crtcinfo(mode, 0);
fill_stream_properties_from_drm_display_mode(stream, mode, connector);
stream->src.width = mode->hdisplay;
stream->src.height = mode->vdisplay;
stream->dst = stream->src;
dc_result = dc_validate_stream(adev->dm.dc, stream); dc_result = dc_validate_stream(adev->dm.dc, stream);
if (dc_result == DC_OK) if (dc_result == DC_OK)
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/******************************************************************************* /*******************************************************************************
* Private functions * Private functions
******************************************************************************/ ******************************************************************************/
static void update_stream_signal(struct dc_stream_state *stream) void update_stream_signal(struct dc_stream_state *stream)
{ {
struct dc_sink *dc_sink = stream->sink; struct dc_sink *dc_sink = stream->sink;
......
...@@ -239,6 +239,8 @@ enum surface_update_type dc_check_update_surfaces_for_stream( ...@@ -239,6 +239,8 @@ enum surface_update_type dc_check_update_surfaces_for_stream(
*/ */
struct dc_stream_state *dc_create_stream_for_sink(struct dc_sink *dc_sink); struct dc_stream_state *dc_create_stream_for_sink(struct dc_sink *dc_sink);
void update_stream_signal(struct dc_stream_state *stream);
void dc_stream_retain(struct dc_stream_state *dc_stream); void dc_stream_retain(struct dc_stream_state *dc_stream);
void dc_stream_release(struct dc_stream_state *dc_stream); void dc_stream_release(struct dc_stream_state *dc_stream);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment