drm/dp: extract drm_dp_dpcd_clear_payload()

SST with 128b/132b channel coding needs this too. Extract to a separate
helper, independent of MST.

Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/904fa73ea9ea976185062eeb493a08ffc43ed27e.1733238941.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula
2024-12-03 17:17:10 +02:00
parent 3b00b53afe
commit f3c03be182
3 changed files with 16 additions and 1 deletions

View File

@@ -849,6 +849,20 @@ fail:
}
EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
/**
* drm_dp_dpcd_clear_payload() - Clear the entire VC Payload ID table
* @aux: DisplayPort AUX channel
*
* Clear the entire VC Payload ID table.
*
* Returns: 0 on success, negative error code on errors.
*/
int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux)
{
return drm_dp_dpcd_write_payload(aux, 0, 0, 0x3f);
}
EXPORT_SYMBOL(drm_dp_dpcd_clear_payload);
/**
* drm_dp_dpcd_poll_act_handled() - Poll for ACT handled status
* @aux: DisplayPort AUX channel

View File

@@ -3679,7 +3679,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->aux, 0, 0, 0x3f);
drm_dp_dpcd_clear_payload(mgr->aux);
drm_dp_mst_queue_probe_work(mgr);

View File

@@ -569,6 +569,7 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
int vcpid, u8 start_time_slot, u8 time_slot_count);
int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux);
int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,