mirror of
https://github.com/torvalds/linux.git
synced 2026-04-23 17:15:46 -04:00
Merge tag 'topic/amdgpu-dp2.0-mst-2021-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
UAPI Changes: Nope! Cross-subsystem Changes: drm_dp_update_payload_part1() takes a new argument for specifying what the VCPI slot start is Core Changes: Make the DP MST helpers aware of the current starting VCPI slot/VCPI total slot count... Driver Changes: ...and then add support for taking advantage of this for 128b/132b links on DP 2.0 for amdgpu Signed-off-by: Dave Airlie <airlied@redhat.com> From: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/bf8e724cc0c8803d58a8d730fd6883c991376a76.camel@redhat.com
This commit is contained in:
@@ -10669,6 +10669,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
struct dm_crtc_state *dm_old_crtc_state;
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
struct dsc_mst_fairness_vars vars[MAX_PIPES];
|
||||
struct drm_dp_mst_topology_state *mst_state;
|
||||
struct drm_dp_mst_topology_mgr *mgr;
|
||||
#endif
|
||||
|
||||
trace_amdgpu_dm_atomic_check_begin(state);
|
||||
@@ -10873,6 +10875,33 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
lock_and_validation_needed = true;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
/* set the slot info for each mst_state based on the link encoding format */
|
||||
for_each_new_mst_mgr_in_state(state, mgr, mst_state, i) {
|
||||
struct amdgpu_dm_connector *aconnector;
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_list_iter iter;
|
||||
u8 link_coding_cap;
|
||||
|
||||
if (!mgr->mst_state )
|
||||
continue;
|
||||
|
||||
drm_connector_list_iter_begin(dev, &iter);
|
||||
drm_for_each_connector_iter(connector, &iter) {
|
||||
int id = connector->index;
|
||||
|
||||
if (id == mst_state->mgr->conn_base_id) {
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
|
||||
drm_dp_mst_update_slots(mst_state, link_coding_cap);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
drm_connector_list_iter_end(&iter);
|
||||
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* Streams and planes are reset when there are changes that affect
|
||||
* bandwidth. Anything that affects bandwidth needs to go through
|
||||
|
||||
@@ -294,6 +294,9 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
|
||||
case LINK_RATE_RBR2:
|
||||
case LINK_RATE_HIGH2:
|
||||
case LINK_RATE_HIGH3:
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
case LINK_RATE_UHBR10:
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
valid_input = false;
|
||||
|
||||
@@ -219,6 +219,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
|
||||
struct drm_dp_mst_topology_mgr *mst_mgr;
|
||||
struct drm_dp_mst_port *mst_port;
|
||||
bool ret;
|
||||
u8 link_coding_cap = DP_8b_10b_ENCODING;
|
||||
|
||||
aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
|
||||
/* Accessing the connector state is required for vcpi_slots allocation
|
||||
@@ -238,6 +239,10 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
|
||||
|
||||
mst_port = aconnector->port;
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
|
||||
#endif
|
||||
|
||||
if (enable) {
|
||||
|
||||
ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port,
|
||||
@@ -251,7 +256,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
|
||||
}
|
||||
|
||||
/* It's OK for this to fail */
|
||||
drm_dp_update_payload_part1(mst_mgr);
|
||||
drm_dp_update_payload_part1(mst_mgr, (link_coding_cap == DP_CAP_ANSI_128B132B) ? 0:1);
|
||||
|
||||
/* mst_mgr->->payloads are VC payload notify MST branch using DPCD or
|
||||
* AUX message. The sequence is slot 1-63 allocated sequence for each
|
||||
|
||||
Reference in New Issue
Block a user