@@ -67,9 +67,6 @@ static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
67
67
68
68
static void drm_dp_mst_topology_put_port (struct drm_dp_mst_port * port );
69
69
70
- static int drm_dp_dpcd_write_payload (struct drm_dp_mst_topology_mgr * mgr ,
71
- int id , u8 start_slot , u8 num_slots );
72
-
73
70
static int drm_dp_send_dpcd_read (struct drm_dp_mst_topology_mgr * mgr ,
74
71
struct drm_dp_mst_port * port ,
75
72
int offset , int size , u8 * bytes );
@@ -3263,7 +3260,7 @@ EXPORT_SYMBOL(drm_dp_send_query_stream_enc_status);
3263
3260
static int drm_dp_create_payload_at_dfp (struct drm_dp_mst_topology_mgr * mgr ,
3264
3261
struct drm_dp_mst_atomic_payload * payload )
3265
3262
{
3266
- return drm_dp_dpcd_write_payload (mgr , payload -> vcpi , payload -> vc_start_slot ,
3263
+ return drm_dp_dpcd_write_payload (mgr -> aux , payload -> vcpi , payload -> vc_start_slot ,
3267
3264
payload -> time_slots );
3268
3265
}
3269
3266
@@ -3294,7 +3291,7 @@ static void drm_dp_destroy_payload_at_remote_and_dfp(struct drm_dp_mst_topology_
3294
3291
}
3295
3292
3296
3293
if (payload -> payload_allocation_status == DRM_DP_MST_PAYLOAD_ALLOCATION_DFP )
3297
- drm_dp_dpcd_write_payload (mgr , payload -> vcpi , payload -> vc_start_slot , 0 );
3294
+ drm_dp_dpcd_write_payload (mgr -> aux , payload -> vcpi , payload -> vc_start_slot , 0 );
3298
3295
}
3299
3296
3300
3297
/**
@@ -3682,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
3682
3679
goto out_unlock ;
3683
3680
3684
3681
/* Write reset payload */
3685
- drm_dp_dpcd_write_payload (mgr , 0 , 0 , 0x3f );
3682
+ drm_dp_dpcd_write_payload (mgr -> aux , 0 , 0 , 0x3f );
3686
3683
3687
3684
drm_dp_mst_queue_probe_work (mgr );
3688
3685
@@ -4679,49 +4676,6 @@ void drm_dp_mst_update_slots(struct drm_dp_mst_topology_state *mst_state, uint8_
4679
4676
}
4680
4677
EXPORT_SYMBOL (drm_dp_mst_update_slots );
4681
4678
4682
- static int drm_dp_dpcd_write_payload (struct drm_dp_mst_topology_mgr * mgr ,
4683
- int id , u8 start_slot , u8 num_slots )
4684
- {
4685
- u8 payload_alloc [3 ], status ;
4686
- int ret ;
4687
- int retries = 0 ;
4688
-
4689
- drm_dp_dpcd_writeb (mgr -> aux , DP_PAYLOAD_TABLE_UPDATE_STATUS ,
4690
- DP_PAYLOAD_TABLE_UPDATED );
4691
-
4692
- payload_alloc [0 ] = id ;
4693
- payload_alloc [1 ] = start_slot ;
4694
- payload_alloc [2 ] = num_slots ;
4695
-
4696
- ret = drm_dp_dpcd_write (mgr -> aux , DP_PAYLOAD_ALLOCATE_SET , payload_alloc , 3 );
4697
- if (ret != 3 ) {
4698
- drm_dbg_kms (mgr -> dev , "failed to write payload allocation %d\n" , ret );
4699
- goto fail ;
4700
- }
4701
-
4702
- retry :
4703
- ret = drm_dp_dpcd_readb (mgr -> aux , DP_PAYLOAD_TABLE_UPDATE_STATUS , & status );
4704
- if (ret < 0 ) {
4705
- drm_dbg_kms (mgr -> dev , "failed to read payload table status %d\n" , ret );
4706
- goto fail ;
4707
- }
4708
-
4709
- if (!(status & DP_PAYLOAD_TABLE_UPDATED )) {
4710
- retries ++ ;
4711
- if (retries < 20 ) {
4712
- usleep_range (10000 , 20000 );
4713
- goto retry ;
4714
- }
4715
- drm_dbg_kms (mgr -> dev , "status not set after read payload table status %d\n" ,
4716
- status );
4717
- ret = - EINVAL ;
4718
- goto fail ;
4719
- }
4720
- ret = 0 ;
4721
- fail :
4722
- return ret ;
4723
- }
4724
-
4725
4679
/**
4726
4680
* drm_dp_check_act_status() - Polls for ACT handled status.
4727
4681
* @mgr: manager to use
0 commit comments