mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: Revert "drm/amd/display: turn DPMS off on connector unplug"
This reverts commit 3c4d55c9b9.
Revert the commit because:
- It's incomplete of the function dm_set_dpms_off() for mst case. For
stream sinks whithin the same mst topology, they share the same dc_link.
dm_set_dpms_off() tries to update one mst stream only which is
incomplete.
- Setting dpms off should be triggered by usermode. Besdies, it seems
usermode does release relevant resource for mst & non-mst case when
unplug connecotr now.
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Aurabindo Jayamohanan Pillai <Aurabindo.Pillai@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -2583,33 +2583,6 @@ cleanup:
|
||||
return;
|
||||
}
|
||||
|
||||
static void dm_set_dpms_off(struct dc_link *link)
|
||||
{
|
||||
struct dc_stream_state *stream_state;
|
||||
struct amdgpu_dm_connector *aconnector = link->priv;
|
||||
struct amdgpu_device *adev = drm_to_adev(aconnector->base.dev);
|
||||
struct dc_stream_update stream_update;
|
||||
bool dpms_off = true;
|
||||
|
||||
memset(&stream_update, 0, sizeof(stream_update));
|
||||
stream_update.dpms_off = &dpms_off;
|
||||
|
||||
mutex_lock(&adev->dm.dc_lock);
|
||||
stream_state = dc_stream_find_from_link(link);
|
||||
|
||||
if (stream_state == NULL) {
|
||||
DRM_DEBUG_DRIVER("Error finding stream state associated with link!\n");
|
||||
mutex_unlock(&adev->dm.dc_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
stream_update.stream = stream_state;
|
||||
dc_commit_updates_for_stream(stream_state->ctx->dc, NULL, 0,
|
||||
stream_state, &stream_update,
|
||||
stream_state->ctx->dc->current_state);
|
||||
mutex_unlock(&adev->dm.dc_lock);
|
||||
}
|
||||
|
||||
static int dm_resume(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = handle;
|
||||
@@ -3096,10 +3069,6 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
|
||||
drm_kms_helper_connector_hotplug_event(connector);
|
||||
|
||||
} else if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
|
||||
if (new_connection_type == dc_connection_none &&
|
||||
aconnector->dc_link->type == dc_connection_none)
|
||||
dm_set_dpms_off(aconnector->dc_link);
|
||||
|
||||
amdgpu_dm_update_connector_after_detect(aconnector);
|
||||
|
||||
drm_modeset_lock_all(dev);
|
||||
|
||||
Reference in New Issue
Block a user