mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 18:42:25 -04:00
drm/amdgpu/display/mst: adjust the naming of mst_port and port of aconnector
[why & how] The term (i.e. port & mst_port) that we used to use in amdgpu is a bit confusing. Rename them to mst_output_port & mst_root respectively. Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -2233,7 +2233,7 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend)
|
||||
drm_for_each_connector_iter(connector, &iter) {
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
if (aconnector->dc_link->type != dc_connection_mst_branch ||
|
||||
aconnector->mst_port)
|
||||
aconnector->mst_root)
|
||||
continue;
|
||||
|
||||
mgr = &aconnector->mst_mgr;
|
||||
@@ -6628,11 +6628,11 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
|
||||
int clock, bpp = 0;
|
||||
bool is_y420 = false;
|
||||
|
||||
if (!aconnector->port || !aconnector->dc_sink)
|
||||
if (!aconnector->mst_output_port || !aconnector->dc_sink)
|
||||
return 0;
|
||||
|
||||
mst_port = aconnector->port;
|
||||
mst_mgr = &aconnector->mst_port->mst_mgr;
|
||||
mst_port = aconnector->mst_output_port;
|
||||
mst_mgr = &aconnector->mst_root->mst_mgr;
|
||||
|
||||
if (!crtc_state->connectors_changed && !crtc_state->mode_changed)
|
||||
return 0;
|
||||
@@ -6642,7 +6642,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
|
||||
return PTR_ERR(mst_state);
|
||||
|
||||
if (!mst_state->pbn_div)
|
||||
mst_state->pbn_div = dm_mst_get_pbn_divider(aconnector->mst_port->dc_link);
|
||||
mst_state->pbn_div = dm_mst_get_pbn_divider(aconnector->mst_root->dc_link);
|
||||
|
||||
if (!state->duplicated) {
|
||||
int max_bpc = conn_state->max_requested_bpc;
|
||||
@@ -6688,7 +6688,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
|
||||
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
|
||||
if (!aconnector->port)
|
||||
if (!aconnector->mst_output_port)
|
||||
continue;
|
||||
|
||||
if (!new_con_state || !new_con_state->crtc)
|
||||
@@ -6728,7 +6728,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
|
||||
dm_conn_state->pbn = pbn;
|
||||
dm_conn_state->vcpi_slots = slot_num;
|
||||
|
||||
ret = drm_dp_mst_atomic_enable_dsc(state, aconnector->port,
|
||||
ret = drm_dp_mst_atomic_enable_dsc(state, aconnector->mst_output_port,
|
||||
dm_conn_state->pbn, false);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -6736,7 +6736,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
|
||||
continue;
|
||||
}
|
||||
|
||||
vcpi = drm_dp_mst_atomic_enable_dsc(state, aconnector->port, pbn, true);
|
||||
vcpi = drm_dp_mst_atomic_enable_dsc(state, aconnector->mst_output_port, pbn, true);
|
||||
if (vcpi < 0)
|
||||
return vcpi;
|
||||
|
||||
@@ -7150,7 +7150,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
|
||||
adev->mode_info.underscan_vborder_property,
|
||||
0);
|
||||
|
||||
if (!aconnector->mst_port)
|
||||
if (!aconnector->mst_root)
|
||||
drm_connector_attach_max_bpc_property(&aconnector->base, 8, 16);
|
||||
|
||||
/* This defaults to the max in the range, but we want 8bpc for non-edp. */
|
||||
@@ -7168,7 +7168,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
|
||||
connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||
drm_connector_attach_hdr_output_metadata_property(&aconnector->base);
|
||||
|
||||
if (!aconnector->mst_port)
|
||||
if (!aconnector->mst_root)
|
||||
drm_connector_attach_vrr_capable_property(&aconnector->base);
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_HDCP
|
||||
@@ -9635,7 +9635,7 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm
|
||||
continue;
|
||||
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
if (!aconnector->port || !aconnector->mst_port)
|
||||
if (!aconnector->mst_output_port || !aconnector->mst_root)
|
||||
aconnector = NULL;
|
||||
else
|
||||
break;
|
||||
@@ -9644,7 +9644,7 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm
|
||||
if (!aconnector)
|
||||
return 0;
|
||||
|
||||
return drm_dp_mst_add_affected_dsc_crtcs(state, &aconnector->mst_port->mst_mgr);
|
||||
return drm_dp_mst_add_affected_dsc_crtcs(state, &aconnector->mst_root->mst_mgr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user