Skip to content

Commit f3c03be

Browse files
committed
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 <[email protected]> Reviewed-by: Imre Deak <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/904fa73ea9ea976185062eeb493a08ffc43ed27e.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 3b00b53 commit f3c03be

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

drivers/gpu/drm/display/drm_dp_helper.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,20 @@ int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
849849
}
850850
EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
851851

852+
/**
853+
* drm_dp_dpcd_clear_payload() - Clear the entire VC Payload ID table
854+
* @aux: DisplayPort AUX channel
855+
*
856+
* Clear the entire VC Payload ID table.
857+
*
858+
* Returns: 0 on success, negative error code on errors.
859+
*/
860+
int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux)
861+
{
862+
return drm_dp_dpcd_write_payload(aux, 0, 0, 0x3f);
863+
}
864+
EXPORT_SYMBOL(drm_dp_dpcd_clear_payload);
865+
852866
/**
853867
* drm_dp_dpcd_poll_act_handled() - Poll for ACT handled status
854868
* @aux: DisplayPort AUX channel

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3679,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
36793679
goto out_unlock;
36803680

36813681
/* Write reset payload */
3682-
drm_dp_dpcd_write_payload(mgr->aux, 0, 0, 0x3f);
3682+
drm_dp_dpcd_clear_payload(mgr->aux);
36833683

36843684
drm_dp_mst_queue_probe_work(mgr);
36853685

include/drm/display/drm_dp_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
569569

570570
int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
571571
int vcpid, u8 start_time_slot, u8 time_slot_count);
572+
int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux);
572573
int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
573574

574575
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,

0 commit comments

Comments
 (0)