@@ -144,8 +144,7 @@ static int _dpu_rm_hw_blk_create(
144
144
const struct dpu_mdss_cfg * cat ,
145
145
void __iomem * mmio ,
146
146
enum dpu_hw_blk_type type ,
147
- uint32_t id ,
148
- const void * hw_catalog_info )
147
+ uint32_t id )
149
148
{
150
149
struct dpu_rm_hw_blk * blk ;
151
150
void * hw ;
@@ -223,7 +222,7 @@ int dpu_rm_init(struct dpu_rm *rm,
223
222
}
224
223
225
224
rc = _dpu_rm_hw_blk_create (rm , cat , mmio , DPU_HW_BLK_LM ,
226
- cat -> mixer [i ].id , & cat -> mixer [ i ] );
225
+ cat -> mixer [i ].id );
227
226
if (rc ) {
228
227
DPU_ERROR ("failed: lm hw not available\n" );
229
228
goto fail ;
@@ -244,7 +243,7 @@ int dpu_rm_init(struct dpu_rm *rm,
244
243
245
244
for (i = 0 ; i < cat -> pingpong_count ; i ++ ) {
246
245
rc = _dpu_rm_hw_blk_create (rm , cat , mmio , DPU_HW_BLK_PINGPONG ,
247
- cat -> pingpong [i ].id , & cat -> pingpong [ i ] );
246
+ cat -> pingpong [i ].id );
248
247
if (rc ) {
249
248
DPU_ERROR ("failed: pp hw not available\n" );
250
249
goto fail ;
@@ -258,7 +257,7 @@ int dpu_rm_init(struct dpu_rm *rm,
258
257
}
259
258
260
259
rc = _dpu_rm_hw_blk_create (rm , cat , mmio , DPU_HW_BLK_INTF ,
261
- cat -> intf [i ].id , & cat -> intf [ i ] );
260
+ cat -> intf [i ].id );
262
261
if (rc ) {
263
262
DPU_ERROR ("failed: intf hw not available\n" );
264
263
goto fail ;
@@ -267,7 +266,7 @@ int dpu_rm_init(struct dpu_rm *rm,
267
266
268
267
for (i = 0 ; i < cat -> ctl_count ; i ++ ) {
269
268
rc = _dpu_rm_hw_blk_create (rm , cat , mmio , DPU_HW_BLK_CTL ,
270
- cat -> ctl [i ].id , & cat -> ctl [ i ] );
269
+ cat -> ctl [i ].id );
271
270
if (rc ) {
272
271
DPU_ERROR ("failed: ctl hw not available\n" );
273
272
goto fail ;
@@ -293,7 +292,6 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top)
293
292
* pingpong
294
293
* @rm: dpu resource manager handle
295
294
* @enc_id: encoder id requesting for allocation
296
- * @reqs: proposed use case requirements
297
295
* @lm: proposed layer mixer, function checks if lm, and all other hardwired
298
296
* blocks connected to the lm (pp) is available and appropriate
299
297
* @pp: output parameter, pingpong block attached to the layer mixer.
@@ -305,7 +303,6 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top)
305
303
static bool _dpu_rm_check_lm_and_get_connected_blks (
306
304
struct dpu_rm * rm ,
307
305
uint32_t enc_id ,
308
- struct dpu_rm_requirements * reqs ,
309
306
struct dpu_rm_hw_blk * lm ,
310
307
struct dpu_rm_hw_blk * * pp ,
311
308
struct dpu_rm_hw_blk * primary_lm )
@@ -384,7 +381,7 @@ static int _dpu_rm_reserve_lms(struct dpu_rm *rm, uint32_t enc_id,
384
381
lm [lm_count ] = iter_i .blk ;
385
382
386
383
if (!_dpu_rm_check_lm_and_get_connected_blks (
387
- rm , enc_id , reqs , lm [lm_count ],
384
+ rm , enc_id , lm [lm_count ],
388
385
& pp [lm_count ], NULL ))
389
386
continue ;
390
387
@@ -399,7 +396,7 @@ static int _dpu_rm_reserve_lms(struct dpu_rm *rm, uint32_t enc_id,
399
396
continue ;
400
397
401
398
if (!_dpu_rm_check_lm_and_get_connected_blks (
402
- rm , enc_id , reqs , iter_j .blk ,
399
+ rm , enc_id , iter_j .blk ,
403
400
& pp [lm_count ], iter_i .blk ))
404
401
continue ;
405
402
@@ -480,20 +477,19 @@ static int _dpu_rm_reserve_ctls(
480
477
static int _dpu_rm_reserve_intf (
481
478
struct dpu_rm * rm ,
482
479
uint32_t enc_id ,
483
- uint32_t id ,
484
- enum dpu_hw_blk_type type )
480
+ uint32_t id )
485
481
{
486
482
struct dpu_rm_hw_iter iter ;
487
483
int ret = 0 ;
488
484
489
485
/* Find the block entry in the rm, and note the reservation */
490
- dpu_rm_init_hw_iter (& iter , 0 , type );
486
+ dpu_rm_init_hw_iter (& iter , 0 , DPU_HW_BLK_INTF );
491
487
while (_dpu_rm_get_hw_locked (rm , & iter )) {
492
488
if (iter .blk -> id != id )
493
489
continue ;
494
490
495
491
if (RESERVED_BY_OTHER (iter .blk , enc_id )) {
496
- DPU_ERROR ("type %d id %d already reserved\n" , type , id );
492
+ DPU_ERROR ("intf id %d already reserved\n" , id );
497
493
return - ENAVAIL ;
498
494
}
499
495
@@ -504,7 +500,7 @@ static int _dpu_rm_reserve_intf(
504
500
505
501
/* Shouldn't happen since intfs are fixed at probe */
506
502
if (!iter .hw ) {
507
- DPU_ERROR ("couldn't find type %d id %d\n" , type , id );
503
+ DPU_ERROR ("couldn't find intf id %d\n" , id );
508
504
return - EINVAL ;
509
505
}
510
506
@@ -523,8 +519,7 @@ static int _dpu_rm_reserve_intf_related_hw(
523
519
if (hw_res -> intfs [i ] == INTF_MODE_NONE )
524
520
continue ;
525
521
id = i + INTF_0 ;
526
- ret = _dpu_rm_reserve_intf (rm , enc_id , id ,
527
- DPU_HW_BLK_INTF );
522
+ ret = _dpu_rm_reserve_intf (rm , enc_id , id );
528
523
if (ret )
529
524
return ret ;
530
525
}
@@ -535,7 +530,6 @@ static int _dpu_rm_reserve_intf_related_hw(
535
530
static int _dpu_rm_make_reservation (
536
531
struct dpu_rm * rm ,
537
532
struct drm_encoder * enc ,
538
- struct drm_crtc_state * crtc_state ,
539
533
struct dpu_rm_requirements * reqs )
540
534
{
541
535
int ret ;
@@ -560,9 +554,7 @@ static int _dpu_rm_make_reservation(
560
554
}
561
555
562
556
static int _dpu_rm_populate_requirements (
563
- struct dpu_rm * rm ,
564
557
struct drm_encoder * enc ,
565
- struct drm_crtc_state * crtc_state ,
566
558
struct dpu_rm_requirements * reqs ,
567
559
struct msm_display_topology req_topology )
568
560
{
@@ -621,14 +613,13 @@ int dpu_rm_reserve(
621
613
622
614
mutex_lock (& rm -> rm_lock );
623
615
624
- ret = _dpu_rm_populate_requirements (rm , enc , crtc_state , & reqs ,
625
- topology );
616
+ ret = _dpu_rm_populate_requirements (enc , & reqs , topology );
626
617
if (ret ) {
627
618
DPU_ERROR ("failed to populate hw requirements\n" );
628
619
goto end ;
629
620
}
630
621
631
- ret = _dpu_rm_make_reservation (rm , enc , crtc_state , & reqs );
622
+ ret = _dpu_rm_make_reservation (rm , enc , & reqs );
632
623
if (ret ) {
633
624
DPU_ERROR ("failed to reserve hw resources: %d\n" , ret );
634
625
_dpu_rm_release_reservation (rm , enc -> base .id );
0 commit comments