mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
Revert "drm/amd/display: Return drm_connector from find_first_crtc_matching_connector"
This reverts commit ca2b37a1c2.
[WHY & HOW]
The writeback series cause a regression in thunderbolt display.
Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e4bd165fd5
commit
e4c4139bd2
|
|
@ -2679,7 +2679,7 @@ static int dm_suspend(void *handle)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct drm_connector *
|
struct amdgpu_dm_connector *
|
||||||
amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
||||||
struct drm_crtc *crtc)
|
struct drm_crtc *crtc)
|
||||||
{
|
{
|
||||||
|
|
@ -2692,7 +2692,7 @@ amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
||||||
crtc_from_state = new_con_state->crtc;
|
crtc_from_state = new_con_state->crtc;
|
||||||
|
|
||||||
if (crtc_from_state == crtc)
|
if (crtc_from_state == crtc)
|
||||||
return connector;
|
return to_amdgpu_dm_connector(connector);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -9393,7 +9393,6 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
|
||||||
* update changed items
|
* update changed items
|
||||||
*/
|
*/
|
||||||
struct amdgpu_crtc *acrtc = NULL;
|
struct amdgpu_crtc *acrtc = NULL;
|
||||||
struct drm_connector *connector = NULL;
|
|
||||||
struct amdgpu_dm_connector *aconnector = NULL;
|
struct amdgpu_dm_connector *aconnector = NULL;
|
||||||
struct drm_connector_state *drm_new_conn_state = NULL, *drm_old_conn_state = NULL;
|
struct drm_connector_state *drm_new_conn_state = NULL, *drm_old_conn_state = NULL;
|
||||||
struct dm_connector_state *dm_new_conn_state = NULL, *dm_old_conn_state = NULL;
|
struct dm_connector_state *dm_new_conn_state = NULL, *dm_old_conn_state = NULL;
|
||||||
|
|
@ -9403,8 +9402,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
|
||||||
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
|
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
|
||||||
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
|
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
|
||||||
acrtc = to_amdgpu_crtc(crtc);
|
acrtc = to_amdgpu_crtc(crtc);
|
||||||
connector = amdgpu_dm_find_first_crtc_matching_connector(state, crtc);
|
aconnector = amdgpu_dm_find_first_crtc_matching_connector(state, crtc);
|
||||||
aconnector = to_amdgpu_dm_connector(connector);
|
|
||||||
|
|
||||||
/* TODO This hack should go away */
|
/* TODO This hack should go away */
|
||||||
if (aconnector && enable) {
|
if (aconnector && enable) {
|
||||||
|
|
|
||||||
|
|
@ -834,7 +834,7 @@ struct dc_stream_state *
|
||||||
int dm_atomic_get_state(struct drm_atomic_state *state,
|
int dm_atomic_get_state(struct drm_atomic_state *state,
|
||||||
struct dm_atomic_state **dm_state);
|
struct dm_atomic_state **dm_state);
|
||||||
|
|
||||||
struct drm_connector *
|
struct amdgpu_dm_connector *
|
||||||
amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
|
||||||
struct drm_crtc *crtc);
|
struct drm_crtc *crtc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1500,16 +1500,14 @@ int pre_validate_dsc(struct drm_atomic_state *state,
|
||||||
int ind = find_crtc_index_in_state_by_stream(state, stream);
|
int ind = find_crtc_index_in_state_by_stream(state, stream);
|
||||||
|
|
||||||
if (ind >= 0) {
|
if (ind >= 0) {
|
||||||
struct drm_connector *connector;
|
|
||||||
struct amdgpu_dm_connector *aconnector;
|
struct amdgpu_dm_connector *aconnector;
|
||||||
struct drm_connector_state *drm_new_conn_state;
|
struct drm_connector_state *drm_new_conn_state;
|
||||||
struct dm_connector_state *dm_new_conn_state;
|
struct dm_connector_state *dm_new_conn_state;
|
||||||
struct dm_crtc_state *dm_old_crtc_state;
|
struct dm_crtc_state *dm_old_crtc_state;
|
||||||
|
|
||||||
connector =
|
aconnector =
|
||||||
amdgpu_dm_find_first_crtc_matching_connector(state,
|
amdgpu_dm_find_first_crtc_matching_connector(state,
|
||||||
state->crtcs[ind].ptr);
|
state->crtcs[ind].ptr);
|
||||||
aconnector = to_amdgpu_dm_connector(connector);
|
|
||||||
drm_new_conn_state =
|
drm_new_conn_state =
|
||||||
drm_atomic_get_new_connector_state(state,
|
drm_atomic_get_new_connector_state(state,
|
||||||
&aconnector->base);
|
&aconnector->base);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user