drm/msm/dpu: stop declaring VBIFs as an array in catalog
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 27 Feb 2026 18:36:41 +0000 (20:36 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Wed, 25 Mar 2026 06:06:14 +0000 (08:06 +0200)
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>
37 files changed:
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_4_eliza.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c

index 56d3c38..b31cb6f 100644 (file)
@@ -445,8 +445,7 @@ const struct dpu_mdss_cfg dpu_sm8650_cfg = {
        .cwb = sm8650_cwb,
        .intf_count = ARRAY_SIZE(sm8650_intf),
        .intf = sm8650_intf,
-       .vbif_count = ARRAY_SIZE(sm8650_vbif),
-       .vbif = sm8650_vbif,
+       .vbif = &sm8650_vbif,
        .perf = &sm8650_perf_data,
 };
 
index db8cc2d..b0c38b2 100644 (file)
@@ -486,8 +486,7 @@ const struct dpu_mdss_cfg dpu_sm8750_cfg = {
        .cwb = sm8650_cwb,
        .intf_count = ARRAY_SIZE(sm8750_intf),
        .intf = sm8750_intf,
-       .vbif_count = ARRAY_SIZE(sm8650_vbif),
-       .vbif = sm8650_vbif,
+       .vbif = &sm8650_vbif,
        .perf = &sm8750_perf_data,
 };
 
index 13bb43b..f6fd79a 100644 (file)
@@ -533,8 +533,7 @@ const struct dpu_mdss_cfg dpu_glymur_cfg = {
        .cwb = sm8650_cwb,
        .intf_count = ARRAY_SIZE(glymur_intf),
        .intf = glymur_intf,
-       .vbif_count = ARRAY_SIZE(sm8650_vbif),
-       .vbif = sm8650_vbif,
+       .vbif = &sm8650_vbif,
        .perf = &glymur_perf_data,
 };
 
index f718a18..aeccf6f 100644 (file)
@@ -357,8 +357,7 @@ const struct dpu_mdss_cfg dpu_eliza_cfg = {
        .cwb = sm8650_cwb,
        .intf_count = ARRAY_SIZE(eliza_intf),
        .intf = eliza_intf,
-       .vbif_count = ARRAY_SIZE(sm8650_vbif),
-       .vbif = sm8650_vbif,
+       .vbif = &sm8650_vbif,
        .perf = &eliza_perf_data,
 };
 
index 0b20401..02d2de6 100644 (file)
@@ -484,8 +484,7 @@ const struct dpu_mdss_cfg dpu_kaanapali_cfg = {
        .cwb = sm8650_cwb,
        .intf_count = ARRAY_SIZE(kaanapali_intf),
        .intf = kaanapali_intf,
-       .vbif_count = ARRAY_SIZE(sm8650_vbif),
-       .vbif = sm8650_vbif,
+       .vbif = &sm8650_vbif,
        .perf = &kaanapali_perf_data,
 };
 
index 29e0eba..4ff7b39 100644 (file)
@@ -197,8 +197,7 @@ const struct dpu_mdss_cfg dpu_msm8937_cfg = {
        .pingpong = msm8937_pp,
        .intf_count = ARRAY_SIZE(msm8937_intf),
        .intf = msm8937_intf,
-       .vbif_count = ARRAY_SIZE(msm8996_vbif),
-       .vbif = msm8996_vbif,
+       .vbif = &msm8996_vbif,
        .perf = &msm8937_perf_data,
 };
 
index cb1ee4b..1518c3d 100644 (file)
@@ -176,8 +176,7 @@ const struct dpu_mdss_cfg dpu_msm8917_cfg = {
        .pingpong = msm8917_pp,
        .intf_count = ARRAY_SIZE(msm8917_intf),
        .intf = msm8917_intf,
-       .vbif_count = ARRAY_SIZE(msm8996_vbif),
-       .vbif = msm8996_vbif,
+       .vbif = &msm8996_vbif,
        .perf = &msm8917_perf_data,
 };
 
index b44d02b..e8aabe4 100644 (file)
@@ -204,8 +204,7 @@ const struct dpu_mdss_cfg dpu_msm8953_cfg = {
        .pingpong = msm8953_pp,
        .intf_count = ARRAY_SIZE(msm8953_intf),
        .intf = msm8953_intf,
-       .vbif_count = ARRAY_SIZE(msm8996_vbif),
-       .vbif = msm8996_vbif,
+       .vbif = &msm8996_vbif,
        .perf = &msm8953_perf_data,
 };
 
index 8af63db..67910a2 100644 (file)
@@ -320,8 +320,7 @@ const struct dpu_mdss_cfg dpu_msm8996_cfg = {
        .dsc = msm8996_dsc,
        .intf_count = ARRAY_SIZE(msm8996_intf),
        .intf = msm8996_intf,
-       .vbif_count = ARRAY_SIZE(msm8996_vbif),
-       .vbif = msm8996_vbif,
+       .vbif = &msm8996_vbif,
        .perf = &msm8996_perf_data,
 };
 
index b1b03d8..67c1463 100644 (file)
@@ -305,8 +305,7 @@ const struct dpu_mdss_cfg dpu_msm8998_cfg = {
        .dsc = msm8998_dsc,
        .intf_count = ARRAY_SIZE(msm8998_intf),
        .intf = msm8998_intf,
-       .vbif_count = ARRAY_SIZE(msm8998_vbif),
-       .vbif = msm8998_vbif,
+       .vbif = &msm8998_vbif,
        .perf = &msm8998_perf_data,
 };
 
index 64df4e8..8434402 100644 (file)
@@ -269,8 +269,7 @@ const struct dpu_mdss_cfg dpu_sdm660_cfg = {
        .dsc = sdm660_dsc,
        .intf_count = ARRAY_SIZE(sdm660_intf),
        .intf = sdm660_intf,
-       .vbif_count = ARRAY_SIZE(msm8998_vbif),
-       .vbif = msm8998_vbif,
+       .vbif = &msm8998_vbif,
        .perf = &sdm660_perf_data,
 };
 
index b409af8..ef5777a 100644 (file)
@@ -207,8 +207,7 @@ const struct dpu_mdss_cfg dpu_sdm630_cfg = {
        .pingpong = sdm630_pp,
        .intf_count = ARRAY_SIZE(sdm630_intf),
        .intf = sdm630_intf,
-       .vbif_count = ARRAY_SIZE(msm8998_vbif),
-       .vbif = msm8998_vbif,
+       .vbif = &msm8998_vbif,
        .perf = &sdm630_perf_data,
 };
 
index 5cc9f55..019135c 100644 (file)
@@ -325,8 +325,7 @@ const struct dpu_mdss_cfg dpu_sdm845_cfg = {
        .dsc = sdm845_dsc,
        .intf_count = ARRAY_SIZE(sdm845_intf),
        .intf = sdm845_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sdm845_perf_data,
 };
 
index 0f5e9ba..54b4a83 100644 (file)
@@ -144,8 +144,7 @@ const struct dpu_mdss_cfg dpu_sdm670_cfg = {
        .dsc = sdm670_dsc,
        .intf_count = ARRAY_SIZE(sdm845_intf),
        .intf = sdm845_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sdm845_perf_data,
 };
 
index ae1b2ed..9f43ce8 100644 (file)
@@ -381,8 +381,7 @@ const struct dpu_mdss_cfg dpu_sm8150_cfg = {
        .wb = sm8150_wb,
        .intf_count = ARRAY_SIZE(sm8150_intf),
        .intf = sm8150_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm8150_perf_data,
 };
 
index b572cfa..14611a3 100644 (file)
@@ -405,8 +405,7 @@ const struct dpu_mdss_cfg dpu_sc8180x_cfg = {
        .wb = sc8180x_wb,
        .intf_count = ARRAY_SIZE(sc8180x_intf),
        .intf = sc8180x_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sc8180x_perf_data,
 };
 
index a56c288..7b97e3b 100644 (file)
@@ -309,8 +309,7 @@ const struct dpu_mdss_cfg dpu_sm7150_cfg = {
        .intf = sm7150_intf,
        .wb_count = ARRAY_SIZE(sm7150_wb),
        .wb = sm7150_wb,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm7150_perf_data,
 };
 
index 26883f6..65fbd00 100644 (file)
@@ -246,8 +246,7 @@ const struct dpu_mdss_cfg dpu_sm6150_cfg = {
        .wb = sm6150_wb,
        .intf_count = ARRAY_SIZE(sm6150_intf),
        .intf = sm6150_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm6150_perf_data,
 };
 
index fbf50f2..c7833ca 100644 (file)
@@ -217,8 +217,7 @@ const struct dpu_mdss_cfg dpu_sm6125_cfg = {
        .wb = sm6125_wb,
        .intf_count = ARRAY_SIZE(sm6125_intf),
        .intf = sm6125_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm6125_perf_data,
 };
 
index 7b8b7a1..09ca22b 100644 (file)
@@ -378,8 +378,7 @@ const struct dpu_mdss_cfg dpu_sm8250_cfg = {
        .merge_3d = sm8250_merge_3d,
        .intf_count = ARRAY_SIZE(sm8250_intf),
        .intf = sm8250_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .wb_count = ARRAY_SIZE(sm8250_wb),
        .wb = sm8250_wb,
        .perf = &sm8250_perf_data,
index c990ba3..3adc335 100644 (file)
@@ -211,8 +211,7 @@ const struct dpu_mdss_cfg dpu_sc7180_cfg = {
        .intf = sc7180_intf,
        .wb_count = ARRAY_SIZE(sc7180_wb),
        .wb = sc7180_wb,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sc7180_perf_data,
 };
 
index 343ff54..20a2e9f 100644 (file)
@@ -144,8 +144,7 @@ const struct dpu_mdss_cfg dpu_sm6115_cfg = {
        .pingpong = sm6115_pp,
        .intf_count = ARRAY_SIZE(sm6115_intf),
        .intf = sm6115_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm6115_perf_data,
 };
 
index 093d16b..7b58e43 100644 (file)
@@ -229,8 +229,7 @@ const struct dpu_mdss_cfg dpu_sm6350_cfg = {
        .wb = sm6350_wb,
        .intf_count = ARRAY_SIZE(sm6350_intf),
        .intf = sm6350_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm6350_perf_data,
 };
 
index 47053bf..7ae7530 100644 (file)
@@ -137,8 +137,7 @@ const struct dpu_mdss_cfg dpu_qcm2290_cfg = {
        .pingpong = qcm2290_pp,
        .intf_count = ARRAY_SIZE(qcm2290_intf),
        .intf = qcm2290_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &qcm2290_perf_data,
 };
 
index 98190ee..fc7ceac 100644 (file)
@@ -155,8 +155,7 @@ const struct dpu_mdss_cfg dpu_sm6375_cfg = {
        .pingpong = sm6375_pp,
        .intf_count = ARRAY_SIZE(sm6375_intf),
        .intf = sm6375_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm6375_perf_data,
 };
 
index 85aae40..a3fea0a 100644 (file)
@@ -392,8 +392,7 @@ const struct dpu_mdss_cfg dpu_sm8350_cfg = {
        .wb = sm8350_wb,
        .intf_count = ARRAY_SIZE(sm8350_intf),
        .intf = sm8350_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm8350_perf_data,
 };
 
index 2f86882..ce38e93 100644 (file)
@@ -263,8 +263,7 @@ const struct dpu_mdss_cfg dpu_sc7280_cfg = {
        .wb = sc7280_wb,
        .intf_count = ARRAY_SIZE(sc7280_intf),
        .intf = sc7280_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sc7280_perf_data,
 };
 
index 9f2bcec..07a2c28 100644 (file)
@@ -421,8 +421,7 @@ const struct dpu_mdss_cfg dpu_sc8280xp_cfg = {
        .merge_3d = sc8280xp_merge_3d,
        .intf_count = ARRAY_SIZE(sc8280xp_intf),
        .intf = sc8280xp_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sc8280xp_perf_data,
 };
 
index 04b2216..0271add 100644 (file)
@@ -405,8 +405,7 @@ const struct dpu_mdss_cfg dpu_sm8450_cfg = {
        .wb = sm8450_wb,
        .intf_count = ARRAY_SIZE(sm8450_intf),
        .intf = sm8450_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sm8450_perf_data,
 };
 
index 42cf3bd..c9dff42 100644 (file)
@@ -445,8 +445,7 @@ const struct dpu_mdss_cfg dpu_sa8775p_cfg = {
        .wb = sa8775p_wb,
        .intf_count = ARRAY_SIZE(sa8775p_intf),
        .intf = sa8775p_intf,
-       .vbif_count = ARRAY_SIZE(sdm845_vbif),
-       .vbif = sdm845_vbif,
+       .vbif = &sdm845_vbif,
        .perf = &sa8775p_perf_data,
 };
 
index 4c7eb55..c0c133f 100644 (file)
@@ -400,8 +400,7 @@ const struct dpu_mdss_cfg dpu_sm8550_cfg = {
        .wb = sm8550_wb,
        .intf_count = ARRAY_SIZE(sm8550_intf),
        .intf = sm8550_intf,
-       .vbif_count = ARRAY_SIZE(sm8550_vbif),
-       .vbif = sm8550_vbif,
+       .vbif = &sm8550_vbif,
        .perf = &sm8550_perf_data,
 };
 
index dec83ea..4e1edf6 100644 (file)
@@ -400,8 +400,7 @@ const struct dpu_mdss_cfg dpu_sar2130p_cfg = {
        .wb = sar2130p_wb,
        .intf_count = ARRAY_SIZE(sar2130p_intf),
        .intf = sar2130p_intf,
-       .vbif_count = ARRAY_SIZE(sm8550_vbif),
-       .vbif = sm8550_vbif,
+       .vbif = &sm8550_vbif,
        .perf = &sar2130p_perf_data,
 };
 
index 52ff4ba..fce95fa 100644 (file)
@@ -441,8 +441,7 @@ const struct dpu_mdss_cfg dpu_x1e80100_cfg = {
        .wb = x1e80100_wb,
        .intf_count = ARRAY_SIZE(x1e80100_intf),
        .intf = x1e80100_intf,
-       .vbif_count = ARRAY_SIZE(sm8550_vbif),
-       .vbif = sm8550_vbif,
+       .vbif = &sm8550_vbif,
        .perf = &x1e80100_perf_data,
 };
 
index b096b74..91fed30 100644 (file)
@@ -513,8 +513,7 @@ static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = {
        },
 };
 
-static const struct dpu_vbif_cfg msm8996_vbif[] = {
-       {
+static const struct dpu_vbif_cfg msm8996_vbif = {
        .name = "vbif_rt", .id = VBIF_RT,
        .base = 0, .len = 0x1040,
        .default_ot_rd_limit = 32,
@@ -538,11 +537,9 @@ static const struct dpu_vbif_cfg msm8996_vbif[] = {
                .npriority_lvl = ARRAY_SIZE(msm8998_nrt_pri_lvl),
                .priority_lvl = msm8998_nrt_pri_lvl,
                },
-       },
 };
 
-static const struct dpu_vbif_cfg msm8998_vbif[] = {
-       {
+static const struct dpu_vbif_cfg msm8998_vbif = {
        .name = "vbif_rt", .id = VBIF_RT,
        .base = 0, .len = 0x1040,
        .default_ot_rd_limit = 32,
@@ -568,11 +565,9 @@ static const struct dpu_vbif_cfg msm8998_vbif[] = {
                },
        .memtype_count = 14,
        .memtype = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
-       },
 };
 
-static const struct dpu_vbif_cfg sdm845_vbif[] = {
-       {
+static const struct dpu_vbif_cfg sdm845_vbif = {
        .name = "vbif_rt", .id = VBIF_RT,
        .base = 0, .len = 0x1040,
        .features = BIT(DPU_VBIF_QOS_REMAP),
@@ -588,11 +583,9 @@ static const struct dpu_vbif_cfg sdm845_vbif[] = {
                },
        .memtype_count = 14,
        .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
-       },
 };
 
-static const struct dpu_vbif_cfg sm8550_vbif[] = {
-       {
+static const struct dpu_vbif_cfg sm8550_vbif = {
        .name = "vbif_rt", .id = VBIF_RT,
        .base = 0, .len = 0x1040,
        .features = BIT(DPU_VBIF_QOS_REMAP),
@@ -608,11 +601,9 @@ static const struct dpu_vbif_cfg sm8550_vbif[] = {
                },
        .memtype_count = 16,
        .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
-       },
 };
 
-static const struct dpu_vbif_cfg sm8650_vbif[] = {
-       {
+static const struct dpu_vbif_cfg sm8650_vbif = {
        .name = "vbif_rt", .id = VBIF_RT,
        .base = 0, .len = 0x1074,
        .features = BIT(DPU_VBIF_QOS_REMAP),
@@ -628,7 +619,6 @@ static const struct dpu_vbif_cfg sm8650_vbif[] = {
                },
        .memtype_count = 16,
        .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
-       },
 };
 
 /*************************************************************
index dedab08..5a777be 100644 (file)
@@ -743,7 +743,6 @@ struct dpu_mdss_cfg {
        u32 intf_count;
        const struct dpu_intf_cfg *intf;
 
-       u32 vbif_count;
        const struct dpu_vbif_cfg *vbif;
 
        u32 wb_count;
index 1515923..0c9dc7b 100644 (file)
@@ -1059,13 +1059,11 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
                                            dpu_kms->mmio + cat->cdm->base,
                                            "%s", cat->cdm->name);
 
-       for (i = 0; i < dpu_kms->catalog->vbif_count; i++) {
-               const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i];
+       const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif;
 
-               msm_disp_snapshot_add_block(disp_state, vbif->len,
-                                           dpu_kms->vbif[vbif->id] + vbif->base,
-                                           "%s", vbif->name);
-       }
+       msm_disp_snapshot_add_block(disp_state, vbif->len,
+                                   dpu_kms->vbif,
+                                   "vbif");
 
        pm_runtime_put_sync(&dpu_kms->pdev->dev);
 }
@@ -1143,7 +1141,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
 {
        struct dpu_kms *dpu_kms;
        struct drm_device *dev;
-       int i, rc = -EINVAL;
+       int rc = -EINVAL;
        unsigned long max_core_clk_rate;
        u32 core_rev;
 
@@ -1219,20 +1217,18 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
                goto err_pm_put;
        }
 
-       for (i = 0; i < dpu_kms->catalog->vbif_count; i++) {
-               struct dpu_hw_vbif *hw;
-               const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i];
-
-               hw = dpu_hw_vbif_init(dev, vbif, dpu_kms->vbif[vbif->id]);
-               if (IS_ERR(hw)) {
-                       rc = PTR_ERR(hw);
-                       DPU_ERROR("failed to init vbif %d: %d\n", vbif->id, rc);
-                       goto err_pm_put;
-               }
+       struct dpu_hw_vbif *hw;
+       const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif;
 
-               dpu_kms->hw_vbif[vbif->id] = hw;
+       hw = dpu_hw_vbif_init(dev, vbif, dpu_kms->vbif[vbif->id]);
+       if (IS_ERR(hw)) {
+               rc = PTR_ERR(hw);
+               DPU_ERROR("failed to init vbif: %d\n", rc);
+               goto err_pm_put;
        }
 
+       dpu_kms->hw_vbif[vbif->id] = hw;
+
        /* TODO: use the same max_freq as in dpu_kms_hw_init */
        max_core_clk_rate = dpu_kms_get_clk_rate(dpu_kms, "core");
        if (!max_core_clk_rate) {
index ede38b3..6ebd962 100644 (file)
@@ -292,58 +292,51 @@ void dpu_vbif_init_memtypes(struct dpu_kms *dpu_kms)
 
 void dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root)
 {
+       const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif;
        char vbif_name[32];
-       struct dentry *entry, *debugfs_vbif;
-       int i, j;
-
-       entry = debugfs_create_dir("vbif", debugfs_root);
-
-       for (i = 0; i < dpu_kms->catalog->vbif_count; i++) {
-               const struct dpu_vbif_cfg *vbif = &dpu_kms->catalog->vbif[i];
-
-               snprintf(vbif_name, sizeof(vbif_name), "%d", vbif->id);
+       struct dentry *debugfs_vbif;
+       int j;
 
-               debugfs_vbif = debugfs_create_dir(vbif_name, entry);
+       debugfs_vbif = debugfs_create_dir("vbif", debugfs_root);
 
-               debugfs_create_u32("features", 0600, debugfs_vbif,
-                       (u32 *)&vbif->features);
+       debugfs_create_u32("features", 0600, debugfs_vbif,
+               (u32 *)&vbif->features);
 
-               debugfs_create_u32("xin_halt_timeout", 0400, debugfs_vbif,
-                       (u32 *)&vbif->xin_halt_timeout);
+       debugfs_create_u32("xin_halt_timeout", 0400, debugfs_vbif,
+               (u32 *)&vbif->xin_halt_timeout);
 
-               debugfs_create_u32("default_rd_ot_limit", 0400, debugfs_vbif,
-                       (u32 *)&vbif->default_ot_rd_limit);
+       debugfs_create_u32("default_rd_ot_limit", 0400, debugfs_vbif,
+               (u32 *)&vbif->default_ot_rd_limit);
 
-               debugfs_create_u32("default_wr_ot_limit", 0400, debugfs_vbif,
-                       (u32 *)&vbif->default_ot_wr_limit);
+       debugfs_create_u32("default_wr_ot_limit", 0400, debugfs_vbif,
+               (u32 *)&vbif->default_ot_wr_limit);
 
-               for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) {
-                       const struct dpu_vbif_dynamic_ot_cfg *cfg =
-                                       &vbif->dynamic_ot_rd_tbl.cfg[j];
+       for (j = 0; j < vbif->dynamic_ot_rd_tbl.count; j++) {
+               const struct dpu_vbif_dynamic_ot_cfg *cfg =
+                               &vbif->dynamic_ot_rd_tbl.cfg[j];
 
-                       snprintf(vbif_name, sizeof(vbif_name),
-                                       "dynamic_ot_rd_%d_pps", j);
-                       debugfs_create_u64(vbif_name, 0400, debugfs_vbif,
-                                       (u64 *)&cfg->pps);
-                       snprintf(vbif_name, sizeof(vbif_name),
-                                       "dynamic_ot_rd_%d_ot_limit", j);
-                       debugfs_create_u32(vbif_name, 0400, debugfs_vbif,
-                                       (u32 *)&cfg->ot_limit);
-               }
+               snprintf(vbif_name, sizeof(vbif_name),
+                               "dynamic_ot_rd_%d_pps", j);
+               debugfs_create_u64(vbif_name, 0400, debugfs_vbif,
+                               (u64 *)&cfg->pps);
+               snprintf(vbif_name, sizeof(vbif_name),
+                               "dynamic_ot_rd_%d_ot_limit", j);
+               debugfs_create_u32(vbif_name, 0400, debugfs_vbif,
+                               (u32 *)&cfg->ot_limit);
+       }
 
-               for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) {
-                       const struct dpu_vbif_dynamic_ot_cfg *cfg =
-                                       &vbif->dynamic_ot_wr_tbl.cfg[j];
-
-                       snprintf(vbif_name, sizeof(vbif_name),
-                                       "dynamic_ot_wr_%d_pps", j);
-                       debugfs_create_u64(vbif_name, 0400, debugfs_vbif,
-                                       (u64 *)&cfg->pps);
-                       snprintf(vbif_name, sizeof(vbif_name),
-                                       "dynamic_ot_wr_%d_ot_limit", j);
-                       debugfs_create_u32(vbif_name, 0400, debugfs_vbif,
-                                       (u32 *)&cfg->ot_limit);
-               }
+       for (j = 0; j < vbif->dynamic_ot_wr_tbl.count; j++) {
+               const struct dpu_vbif_dynamic_ot_cfg *cfg =
+                               &vbif->dynamic_ot_wr_tbl.cfg[j];
+
+               snprintf(vbif_name, sizeof(vbif_name),
+                               "dynamic_ot_wr_%d_pps", j);
+               debugfs_create_u64(vbif_name, 0400, debugfs_vbif,
+                               (u64 *)&cfg->pps);
+               snprintf(vbif_name, sizeof(vbif_name),
+                               "dynamic_ot_wr_%d_ot_limit", j);
+               debugfs_create_u32(vbif_name, 0400, debugfs_vbif,
+                               (u32 *)&cfg->ot_limit);
        }
 }
 #endif