From c389a8716f3b798cf1b1cb274846bc9966fe1b70 Mon Sep 17 00:00:00 2001 From: Mykola Lysenko Date: Tue, 1 Dec 2015 19:31:57 +0800 Subject: [PATCH 0546/1110] drm/amd/dal: temporary fix in headless processing code for MST We cannot rely in function aconnector_from_drm_crtc_id for crtc_id to be equal to connector_id. It is not the case anymore. Because of that there was a segfault: 1. Pageflip atomic commit; 2. No connector provided in state, so aconnector is NULL; 3. Incorrect physical MST connector selected in handle_headless_hotplug, and set mode is scheduled for it; 4. Segfault because there is no modes exist on this connector. We need to revisit handle_headless_hotplug logic, and retest them. Signed-off-by: Harry Wentland Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c index 90bb0d2..7990a48 100644 --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c @@ -556,8 +556,7 @@ struct amdgpu_connector *aconnector_from_drm_crtc_id( aconnector = to_amdgpu_connector(connector); - /* acrtc->crtc_id means display_index */ - if (aconnector->connector_id != acrtc->crtc_id) + if (aconnector->base.state->crtc != &acrtc->base) continue; /* Found the connector */ -- 2.7.4