@@ -3429,6 +3429,12 @@ int drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr,
}
EXPORT_SYMBOL(drm_dp_add_payload_part2);
+int drm_dp_mst_reset_payload_table(struct drm_dp_mst_topology_mgr *mgr)
+{
+ return drm_dp_dpcd_write_payload(mgr, 0, 0, DP_PAYLOAD_TABLE_SIZE - 1);
+}
+EXPORT_SYMBOL(drm_dp_mst_reset_payload_table);
+
/**
* drm_dp_mst_has_payload_alloc_errors - Query for payload allocation errors
* @mst_state: The MST atomic state
@@ -3699,7 +3705,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
goto out_unlock;
/* Write reset payload */
- drm_dp_dpcd_write_payload(mgr, 0, 0, 0x3f);
+ drm_dp_mst_reset_payload_table(mgr);
queue_work(system_long_wq, &mgr->work);
@@ -845,6 +845,7 @@ void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_mst_topology_state *mst_state,
const struct drm_dp_mst_atomic_payload *old_payload,
struct drm_dp_mst_atomic_payload *new_payload);
+int drm_dp_mst_reset_payload_table(struct drm_dp_mst_topology_mgr *mgr);
bool drm_dp_mst_has_payload_alloc_errors(const struct drm_dp_mst_topology_state *mst_state);
int drm_dp_mst_payload_vchannel(const struct drm_dp_mst_topology_state *mst_state,
const struct drm_dp_mst_atomic_payload *payload);
A follow-up patch adds a workaround for a payload allocation problem in a DELL monitor. For this the driver needs to reset the payload table in the monitor's MST hub, factor out a helper to do this. While at it use DP_PAYLOAD_TABLE_SIZE in the reset command, instead of open coding it. Cc: Lyude Paul <lyude@redhat.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Imre Deak <imre.deak@intel.com> --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 8 +++++++- include/drm/display/drm_dp_mst_helper.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)