Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dpu: stop declaring VBIFs as an array in catalog

The driver handles a single VBIF instance, VBIF_RT. Stop declaring VBIFs
as an array in the DPU hardware catalog.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/707774/
Link: https://lore.kernel.org/r/20260227-drop-vbif-nrt-v1-2-2b97d0438182@oss.qualcomm.com
[DB: handled Eliza platform]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

+87 -142
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h
··· 445 445 .cwb = sm8650_cwb, 446 446 .intf_count = ARRAY_SIZE(sm8650_intf), 447 447 .intf = sm8650_intf, 448 - .vbif_count = ARRAY_SIZE(sm8650_vbif), 449 - .vbif = sm8650_vbif, 448 + .vbif = &sm8650_vbif, 450 449 .perf = &sm8650_perf_data, 451 450 }; 452 451
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h
··· 486 486 .cwb = sm8650_cwb, 487 487 .intf_count = ARRAY_SIZE(sm8750_intf), 488 488 .intf = sm8750_intf, 489 - .vbif_count = ARRAY_SIZE(sm8650_vbif), 490 - .vbif = sm8650_vbif, 489 + .vbif = &sm8650_vbif, 491 490 .perf = &sm8750_perf_data, 492 491 }; 493 492
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h
··· 533 533 .cwb = sm8650_cwb, 534 534 .intf_count = ARRAY_SIZE(glymur_intf), 535 535 .intf = glymur_intf, 536 - .vbif_count = ARRAY_SIZE(sm8650_vbif), 537 - .vbif = sm8650_vbif, 536 + .vbif = &sm8650_vbif, 538 537 .perf = &glymur_perf_data, 539 538 }; 540 539
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_4_eliza.h
··· 357 357 .cwb = sm8650_cwb, 358 358 .intf_count = ARRAY_SIZE(eliza_intf), 359 359 .intf = eliza_intf, 360 - .vbif_count = ARRAY_SIZE(sm8650_vbif), 361 - .vbif = sm8650_vbif, 360 + .vbif = &sm8650_vbif, 362 361 .perf = &eliza_perf_data, 363 362 }; 364 363
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h
··· 484 484 .cwb = sm8650_cwb, 485 485 .intf_count = ARRAY_SIZE(kaanapali_intf), 486 486 .intf = kaanapali_intf, 487 - .vbif_count = ARRAY_SIZE(sm8650_vbif), 488 - .vbif = sm8650_vbif, 487 + .vbif = &sm8650_vbif, 489 488 .perf = &kaanapali_perf_data, 490 489 }; 491 490
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h
··· 197 197 .pingpong = msm8937_pp, 198 198 .intf_count = ARRAY_SIZE(msm8937_intf), 199 199 .intf = msm8937_intf, 200 - .vbif_count = ARRAY_SIZE(msm8996_vbif), 201 - .vbif = msm8996_vbif, 200 + .vbif = &msm8996_vbif, 202 201 .perf = &msm8937_perf_data, 203 202 }; 204 203
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h
··· 176 176 .pingpong = msm8917_pp, 177 177 .intf_count = ARRAY_SIZE(msm8917_intf), 178 178 .intf = msm8917_intf, 179 - .vbif_count = ARRAY_SIZE(msm8996_vbif), 180 - .vbif = msm8996_vbif, 179 + .vbif = &msm8996_vbif, 181 180 .perf = &msm8917_perf_data, 182 181 }; 183 182
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h
··· 204 204 .pingpong = msm8953_pp, 205 205 .intf_count = ARRAY_SIZE(msm8953_intf), 206 206 .intf = msm8953_intf, 207 - .vbif_count = ARRAY_SIZE(msm8996_vbif), 208 - .vbif = msm8996_vbif, 207 + .vbif = &msm8996_vbif, 209 208 .perf = &msm8953_perf_data, 210 209 }; 211 210
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h
··· 320 320 .dsc = msm8996_dsc, 321 321 .intf_count = ARRAY_SIZE(msm8996_intf), 322 322 .intf = msm8996_intf, 323 - .vbif_count = ARRAY_SIZE(msm8996_vbif), 324 - .vbif = msm8996_vbif, 323 + .vbif = &msm8996_vbif, 325 324 .perf = &msm8996_perf_data, 326 325 }; 327 326
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
··· 305 305 .dsc = msm8998_dsc, 306 306 .intf_count = ARRAY_SIZE(msm8998_intf), 307 307 .intf = msm8998_intf, 308 - .vbif_count = ARRAY_SIZE(msm8998_vbif), 309 - .vbif = msm8998_vbif, 308 + .vbif = &msm8998_vbif, 310 309 .perf = &msm8998_perf_data, 311 310 }; 312 311
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h
··· 269 269 .dsc = sdm660_dsc, 270 270 .intf_count = ARRAY_SIZE(sdm660_intf), 271 271 .intf = sdm660_intf, 272 - .vbif_count = ARRAY_SIZE(msm8998_vbif), 273 - .vbif = msm8998_vbif, 272 + .vbif = &msm8998_vbif, 274 273 .perf = &sdm660_perf_data, 275 274 }; 276 275
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h
··· 207 207 .pingpong = sdm630_pp, 208 208 .intf_count = ARRAY_SIZE(sdm630_intf), 209 209 .intf = sdm630_intf, 210 - .vbif_count = ARRAY_SIZE(msm8998_vbif), 211 - .vbif = msm8998_vbif, 210 + .vbif = &msm8998_vbif, 212 211 .perf = &sdm630_perf_data, 213 212 }; 214 213
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
··· 325 325 .dsc = sdm845_dsc, 326 326 .intf_count = ARRAY_SIZE(sdm845_intf), 327 327 .intf = sdm845_intf, 328 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 329 - .vbif = sdm845_vbif, 328 + .vbif = &sdm845_vbif, 330 329 .perf = &sdm845_perf_data, 331 330 }; 332 331
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h
··· 144 144 .dsc = sdm670_dsc, 145 145 .intf_count = ARRAY_SIZE(sdm845_intf), 146 146 .intf = sdm845_intf, 147 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 148 - .vbif = sdm845_vbif, 147 + .vbif = &sdm845_vbif, 149 148 .perf = &sdm845_perf_data, 150 149 }; 151 150
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
··· 381 381 .wb = sm8150_wb, 382 382 .intf_count = ARRAY_SIZE(sm8150_intf), 383 383 .intf = sm8150_intf, 384 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 385 - .vbif = sdm845_vbif, 384 + .vbif = &sdm845_vbif, 386 385 .perf = &sm8150_perf_data, 387 386 }; 388 387
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h
··· 405 405 .wb = sc8180x_wb, 406 406 .intf_count = ARRAY_SIZE(sc8180x_intf), 407 407 .intf = sc8180x_intf, 408 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 409 - .vbif = sdm845_vbif, 408 + .vbif = &sdm845_vbif, 410 409 .perf = &sc8180x_perf_data, 411 410 }; 412 411
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h
··· 309 309 .intf = sm7150_intf, 310 310 .wb_count = ARRAY_SIZE(sm7150_wb), 311 311 .wb = sm7150_wb, 312 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 313 - .vbif = sdm845_vbif, 312 + .vbif = &sdm845_vbif, 314 313 .perf = &sm7150_perf_data, 315 314 }; 316 315
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h
··· 246 246 .wb = sm6150_wb, 247 247 .intf_count = ARRAY_SIZE(sm6150_intf), 248 248 .intf = sm6150_intf, 249 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 250 - .vbif = sdm845_vbif, 249 + .vbif = &sdm845_vbif, 251 250 .perf = &sm6150_perf_data, 252 251 }; 253 252
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h
··· 217 217 .wb = sm6125_wb, 218 218 .intf_count = ARRAY_SIZE(sm6125_intf), 219 219 .intf = sm6125_intf, 220 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 221 - .vbif = sdm845_vbif, 220 + .vbif = &sdm845_vbif, 222 221 .perf = &sm6125_perf_data, 223 222 }; 224 223
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
··· 378 378 .merge_3d = sm8250_merge_3d, 379 379 .intf_count = ARRAY_SIZE(sm8250_intf), 380 380 .intf = sm8250_intf, 381 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 382 - .vbif = sdm845_vbif, 381 + .vbif = &sdm845_vbif, 383 382 .wb_count = ARRAY_SIZE(sm8250_wb), 384 383 .wb = sm8250_wb, 385 384 .perf = &sm8250_perf_data,
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h
··· 211 211 .intf = sc7180_intf, 212 212 .wb_count = ARRAY_SIZE(sc7180_wb), 213 213 .wb = sc7180_wb, 214 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 215 - .vbif = sdm845_vbif, 214 + .vbif = &sdm845_vbif, 216 215 .perf = &sc7180_perf_data, 217 216 }; 218 217
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
··· 144 144 .pingpong = sm6115_pp, 145 145 .intf_count = ARRAY_SIZE(sm6115_intf), 146 146 .intf = sm6115_intf, 147 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 148 - .vbif = sdm845_vbif, 147 + .vbif = &sdm845_vbif, 149 148 .perf = &sm6115_perf_data, 150 149 }; 151 150
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h
··· 229 229 .wb = sm6350_wb, 230 230 .intf_count = ARRAY_SIZE(sm6350_intf), 231 231 .intf = sm6350_intf, 232 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 233 - .vbif = sdm845_vbif, 232 + .vbif = &sdm845_vbif, 234 233 .perf = &sm6350_perf_data, 235 234 }; 236 235
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h
··· 137 137 .pingpong = qcm2290_pp, 138 138 .intf_count = ARRAY_SIZE(qcm2290_intf), 139 139 .intf = qcm2290_intf, 140 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 141 - .vbif = sdm845_vbif, 140 + .vbif = &sdm845_vbif, 142 141 .perf = &qcm2290_perf_data, 143 142 }; 144 143
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h
··· 155 155 .pingpong = sm6375_pp, 156 156 .intf_count = ARRAY_SIZE(sm6375_intf), 157 157 .intf = sm6375_intf, 158 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 159 - .vbif = sdm845_vbif, 158 + .vbif = &sdm845_vbif, 160 159 .perf = &sm6375_perf_data, 161 160 }; 162 161
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h
··· 392 392 .wb = sm8350_wb, 393 393 .intf_count = ARRAY_SIZE(sm8350_intf), 394 394 .intf = sm8350_intf, 395 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 396 - .vbif = sdm845_vbif, 395 + .vbif = &sdm845_vbif, 397 396 .perf = &sm8350_perf_data, 398 397 }; 399 398
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
··· 263 263 .wb = sc7280_wb, 264 264 .intf_count = ARRAY_SIZE(sc7280_intf), 265 265 .intf = sc7280_intf, 266 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 267 - .vbif = sdm845_vbif, 266 + .vbif = &sdm845_vbif, 268 267 .perf = &sc7280_perf_data, 269 268 }; 270 269
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h
··· 421 421 .merge_3d = sc8280xp_merge_3d, 422 422 .intf_count = ARRAY_SIZE(sc8280xp_intf), 423 423 .intf = sc8280xp_intf, 424 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 425 - .vbif = sdm845_vbif, 424 + .vbif = &sdm845_vbif, 426 425 .perf = &sc8280xp_perf_data, 427 426 }; 428 427
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h
··· 405 405 .wb = sm8450_wb, 406 406 .intf_count = ARRAY_SIZE(sm8450_intf), 407 407 .intf = sm8450_intf, 408 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 409 - .vbif = sdm845_vbif, 408 + .vbif = &sdm845_vbif, 410 409 .perf = &sm8450_perf_data, 411 410 }; 412 411
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h
··· 445 445 .wb = sa8775p_wb, 446 446 .intf_count = ARRAY_SIZE(sa8775p_intf), 447 447 .intf = sa8775p_intf, 448 - .vbif_count = ARRAY_SIZE(sdm845_vbif), 449 - .vbif = sdm845_vbif, 448 + .vbif = &sdm845_vbif, 450 449 .perf = &sa8775p_perf_data, 451 450 }; 452 451
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h
··· 400 400 .wb = sm8550_wb, 401 401 .intf_count = ARRAY_SIZE(sm8550_intf), 402 402 .intf = sm8550_intf, 403 - .vbif_count = ARRAY_SIZE(sm8550_vbif), 404 - .vbif = sm8550_vbif, 403 + .vbif = &sm8550_vbif, 405 404 .perf = &sm8550_perf_data, 406 405 }; 407 406
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h
··· 400 400 .wb = sar2130p_wb, 401 401 .intf_count = ARRAY_SIZE(sar2130p_intf), 402 402 .intf = sar2130p_intf, 403 - .vbif_count = ARRAY_SIZE(sm8550_vbif), 404 - .vbif = sm8550_vbif, 403 + .vbif = &sm8550_vbif, 405 404 .perf = &sar2130p_perf_data, 406 405 }; 407 406
+1 -2
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h
··· 441 441 .wb = x1e80100_wb, 442 442 .intf_count = ARRAY_SIZE(x1e80100_intf), 443 443 .intf = x1e80100_intf, 444 - .vbif_count = ARRAY_SIZE(sm8550_vbif), 445 - .vbif = sm8550_vbif, 444 + .vbif = &sm8550_vbif, 446 445 .perf = &x1e80100_perf_data, 447 446 }; 448 447
+5 -15
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
··· 513 513 }, 514 514 }; 515 515 516 - static const struct dpu_vbif_cfg msm8996_vbif[] = { 517 - { 516 + static const struct dpu_vbif_cfg msm8996_vbif = { 518 517 .name = "vbif_rt", .id = VBIF_RT, 519 518 .base = 0, .len = 0x1040, 520 519 .default_ot_rd_limit = 32, ··· 537 538 .npriority_lvl = ARRAY_SIZE(msm8998_nrt_pri_lvl), 538 539 .priority_lvl = msm8998_nrt_pri_lvl, 539 540 }, 540 - }, 541 541 }; 542 542 543 - static const struct dpu_vbif_cfg msm8998_vbif[] = { 544 - { 543 + static const struct dpu_vbif_cfg msm8998_vbif = { 545 544 .name = "vbif_rt", .id = VBIF_RT, 546 545 .base = 0, .len = 0x1040, 547 546 .default_ot_rd_limit = 32, ··· 565 568 }, 566 569 .memtype_count = 14, 567 570 .memtype = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 568 - }, 569 571 }; 570 572 571 - static const struct dpu_vbif_cfg sdm845_vbif[] = { 572 - { 573 + static const struct dpu_vbif_cfg sdm845_vbif = { 573 574 .name = "vbif_rt", .id = VBIF_RT, 574 575 .base = 0, .len = 0x1040, 575 576 .features = BIT(DPU_VBIF_QOS_REMAP), ··· 583 588 }, 584 589 .memtype_count = 14, 585 590 .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 586 - }, 587 591 }; 588 592 589 - static const struct dpu_vbif_cfg sm8550_vbif[] = { 590 - { 593 + static const struct dpu_vbif_cfg sm8550_vbif = { 591 594 .name = "vbif_rt", .id = VBIF_RT, 592 595 .base = 0, .len = 0x1040, 593 596 .features = BIT(DPU_VBIF_QOS_REMAP), ··· 601 608 }, 602 609 .memtype_count = 16, 603 610 .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 604 - }, 605 611 }; 606 612 607 - static const struct dpu_vbif_cfg sm8650_vbif[] = { 608 - { 613 + static const struct dpu_vbif_cfg sm8650_vbif = { 609 614 .name = "vbif_rt", .id = VBIF_RT, 610 615 .base = 0, .len = 0x1074, 611 616 .features = BIT(DPU_VBIF_QOS_REMAP), ··· 619 628 }, 620 629 .memtype_count = 16, 621 630 .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 622 - }, 623 631 }; 624 632 625 633 /*************************************************************
-1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
··· 743 743 u32 intf_count; 744 744 const struct dpu_intf_cfg *intf; 745 745 746 - u32 vbif_count; 747 746 const struct dpu_vbif_cfg *vbif; 748 747 749 748 u32 wb_count;
+14 -18
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
··· 1059 1059 dpu_kms->mmio + cat->cdm->base, 1060 1060 "%s", cat->cdm->name); 1061 1061 1062 - for (i = 0; i < dpu_kms->catalog->vbif_count; i++) { 1063 - const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i]; 1062 + const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif; 1064 1063 1065 - msm_disp_snapshot_add_block(disp_state, vbif->len, 1066 - dpu_kms->vbif[vbif->id] + vbif->base, 1067 - "%s", vbif->name); 1068 - } 1064 + msm_disp_snapshot_add_block(disp_state, vbif->len, 1065 + dpu_kms->vbif, 1066 + "vbif"); 1069 1067 1070 1068 pm_runtime_put_sync(&dpu_kms->pdev->dev); 1071 1069 } ··· 1141 1143 { 1142 1144 struct dpu_kms *dpu_kms; 1143 1145 struct drm_device *dev; 1144 - int i, rc = -EINVAL; 1146 + int rc = -EINVAL; 1145 1147 unsigned long max_core_clk_rate; 1146 1148 u32 core_rev; 1147 1149 ··· 1217 1219 goto err_pm_put; 1218 1220 } 1219 1221 1220 - for (i = 0; i < dpu_kms->catalog->vbif_count; i++) { 1221 - struct dpu_hw_vbif *hw; 1222 - const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i]; 1222 + struct dpu_hw_vbif *hw; 1223 + const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif; 1223 1224 1224 - hw = dpu_hw_vbif_init(dev, vbif, dpu_kms->vbif[vbif->id]); 1225 - if (IS_ERR(hw)) { 1226 - rc = PTR_ERR(hw); 1227 - DPU_ERROR("failed to init vbif %d: %d\n", vbif->id, rc); 1228 - goto err_pm_put; 1229 - } 1230 - 1231 - dpu_kms->hw_vbif[vbif->id] = hw; 1225 + hw = dpu_hw_vbif_init(dev, vbif, dpu_kms->vbif[vbif->id]); 1226 + if (IS_ERR(hw)) { 1227 + rc = PTR_ERR(hw); 1228 + DPU_ERROR("failed to init vbif: %d\n", rc); 1229 + goto err_pm_put; 1232 1230 } 1231 + 1232 + dpu_kms->hw_vbif[vbif->id] = hw; 1233 1233 1234 1234 /* TODO: use the same max_freq as in dpu_kms_hw_init */ 1235 1235 max_core_clk_rate = dpu_kms_get_clk_rate(dpu_kms, "core");
+35 -42
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
··· 292 292 293 293 void dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root) 294 294 { 295 + const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif; 295 296 char vbif_name[32]; 296 - struct dentry *entry, *debugfs_vbif; 297 - int i, j; 297 + struct dentry *debugfs_vbif; 298 + int j; 298 299 299 - entry = debugfs_create_dir("vbif", debugfs_root); 300 + debugfs_vbif = debugfs_create_dir("vbif", debugfs_root); 300 301 301 - for (i = 0; i < dpu_kms->catalog->vbif_count; i++) { 302 - const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i]; 302 + debugfs_create_u32("features", 0600, debugfs_vbif, 303 + (u32 *)&vbif->features); 303 304 304 - snprintf(vbif_name, sizeof(vbif_name), "%d", vbif->id); 305 + debugfs_create_u32("xin_halt_timeout", 0400, debugfs_vbif, 306 + (u32 *)&vbif->xin_halt_timeout); 305 307 306 - debugfs_vbif = debugfs_create_dir(vbif_name, entry); 308 + debugfs_create_u32("default_rd_ot_limit", 0400, debugfs_vbif, 309 + (u32 *)&vbif->default_ot_rd_limit); 307 310 308 - debugfs_create_u32("features", 0600, debugfs_vbif, 309 - (u32 *)&vbif->features); 311 + debugfs_create_u32("default_wr_ot_limit", 0400, debugfs_vbif, 312 + (u32 *)&vbif->default_ot_wr_limit); 310 313 311 - debugfs_create_u32("xin_halt_timeout", 0400, debugfs_vbif, 312 - (u32 *)&vbif->xin_halt_timeout); 314 + for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) { 315 + const struct dpu_vbif_dynamic_ot_cfg *cfg = 316 + &vbif->dynamic_ot_rd_tbl.cfg[j]; 313 317 314 - debugfs_create_u32("default_rd_ot_limit", 0400, debugfs_vbif, 315 - (u32 *)&vbif->default_ot_rd_limit); 318 + snprintf(vbif_name, sizeof(vbif_name), 319 + "dynamic_ot_rd_%d_pps", j); 320 + debugfs_create_u64(vbif_name, 0400, debugfs_vbif, 321 + (u64 *)&cfg->pps); 322 + snprintf(vbif_name, sizeof(vbif_name), 323 + "dynamic_ot_rd_%d_ot_limit", j); 324 + debugfs_create_u32(vbif_name, 0400, debugfs_vbif, 325 + (u32 *)&cfg->ot_limit); 326 + } 316 327 317 - debugfs_create_u32("default_wr_ot_limit", 0400, debugfs_vbif, 318 - (u32 *)&vbif->default_ot_wr_limit); 328 + for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) { 329 + const struct dpu_vbif_dynamic_ot_cfg *cfg = 330 + &vbif->dynamic_ot_wr_tbl.cfg[j]; 319 331 320 - for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) { 321 - const struct dpu_vbif_dynamic_ot_cfg *cfg = 322 - &vbif->dynamic_ot_rd_tbl.cfg[j]; 323 - 324 - snprintf(vbif_name, sizeof(vbif_name), 325 - "dynamic_ot_rd_%d_pps", j); 326 - debugfs_create_u64(vbif_name, 0400, debugfs_vbif, 327 - (u64 *)&cfg->pps); 328 - snprintf(vbif_name, sizeof(vbif_name), 329 - "dynamic_ot_rd_%d_ot_limit", j); 330 - debugfs_create_u32(vbif_name, 0400, debugfs_vbif, 331 - (u32 *)&cfg->ot_limit); 332 - } 333 - 334 - for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) { 335 - const struct dpu_vbif_dynamic_ot_cfg *cfg = 336 - &vbif->dynamic_ot_wr_tbl.cfg[j]; 337 - 338 - snprintf(vbif_name, sizeof(vbif_name), 339 - "dynamic_ot_wr_%d_pps", j); 340 - debugfs_create_u64(vbif_name, 0400, debugfs_vbif, 341 - (u64 *)&cfg->pps); 342 - snprintf(vbif_name, sizeof(vbif_name), 343 - "dynamic_ot_wr_%d_ot_limit", j); 344 - debugfs_create_u32(vbif_name, 0400, debugfs_vbif, 345 - (u32 *)&cfg->ot_limit); 346 - } 332 + snprintf(vbif_name, sizeof(vbif_name), 333 + "dynamic_ot_wr_%d_pps", j); 334 + debugfs_create_u64(vbif_name, 0400, debugfs_vbif, 335 + (u64 *)&cfg->pps); 336 + snprintf(vbif_name, sizeof(vbif_name), 337 + "dynamic_ot_wr_%d_ot_limit", j); 338 + debugfs_create_u32(vbif_name, 0400, debugfs_vbif, 339 + (u32 *)&cfg->ot_limit); 347 340 } 348 341 } 349 342 #endif