Skip to content

Commit 8724d57

Browse files
ddavenport-chromiumrobclark
authored andcommitted
drm/msm/dpu: Remove unused function arguments
Several functions arguments in the resource manager are unused, so remove them. Signed-off-by: Drew Davenport <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent fb33c65 commit 8724d57

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ static int _dpu_rm_hw_blk_create(
144144
const struct dpu_mdss_cfg *cat,
145145
void __iomem *mmio,
146146
enum dpu_hw_blk_type type,
147-
uint32_t id,
148-
const void *hw_catalog_info)
147+
uint32_t id)
149148
{
150149
struct dpu_rm_hw_blk *blk;
151150
void *hw;
@@ -223,7 +222,7 @@ int dpu_rm_init(struct dpu_rm *rm,
223222
}
224223

225224
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);
227226
if (rc) {
228227
DPU_ERROR("failed: lm hw not available\n");
229228
goto fail;
@@ -244,7 +243,7 @@ int dpu_rm_init(struct dpu_rm *rm,
244243

245244
for (i = 0; i < cat->pingpong_count; i++) {
246245
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);
248247
if (rc) {
249248
DPU_ERROR("failed: pp hw not available\n");
250249
goto fail;
@@ -258,7 +257,7 @@ int dpu_rm_init(struct dpu_rm *rm,
258257
}
259258

260259
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);
262261
if (rc) {
263262
DPU_ERROR("failed: intf hw not available\n");
264263
goto fail;
@@ -267,7 +266,7 @@ int dpu_rm_init(struct dpu_rm *rm,
267266

268267
for (i = 0; i < cat->ctl_count; i++) {
269268
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);
271270
if (rc) {
272271
DPU_ERROR("failed: ctl hw not available\n");
273272
goto fail;
@@ -293,7 +292,6 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top)
293292
* pingpong
294293
* @rm: dpu resource manager handle
295294
* @enc_id: encoder id requesting for allocation
296-
* @reqs: proposed use case requirements
297295
* @lm: proposed layer mixer, function checks if lm, and all other hardwired
298296
* blocks connected to the lm (pp) is available and appropriate
299297
* @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)
305303
static bool _dpu_rm_check_lm_and_get_connected_blks(
306304
struct dpu_rm *rm,
307305
uint32_t enc_id,
308-
struct dpu_rm_requirements *reqs,
309306
struct dpu_rm_hw_blk *lm,
310307
struct dpu_rm_hw_blk **pp,
311308
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,
384381
lm[lm_count] = iter_i.blk;
385382

386383
if (!_dpu_rm_check_lm_and_get_connected_blks(
387-
rm, enc_id, reqs, lm[lm_count],
384+
rm, enc_id, lm[lm_count],
388385
&pp[lm_count], NULL))
389386
continue;
390387

@@ -399,7 +396,7 @@ static int _dpu_rm_reserve_lms(struct dpu_rm *rm, uint32_t enc_id,
399396
continue;
400397

401398
if (!_dpu_rm_check_lm_and_get_connected_blks(
402-
rm, enc_id, reqs, iter_j.blk,
399+
rm, enc_id, iter_j.blk,
403400
&pp[lm_count], iter_i.blk))
404401
continue;
405402

@@ -480,20 +477,19 @@ static int _dpu_rm_reserve_ctls(
480477
static int _dpu_rm_reserve_intf(
481478
struct dpu_rm *rm,
482479
uint32_t enc_id,
483-
uint32_t id,
484-
enum dpu_hw_blk_type type)
480+
uint32_t id)
485481
{
486482
struct dpu_rm_hw_iter iter;
487483
int ret = 0;
488484

489485
/* 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);
491487
while (_dpu_rm_get_hw_locked(rm, &iter)) {
492488
if (iter.blk->id != id)
493489
continue;
494490

495491
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);
497493
return -ENAVAIL;
498494
}
499495

@@ -504,7 +500,7 @@ static int _dpu_rm_reserve_intf(
504500

505501
/* Shouldn't happen since intfs are fixed at probe */
506502
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);
508504
return -EINVAL;
509505
}
510506

@@ -523,8 +519,7 @@ static int _dpu_rm_reserve_intf_related_hw(
523519
if (hw_res->intfs[i] == INTF_MODE_NONE)
524520
continue;
525521
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);
528523
if (ret)
529524
return ret;
530525
}
@@ -535,7 +530,6 @@ static int _dpu_rm_reserve_intf_related_hw(
535530
static int _dpu_rm_make_reservation(
536531
struct dpu_rm *rm,
537532
struct drm_encoder *enc,
538-
struct drm_crtc_state *crtc_state,
539533
struct dpu_rm_requirements *reqs)
540534
{
541535
int ret;
@@ -560,9 +554,7 @@ static int _dpu_rm_make_reservation(
560554
}
561555

562556
static int _dpu_rm_populate_requirements(
563-
struct dpu_rm *rm,
564557
struct drm_encoder *enc,
565-
struct drm_crtc_state *crtc_state,
566558
struct dpu_rm_requirements *reqs,
567559
struct msm_display_topology req_topology)
568560
{
@@ -621,14 +613,13 @@ int dpu_rm_reserve(
621613

622614
mutex_lock(&rm->rm_lock);
623615

624-
ret = _dpu_rm_populate_requirements(rm, enc, crtc_state, &reqs,
625-
topology);
616+
ret = _dpu_rm_populate_requirements(enc, &reqs, topology);
626617
if (ret) {
627618
DPU_ERROR("failed to populate hw requirements\n");
628619
goto end;
629620
}
630621

631-
ret = _dpu_rm_make_reservation(rm, enc, crtc_state, &reqs);
622+
ret = _dpu_rm_make_reservation(rm, enc, &reqs);
632623
if (ret) {
633624
DPU_ERROR("failed to reserve hw resources: %d\n", ret);
634625
_dpu_rm_release_reservation(rm, enc->base.id);

0 commit comments

Comments
 (0)