Skip to content

Commit 8c61b31

Browse files
Jerry (Fangzhi) Zuoalexdeucher
authored andcommitted
drm/amd/display: Avoid create MST prop after registration
[Why] Prop are created at boot stage, and not allowed to create new prop after device registration. [How] Reuse the connector property from SST if exist. Signed-off-by: Jerry (Fangzhi) Zuo <[email protected]> Reviewed-by: Hersen Wu <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8f0622a commit 8c61b31

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5929,7 +5929,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
59295929
adev->mode_info.underscan_vborder_property,
59305930
0);
59315931

5932-
drm_connector_attach_max_bpc_property(&aconnector->base, 8, 16);
5932+
if (!aconnector->mst_port)
5933+
drm_connector_attach_max_bpc_property(&aconnector->base, 8, 16);
59335934

59345935
/* This defaults to the max in the range, but we want 8bpc for non-edp. */
59355936
aconnector->base.state->max_bpc = (connector_type == DRM_MODE_CONNECTOR_eDP) ? 16 : 8;
@@ -5948,8 +5949,9 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
59485949
&aconnector->base.base,
59495950
dm->ddev->mode_config.hdr_output_metadata_property, 0);
59505951

5951-
drm_connector_attach_vrr_capable_property(
5952-
&aconnector->base);
5952+
if (!aconnector->mst_port)
5953+
drm_connector_attach_vrr_capable_property(&aconnector->base);
5954+
59535955
#ifdef CONFIG_DRM_AMD_DC_HDCP
59545956
if (adev->dm.hdcp_workqueue)
59555957
drm_connector_attach_content_protection_property(&aconnector->base, true);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,14 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
410410
drm_connector_attach_encoder(&aconnector->base,
411411
&aconnector->mst_encoder->base);
412412

413+
connector->max_bpc_property = master->base.max_bpc_property;
414+
if (connector->max_bpc_property)
415+
drm_connector_attach_max_bpc_property(connector, 8, 16);
416+
417+
connector->vrr_capable_property = master->base.vrr_capable_property;
418+
if (connector->vrr_capable_property)
419+
drm_connector_attach_vrr_capable_property(connector);
420+
413421
drm_object_attach_property(
414422
&connector->base,
415423
dev->mode_config.path_property,

0 commit comments

Comments
 (0)