Commit cb841d27 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Always pass connector_state to stream validation

We need the connector_state for colorspace and scaling information
and can get it from connector->state.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarJoshua Ashton <joshua@froggi.es>

Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Vitaly.Prosyak@amd.com
Cc: Joshua Ashton <joshua@froggi.es>
Cc: Simon Ser <contact@emersion.fr>
Cc: Melissa Wen <mwen@igalia.com>
Cc: dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c265f340
...@@ -5955,15 +5955,14 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, ...@@ -5955,15 +5955,14 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
{ {
struct drm_display_mode *preferred_mode = NULL; struct drm_display_mode *preferred_mode = NULL;
struct drm_connector *drm_connector; struct drm_connector *drm_connector;
const struct drm_connector_state *con_state = const struct drm_connector_state *con_state = &dm_state->base;
dm_state ? &dm_state->base : NULL;
struct dc_stream_state *stream = NULL; struct dc_stream_state *stream = NULL;
struct drm_display_mode mode; struct drm_display_mode mode;
struct drm_display_mode saved_mode; struct drm_display_mode saved_mode;
struct drm_display_mode *freesync_mode = NULL; struct drm_display_mode *freesync_mode = NULL;
bool native_mode_found = false; bool native_mode_found = false;
bool recalculate_timing = false; bool recalculate_timing = false;
bool scale = dm_state ? (dm_state->scaling != RMX_OFF) : false; bool scale = dm_state->scaling != RMX_OFF;
int mode_refresh; int mode_refresh;
int preferred_refresh = 0; int preferred_refresh = 0;
enum color_transfer_func tf = TRANSFER_FUNC_UNKNOWN; enum color_transfer_func tf = TRANSFER_FUNC_UNKNOWN;
...@@ -6605,7 +6604,9 @@ enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connec ...@@ -6605,7 +6604,9 @@ enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connec
goto fail; goto fail;
} }
stream = create_validate_stream_for_sink(aconnector, mode, NULL, NULL); stream = create_validate_stream_for_sink(aconnector, mode,
to_dm_connector_state(connector->state),
NULL);
if (stream) { if (stream) {
dc_stream_release(stream); dc_stream_release(stream);
result = MODE_OK; result = MODE_OK;
......
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