summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Kristóf <timur.kristof@gmail.com>2025-09-26 20:01:41 +0200
committerAlex Deucher <alexander.deucher@amd.com>2025-10-28 09:59:30 -0400
commit97010d773208c4b800e4af1063e58a97c056f40b (patch)
treea3e045c98fb8f835faf6cc71ec6353d2545c1c6d
parentf18719ef4bb7b0e48dee92703b01e16f6c0d6318 (diff)
drm/amd/display: Determine DVI-I connector type (v2)
DC determines the DRM connector type based on the signal type, which becomes problematic when a connector may support different signal types, such as DVI-I. With this patch, it is now determined according to the actual connector type for DVI-D and DVI-I connectors. Also set the HPD (hotplug detection) flag for DVI-I connectors to prevent regressing their digital functionality, which has been already working. A subsequent commit will also implement polling for DVI-I. v2: Only use connector type for DVI to prevent regressions for other signal types. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5b446e4000ef..9e260ca04e1e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8263,7 +8263,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
return 0;
}
-static int to_drm_connector_type(enum signal_type st)
+static int to_drm_connector_type(enum signal_type st, uint32_t connector_id)
{
switch (st) {
case SIGNAL_TYPE_HDMI_TYPE_A:
@@ -8279,6 +8279,10 @@ static int to_drm_connector_type(enum signal_type st)
return DRM_MODE_CONNECTOR_DisplayPort;
case SIGNAL_TYPE_DVI_DUAL_LINK:
case SIGNAL_TYPE_DVI_SINGLE_LINK:
+ if (connector_id == CONNECTOR_ID_SINGLE_LINK_DVII ||
+ connector_id == CONNECTOR_ID_DUAL_LINK_DVII)
+ return DRM_MODE_CONNECTOR_DVII;
+
return DRM_MODE_CONNECTOR_DVID;
case SIGNAL_TYPE_VIRTUAL:
return DRM_MODE_CONNECTOR_VIRTUAL;
@@ -8668,6 +8672,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
link->link_enc->features.dp_ycbcr420_supported ? true : false;
break;
case DRM_MODE_CONNECTOR_DVID:
+ case DRM_MODE_CONNECTOR_DVII:
aconnector->base.polled = DRM_CONNECTOR_POLL_HPD;
break;
default:
@@ -8871,7 +8876,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
goto out_free;
}
- connector_type = to_drm_connector_type(link->connector_signal);
+ connector_type = to_drm_connector_type(link->connector_signal, link->link_id.id);
res = drm_connector_init_with_ddc(
dm->ddev,