drm/msm/dpu: simplify VBIF handling
cover drm/msm/dpu: simplify VBIF handling
Once Konrad asked, what is the use for VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.
There are two VBIF interfaces two memory, VBIF_RT and VBIF_NRT with VBIF_NRT being used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.
The only exception to that rule is MSM8996, where VBIF_NRT has also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.
The missing features don't match the extra complexity required to support two VBIF interfaces, so drop the second one and all the options to support it.
---
Dmitry Baryshkov (7):
drm/msm/dpu: drop VBIF_NRT handling
drm/msm/dpu: stop declaring VBIFs as an array in catalog drm/msm/dpu: replace VBIF-related array with bare pointers drm/msm/dpu: drop VBIF id, base and name from the catalog drm/msm/dpu: drop vbif_idx from WB configuration drm/msm/dpu: drop VBIF index from the VBIF params drm/msm/dpu: drop VBIF index from the struct dpu_hw_vbif
.../drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 4 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h | 4 +- .../drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 4 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 7 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 35 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 8 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 6 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 3 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 70 +++------ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 5 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 19 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 163 ++++++++------------- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h | 4 - 44 files changed, 144 insertions(+), 296 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260219-drop-vbif-nrt-cb7da190f6f4
Best regards,
Signature · 2 lines
With best wishes Dmitry
PATCH 1/7 drm/msm/dpu: drop VBIF_NRT handling
The second VBIF instance, VBIF_NRT, is only used for the separate inline rotator block. It is unsupported by the DPU driver and will require a separate driver (or separate instance of the DPU device).
The only possible user of VBIF_NRT is writeback on MSM8996, however writeback on that platform is currently unsupported and it's not worth keeping extra complexity for the sake of that single legacy platform.
None of the hardware catalogs entries actually declare VBIF_NRT, so it is left in its default state.
Stop pretending that DPU driver cares about VBIF_NRT and drop it.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 -------------- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 2 -- 3 files changed, 17 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +0 -1
@@ -286,7 +286,6 @@ enum dpu_wd_timer {enum dpu_vbif {VBIF_RT , -VBIF_NRT ,VBIF_MAX , };
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +0 -14
@@ -1357,14 +1357,6 @@ static int dpu_kms_mmap_mdp5(struct dpu_kms *dpu_kms)return ret; } - dpu_kms->vbif[VBIF_NRT ] =msm_ioremap_mdss (mdss_dev, - dpu_kms->pdev, -"vbif_nrt_phys" ); -if (IS_ERR (dpu_kms->vbif[VBIF_NRT ])) { - dpu_kms->vbif[VBIF_NRT ] =NULL ; -DPU_DEBUG ("VBIF NRT is not defined" ); - } -return 0 ; }
@@ -1390,12 +1382,6 @@ static int dpu_kms_mmap_dpu(struct dpu_kms *dpu_kms)return ret; } - dpu_kms->vbif[VBIF_NRT ] =msm_ioremap_quiet (pdev,"vbif_nrt" ); -if (IS_ERR (dpu_kms->vbif[VBIF_NRT ])) { - dpu_kms->vbif[VBIF_NRT ] =NULL ; -DPU_DEBUG ("VBIF NRT is not defined" ); - } -return 0 ; }
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -2
@@ -24,8 +24,6 @@ static const char *dpu_vbif_name(enum dpu_vbif idx)switch (idx) {case VBIF_RT :return "VBIF_RT" ; -case VBIF_NRT : -return "VBIF_NRT" ;default :return "??" ; }
Signature · 1 line
2.47.3
Re: [PATCH 1/7] drm/msm/dpu: drop VBIF_NRT handling
Quoted 8 lines · Dmitry Baryshkov
The second VBIF instance,
VBIF_NRT, is only used for the separate inline rotator block. It is unsupported by the DPU driver and will require a separate driver (or separate instance of the DPU device).The only possible user of
VBIF_NRTis writeback on MSM8996, however writeback on that platform is currently unsupported and it's not worth keeping extra complexity for the sake of that single legacy platform.
Quoted 8 lines
None of the hardware catalogs entries actually declare
VBIF_NRT, so it is left in its default state.Stop pretending that DPU driver cares about
VBIF_NRTand drop it.Reported-by Konrad Dybcio <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 2/7 drm/msm/dpu: stop declaring VBIFs as an array in catalog
In reply to Dmitry BaryshkovThe driver handles a single VBIF instance, VBIF_RT. Stop declaring VBIFs as an array in the DPU hardware catalog.
--- .../drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 3 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h | 3 +- .../drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 3 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 20 ++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 32 ++++----- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 79 ++++++++++------------ 36 files changed, 87 insertions(+), 141 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_2_sdm660.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_3_sdm630.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +1 -2
@@ -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,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h +1 -2
@@ -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, };
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +5 -15
@@ -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}, - }, };/*************************************************************
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +0 -1
@@ -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;
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +14 -18
@@ -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) {
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +36 -43
94 lines not on this page · raw message
Signature · 1 line
2.47.3
Re: [PATCH 2/7] drm/msm/dpu: stop declaring VBIFs as an array in catalog
Quoted 5 lines · Dmitry Baryshkov
The driver handles a single VBIF instance,
VBIF_RT. Stop declaring VBIFs as an array in the DPU hardware catalog.Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 3/7 drm/msm/dpu: replace VBIF-related array with bare pointers
In reply to Dmitry BaryshkovAs we no longer have multiple VBIF instances, it doesn't make sense to keep VBIF data as arrays. Drop the extra wrapping and keep only a single instance of each of the structures.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 28 +++++++----------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 45 ++++++++++------------------- 4 files changed, 29 insertions(+), 49 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +0 -1
@@ -286,7 +286,6 @@ enum dpu_wd_timer {enum dpu_vbif {VBIF_RT , -VBIF_MAX , };/**
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +11 -17
@@ -886,16 +886,12 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms)static void _dpu_kms_hw_destroy (struct dpu_kms *dpu_kms) { -int i; - dpu_kms->hw_intr =NULL ;/* safe to call these more than once during shutdown */ _dpu_kms_mmu_destroy (dpu_kms); -for (i =0 ; i <ARRAY_SIZE (dpu_kms->hw_vbif); i++) { - dpu_kms->hw_vbif[i] =NULL ; - } + dpu_kms->hw_vbif =NULL ;dpu_kms_global_obj_fini (dpu_kms);
@@ -1220,14 +1216,14 @@ static int dpu_kms_hw_init(struct msm_kms *kms)struct dpu_hw_vbif *hw;const struct dpu_vbif_cfg *vbif = dpu_kms->catalog->vbif; - hw =dpu_hw_vbif_init (dev, vbif, dpu_kms->vbif[vbif->id]); + hw =dpu_hw_vbif_init (dev, vbif, dpu_kms->vbif);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; + dpu_kms->hw_vbif = 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" );
@@ -1343,13 +1339,11 @@ static int dpu_kms_mmap_mdp5(struct dpu_kms *dpu_kms) }DRM_DEBUG ("mapped dpu address space @%p\n" , dpu_kms->mmio); - dpu_kms->vbif[VBIF_RT ] =msm_ioremap_mdss (mdss_dev, - dpu_kms->pdev, -"vbif_phys" ); -if (IS_ERR (dpu_kms->vbif[VBIF_RT ])) { - ret =PTR_ERR (dpu_kms->vbif[VBIF_RT ]); + dpu_kms->vbif =msm_ioremap_mdss (mdss_dev, dpu_kms->pdev,"vbif_phys" ); +if (IS_ERR (dpu_kms->vbif)) { + ret =PTR_ERR (dpu_kms->vbif);DPU_ERROR ("vbif register memory map failed: %d\n" , ret); - dpu_kms->vbif[VBIF_RT ] =NULL ; + dpu_kms->vbif =NULL ;return ret; }
@@ -1370,11 +1364,11 @@ static int dpu_kms_mmap_dpu(struct dpu_kms *dpu_kms) }DRM_DEBUG ("mapped dpu address space @%p\n" , dpu_kms->mmio); - dpu_kms->vbif[VBIF_RT ] =msm_ioremap (pdev,"vbif" ); -if (IS_ERR (dpu_kms->vbif[VBIF_RT ])) { - ret =PTR_ERR (dpu_kms->vbif[VBIF_RT ]); + dpu_kms->vbif =msm_ioremap (pdev,"vbif" ); +if (IS_ERR (dpu_kms->vbif)) { + ret =PTR_ERR (dpu_kms->vbif);DPU_ERROR ("vbif register memory map failed: %d\n" , ret); - dpu_kms->vbif[VBIF_RT ] =NULL ; + dpu_kms->vbif =NULL ;return ret; }
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +2 -2
@@ -63,7 +63,7 @@ struct dpu_kms {const struct qcom_ubwc_cfg_data *mdss;/* io/register spaces: */ -void __iomem *mmio, *vbif[VBIF_MAX ]; +void __iomem *mmio, *vbif;struct regulator *vdd;struct regulator *mmagic;
@@ -81,7 +81,7 @@ struct dpu_kms {struct dpu_rm rm; -struct dpu_hw_vbif *hw_vbif[VBIF_MAX ]; +struct dpu_hw_vbif *hw_vbif;struct dpu_hw_mdp *hw_mdp;bool has_danger_ctrl;
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +16 -29
75 lines not on this page · raw message
Signature · 1 line
2.47.3
Re: [PATCH 3/7] drm/msm/dpu: replace VBIF-related array with bare pointers
Quoted 6 lines · Dmitry Baryshkov
As we no longer have multiple VBIF instances, it doesn't make sense to keep VBIF data as arrays. Drop the extra wrapping and keep only a single instance of each of the structures.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 4/7 drm/msm/dpu: drop VBIF id, base and name from the catalog
In reply to Dmitry BaryshkovFor all the platforms VBIF id is VBIF_RT, the name and base are also fixed. Drop those fields from the catalog.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 15 +++++---------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +5 -10
@@ -514,8 +514,7 @@ static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = { };static const struct dpu_vbif_cfg msm8996_vbif = { - .name ="vbif_rt" , .id =VBIF_RT , - .base =0 , .len =0x1040 , + .len =0x1040 , .default_ot_rd_limit =32 , .default_ot_wr_limit =16 , .features =BIT (DPU_VBIF_QOS_REMAP ) |BIT (DPU_VBIF_QOS_OTLIM ),
@@ -540,8 +539,7 @@ static const struct dpu_vbif_cfg msm8996_vbif = { };static const struct dpu_vbif_cfg msm8998_vbif = { - .name ="vbif_rt" , .id =VBIF_RT , - .base =0 , .len =0x1040 , + .len =0x1040 , .default_ot_rd_limit =32 , .default_ot_wr_limit =32 , .features =BIT (DPU_VBIF_QOS_REMAP ) |BIT (DPU_VBIF_QOS_OTLIM ),
@@ -568,8 +566,7 @@ static const struct dpu_vbif_cfg msm8998_vbif = { };static const struct dpu_vbif_cfg sdm845_vbif = { - .name ="vbif_rt" , .id =VBIF_RT , - .base =0 , .len =0x1040 , + .len =0x1040 , .features =BIT (DPU_VBIF_QOS_REMAP ), .xin_halt_timeout =0x4000 , .qos_rp_remap_size =0x40 ,
@@ -586,8 +583,7 @@ static const struct dpu_vbif_cfg sdm845_vbif = { };static const struct dpu_vbif_cfg sm8550_vbif = { - .name ="vbif_rt" , .id =VBIF_RT , - .base =0 , .len =0x1040 , + .len =0x1040 , .features =BIT (DPU_VBIF_QOS_REMAP ), .xin_halt_timeout =0x4000 , .qos_rp_remap_size =0x40 ,
@@ -604,8 +600,7 @@ static const struct dpu_vbif_cfg sm8550_vbif = { };static const struct dpu_vbif_cfg sm8650_vbif = { - .name ="vbif_rt" , .id =VBIF_RT , - .base =0 , .len =0x1074 , + .len =0x1074 , .features =BIT (DPU_VBIF_QOS_REMAP ), .xin_halt_timeout =0x4000 , .qos_rp_remap_size =0x40 ,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +2 -3
@@ -587,8 +587,7 @@ struct dpu_vbif_qos_tbl {/** * struct dpu_vbif_cfg - information of VBIF blocks -* @id enum identifying this block -* @base register offset of this block +* @len: length of hardware block * @features bit mask identifying sub-blocks/features * @ot_rd_limit default OT read limit * @ot_wr_limit default OT write limit
@@ -602,7 +601,7 @@ struct dpu_vbif_qos_tbl {* @memtype array of xin memtype definitions */ struct dpu_vbif_cfg { -DPU_HW_BLK_INFO ; +u32 len;unsigned long features;u32 default_ot_rd_limit;u32 default_ot_wr_limit;
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c +2 -2
@@ -230,13 +230,13 @@ struct dpu_hw_vbif *dpu_hw_vbif_init(struct drm_device *dev,if (!c)return ERR_PTR (-ENOMEM ); - c->hw.blk_addr = addr + cfg->base; + c->hw.blk_addr = addr; c->hw.log_mask =DPU_DBG_MASK_VBIF ;/* * Assign ops */ - c->idx = cfg->id; + c->idx =VBIF_RT ; c->cap = cfg;_setup_vbif_ops (&c->ops, c->cap->features);
Signature · 1 line
2.47.3
Re: [PATCH 4/7] drm/msm/dpu: drop VBIF id, base and name from the catalog
Quoted 5 lines · Dmitry Baryshkov
For all the platforms VBIF id is
VBIF_RT, the name and base are also fixed. Drop those fields from the catalog.Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 5/7 drm/msm/dpu: drop vbif_idx from WB configuration
In reply to Dmitry BaryshkovAll MDP / DPU implementations except for MSM8996 use VBIF_RT (or the only VBIF) for WB2. Writeback on MSM8996 is not supported (nor planned to be supported). In order to simplify the driver, drop the field form the struct dpu_wb_cfg.
--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 -- 21 files changed, 4 insertions(+), 23 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h +0 -1
@@ -322,7 +322,6 @@ static const struct dpu_wb_cfg sm8650_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_0_sm8750.h +0 -1
@@ -364,7 +364,6 @@ static const struct dpu_wb_cfg sm8750_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_2_glymur.h +0 -1
@@ -371,7 +371,6 @@ static const struct dpu_wb_cfg glymur_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h +0 -1
@@ -362,7 +362,6 @@ static const struct dpu_wb_cfg kaanapali_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +0 -1
@@ -280,7 +280,6 @@ static const struct dpu_wb_cfg sm8150_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +0 -1
@@ -286,7 +286,6 @@ static const struct dpu_wb_cfg sc8180x_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_2_sm7150.h +0 -1
@@ -246,7 +246,6 @@ static const struct dpu_wb_cfg sm7150_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h +0 -1
@@ -158,7 +158,6 @@ static const struct dpu_wb_cfg sm6150_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 2160, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +0 -1
@@ -137,7 +137,6 @@ static const struct dpu_wb_cfg sm6125_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 2160, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +0 -1
@@ -317,7 +317,6 @@ static const struct dpu_wb_cfg sm8250_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +0 -1
@@ -153,7 +153,6 @@ static const struct dpu_wb_cfg sc7180_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +0 -1
@@ -147,7 +147,6 @@ static const struct dpu_wb_cfg sm6350_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 1920, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +0 -1
@@ -290,7 +290,6 @@ static const struct dpu_wb_cfg sm8350_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +0 -1
@@ -172,7 +172,6 @@ static const struct dpu_wb_cfg sc7280_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +0 -1
@@ -303,7 +303,6 @@ static const struct dpu_wb_cfg sm8450_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h +0 -1
@@ -310,7 +310,6 @@ static const struct dpu_wb_cfg sa8775p_wb[] = { .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +0 -1
@@ -298,7 +298,6 @@ static const struct dpu_wb_cfg sm8550_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_1_sar2130p.h +0 -1
@@ -298,7 +298,6 @@ static const struct dpu_wb_cfg sar2130p_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h +0 -1
@@ -298,7 +298,6 @@ static const struct dpu_wb_cfg x1e80100_wb[] = { .format_list = wb2_formats_rgb_yuv, .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .xin_id = 6, - .vbif_idx = VBIF_RT, .maxlinewidth = 4096, .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), },
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c +4 -2
@@ -70,7 +70,8 @@ static void dpu_encoder_phys_wb_set_ot_limit( ot_params.height = phys_enc->cached_mode.vdisplay; ot_params.is_wfd = !dpu_encoder_helper_get_cwb_mask (phys_enc); ot_params.frame_rate =drm_mode_vrefresh (&phys_enc->cached_mode); - ot_params.vbif_idx = hw_wb->caps->vbif_idx; +/* XXX: WB on MSM8996 should use VBIF_NRT */ + ot_params.vbif_idx =VBIF_RT ; ot_params.rd = false; if (!_dpu_encoder_phys_wb_clk_force_ctrl(hw_wb, phys_enc->dpu_kms->hw_mdp,
@@ -108,7 +109,8 @@ static void dpu_encoder_phys_wb_set_qos_remap( hw_wb = phys_enc->hw_wb;memset (&qos_params,0 ,sizeof (qos_params)); - qos_params.vbif_idx = hw_wb->caps->vbif_idx; +/* XXX: WB on MSM8996 should use VBIF_NRT */ + qos_params.vbif_idx =VBIF_RT ; qos_params.xin_id = hw_wb->caps->xin_id; qos_params.num = hw_wb->idx -WB_0 ; qos_params.is_rt =dpu_encoder_helper_get_cwb_mask (phys_enc);
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +0 -2
@@ -524,7 +524,6 @@ struct dpu_intf_cfg {/** * struct dpu_wb_cfg - information of writeback blocks * @DPU_HW_BLK_INFO: refer to the description above for DPU_HW_BLK_INFO -* @vbif_idx: vbif client index * @maxlinewidth: max line width supported by writeback block * @xin_id: bus client identifier * @intr_wb_done: interrupt index for WB_DONE
@@ -535,7 +534,6 @@ struct dpu_intf_cfg {struct dpu_wb_cfg {DPU_HW_BLK_INFO ;unsigned long features; -u8 vbif_idx;u32 maxlinewidth;u32 xin_id;unsigned int intr_wb_done;
Signature · 1 line
2.47.3
Re: [PATCH 5/7] drm/msm/dpu: drop vbif_idx from WB configuration
Quoted 7 lines · Dmitry Baryshkov
All MDP / DPU implementations except for MSM8996 use
VBIF_RT(or the only VBIF) for WB2. Writeback on MSM8996 is not supported (nor planned to be supported). In order to simplify the driver, drop the field form the structdpu_wb_cfg.Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 6/7 drm/msm/dpu: drop VBIF index from the VBIF params
In reply to Dmitry BaryshkovSince we don't support and don't use VBIF_NRT, VBIF_RT is the only possible VBIF type. To simplify the driver, drop vbif_idx from the VBIF parameter structures.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 5 +---- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 5 +---- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 19 +++++++------------ drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 11 +++++------ drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h | 4 ---- 5 files changed, 14 insertions(+), 30 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c +1 -4
@@ -71,7 +71,6 @@ static void dpu_encoder_phys_wb_set_ot_limit( ot_params.is_wfd = !dpu_encoder_helper_get_cwb_mask (phys_enc); ot_params.frame_rate =drm_mode_vrefresh (&phys_enc->cached_mode);/* XXX: WB on MSM8996 should use VBIF_NRT */ - ot_params.vbif_idx =VBIF_RT ; ot_params.rd = false; if (!_dpu_encoder_phys_wb_clk_force_ctrl(hw_wb, phys_enc->dpu_kms->hw_mdp,
@@ -110,14 +109,12 @@ static void dpu_encoder_phys_wb_set_qos_remap(memset (&qos_params,0 ,sizeof (qos_params));/* XXX: WB on MSM8996 should use VBIF_NRT */ - qos_params.vbif_idx =VBIF_RT ; qos_params.xin_id = hw_wb->caps->xin_id; qos_params.num = hw_wb->idx -WB_0 ; qos_params.is_rt =dpu_encoder_helper_get_cwb_mask (phys_enc); -DPU_DEBUG ("[qos_remap] wb:%d vbif:%d xin:%d is_rt:%d\n" , +DPU_DEBUG ("[qos_remap] wb:%d xin:%d is_rt:%d\n" , qos_params.num, - qos_params.vbif_idx, qos_params.xin_id, qos_params.is_rt); if (!_dpu_encoder_phys_wb_clk_force_ctrl(hw_wb, phys_enc->dpu_kms->hw_mdp,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -4
@@ -374,7 +374,6 @@ static void _dpu_plane_set_ot_limit(struct drm_plane *plane, ot_params.height =drm_rect_height (&pipe_cfg->src_rect); ot_params.is_wfd = !pdpu->is_rt_pipe; ot_params.frame_rate = frame_rate; - ot_params.vbif_idx =VBIF_RT ; ot_params.rd = true; if (!_dpu_plane_sspp_clk_force_ctrl(pipe->sspp, dpu_kms->hw_mdp,
@@ -402,14 +401,12 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane,bool forced_on = false;memset (&qos_params,0 ,sizeof (qos_params)); - qos_params.vbif_idx =VBIF_RT ; qos_params.xin_id = pipe->sspp->cap->xin_id; qos_params.num = pipe->sspp->idx -SSPP_VIG0 ; qos_params.is_rt = pdpu->is_rt_pipe; -DPU_DEBUG_PLANE (pdpu,"pipe:%d vbif:%d xin:%d rt:%d\n" , +DPU_DEBUG_PLANE (pdpu,"pipe:%d xin:%d rt:%d\n" , qos_params.num, - qos_params.vbif_idx, qos_params.xin_id, qos_params.is_rt); if (!_dpu_plane_sspp_clk_force_ctrl(pipe->sspp, dpu_kms->hw_mdp,
drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +7 -12
@@ -72,23 +72,20 @@ TRACE_EVENT(dpu_perf_set_danger_luts, );TRACE_EVENT (dpu_perf_set_ot, - TP_PROTO(u32 pnum, u32 xin_id, u32 rd_lim, u32 vbif_idx), -TP_ARGS (pnum, xin_id, rd_lim, vbif_idx), + TP_PROTO(u32 pnum, u32 xin_id, u32 rd_lim), +TP_ARGS (pnum, xin_id, rd_lim),TP_STRUCT__entry ( __field(u32, pnum) __field(u32, xin_id)__field (u32, rd_lim) -__field (u32, vbif_idx) ),TP_fast_assign ( __entry->pnum = pnum; __entry->xin_id = xin_id; __entry->rd_lim = rd_lim; - __entry->vbif_idx = vbif_idx; ), -TP_printk ("pnum:%d xin_id:%d ot:%d vbif:%d" , - __entry->pnum, __entry->xin_id, __entry->rd_lim, - __entry->vbif_idx) +TP_printk ("pnum:%d xin_id:%d ot:%d" , + __entry->pnum, __entry->xin_id, __entry->rd_lim) ) TRACE_EVENT(dpu_cmd_release_bw,
@@ -861,17 +858,15 @@ TRACE_EVENT(dpu_rm_reserve_lms, );TRACE_EVENT (dpu_vbif_wait_xin_halt_fail, - TP_PROTO(enum dpu_vbif index, u32 xin_id), -TP_ARGS (index, xin_id), + TP_PROTO(u32 xin_id), +TP_ARGS (xin_id),TP_STRUCT__entry ( - __field( enum dpu_vbif, index )__field ( u32, xin_id ) ),TP_fast_assign ( - __entry->index = index; __entry->xin_id = xin_id; ), -TP_printk ("index:%d xin_id:%u" , __entry->index, __entry->xin_id) +TP_printk ("xin_id:%u" , __entry->xin_id) ); TRACE_EVENT(dpu_pp_connect_ext_te,
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +5 -6
@@ -180,8 +180,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,if (ot_lim ==0 )return ; -trace_dpu_perf_set_ot (params->num, params->xin_id, ot_lim, - params->vbif_idx); +trace_dpu_perf_set_ot (params->num, params->xin_id, ot_lim); vbif->ops.set_limit_conf (vbif, params->xin_id, params->rd, ot_lim);
@@ -189,7 +188,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, ret =_dpu_vbif_wait_for_xin_halt (vbif, params->xin_id);if (ret) -trace_dpu_vbif_wait_xin_halt_fail (vbif->idx, params->xin_id); +trace_dpu_vbif_wait_xin_halt_fail (params->xin_id); vbif->ops.set_halt_ctrl (vbif, params->xin_id, false); }
@@ -214,7 +213,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, vbif = dpu_kms->hw_vbif;if (!vbif || !vbif->cap) { -DPU_ERROR ("invalid vbif %d\n" , params->vbif_idx); +DPU_ERROR ("invalid vbif\n" );return ; }
@@ -232,8 +231,8 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, }for (i =0 ; i < qos_tbl->npriority_lvl; i++) { -DRM_DEBUG_ATOMIC ("%s xin:%d lvl:%d/%d\n" , -dpu_vbif_name (params->vbif_idx), params->xin_id, i, +DRM_DEBUG_ATOMIC ("VBIF xin:%d lvl:%d/%d\n" , + params->xin_id, i, qos_tbl->priority_lvl[i]); vbif->ops.set_qos_remap (vbif, params->xin_id, i, qos_tbl->priority_lvl[i]);
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h +0 -4
@@ -15,24 +15,20 @@ struct dpu_vbif_set_ot_params {u32 frame_rate;bool rd;bool is_wfd; -u32 vbif_idx; };struct dpu_vbif_set_memtype_params {u32 xin_id; -u32 vbif_idx;bool is_cacheable; };/** * struct dpu_vbif_set_qos_params - QoS remapper parameter -* @vbif_idx: vbif identifier * @xin_id: client interface identifier * @num: pipe identifier (debug only) * @is_rt: true if pipe is used in real-time use case */ struct dpu_vbif_set_qos_params { -u32 vbif_idx;u32 xin_id;u32 num;bool is_rt;
Signature · 1 line
2.47.3
Re: [PATCH 6/7] drm/msm/dpu: drop VBIF index from the VBIF params
Quoted 6 lines · Dmitry Baryshkov
Since we don't support and don't use
VBIF_NRT,VBIF_RTis the only possible VBIF type. To simplify the driver, dropvbif_idxfrom the VBIF parameter structures.Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
PATCH 7/7 drm/msm/dpu: drop VBIF index from the struct dpu_hw_vbif
In reply to Dmitry BaryshkovSince we don't support and don't use VBIF_NRT, VBIF_RT is the only possible VBIF type. To simplify the driver, drop vbif_idx from the VBIF instance structure. As the last users of VBIF_RT and enum dpu_vbif are gone, drop them too.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 4 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 30 ++++++++--------------------- 4 files changed, 8 insertions(+), 28 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +0 -4
@@ -284,10 +284,6 @@ enum dpu_wd_timer { WD_TIMER_MAX }; -enum dpu_vbif { -VBIF_RT , -}; -/** * enum dpu_3d_blend_mode * Desribes how the 3d data is blended
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c +0 -1
@@ -236,7 +236,6 @@ struct dpu_hw_vbif *dpu_hw_vbif_init(struct drm_device *dev,/* * Assign ops */ - c->idx =VBIF_RT ; c->cap = cfg;_setup_vbif_ops (&c->ops, c->cap->features);
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h +0 -1
@@ -98,7 +98,6 @@ struct dpu_hw_vbif {struct dpu_hw_blk_reg_map hw;/* vbif */ -enum dpu_vbif idx;const struct dpu_vbif_cfg *cap;/* ops */
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +8 -22
@@ -11,16 +11,6 @@#include "dpu_hw_vbif.h" #include "dpu_trace.h" -static const char *dpu_vbif_name (enum dpu_vbif idx) -{ -switch (idx) { -case VBIF_RT : -return "VBIF_RT" ; -default : -return "??" ; - } -} -/** * _dpu_vbif_wait_for_xin_halt - wait for the xin to halt * @vbif: Pointer to hardware vbif driver
@@ -52,12 +42,10 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id)if (!status) { rc = -ETIMEDOUT ; -DPU_ERROR ("%s client %d not halting. TIMEDOUT.\n" , -dpu_vbif_name (vbif->idx), xin_id); +DPU_ERROR ("VBIF client %d not halting. TIMEDOUT.\n" , xin_id); }else { rc =0 ; -DRM_DEBUG_ATOMIC ("%s client %d is halted\n" , -dpu_vbif_name (vbif->idx), xin_id); +DRM_DEBUG_ATOMIC ("VBIF client %d is halted\n" , xin_id); }return rc;
@@ -97,10 +85,10 @@ static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif, } } -DRM_DEBUG_ATOMIC ("%s xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n" , -dpu_vbif_name (vbif->idx), params->xin_id, - params->width, params->height, params->frame_rate, - pps, *ot_lim); +DRM_DEBUG_ATOMIC ("VBIF xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n" , + params->xin_id, + params->width, params->height, params->frame_rate, + pps, *ot_lim); }/**
@@ -143,8 +131,7 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, } exit: -DRM_DEBUG_ATOMIC ("%s xin:%d ot_lim:%d\n" , -dpu_vbif_name (vbif->idx), params->xin_id, ot_lim); +DRM_DEBUG_ATOMIC ("VBIF xin:%d ot_lim:%d\n" , params->xin_id, ot_lim);return ot_lim; }
@@ -252,8 +239,7 @@ void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms)if (vbif && vbif->ops.clear_errors) { vbif->ops.clear_errors (vbif, &pnd, &src);if (pnd || src) { -DRM_DEBUG_KMS ("%s: pnd 0x%X, src 0x%X\n" , -dpu_vbif_name (vbif->idx), pnd, src); +DRM_DEBUG_KMS ("VBIF: pnd 0x%X, src 0x%X\n" , pnd, src); } } }
Signature · 1 line
2.47.3
Re: [PATCH 7/7] drm/msm/dpu: drop VBIF index from the struct dpu_hw_vbif
Quoted 7 lines · Dmitry Baryshkov
Since we don't support and don't use
VBIF_NRT,VBIF_RTis the only possible VBIF type. To simplify the driver, dropvbif_idxfrom the VBIF instance structure. As the last users ofVBIF_RTand enumdpu_vbifare gone, drop them too.Signed-off-by Dmitry Baryshkov <[email protected]>---
Konrad
Quoted 8 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.
(in case someone interested is reading this - patches welcome!)
Quoted 3 lines
The only exception to that rule is MSM8996, where
VBIF_NRThas also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.
Unfortunately, it seems that way. Fortunately, it seems like it's indeed isolated to MSM8996.
This patchset is tearing out a lot of abstraction (which would only be useful for that SoC though) - if someone decides to work on it, do you think this should be effectively reverted, or should the NRT VBIF be instantiated in some other, more locallized way?
Konrad
Quoted 16 lines · Konrad Dybcio
Quoted 8 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.(in case someone interested is reading this - patches welcome!)
Quoted 3 lines
The only exception to that rule is MSM8996, where
VBIF_NRThas also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.
Quoted 7 lines
Unfortunately, it seems that way. Fortunately, it seems like it's indeed isolated to MSM8996.
This patchset is tearing out a lot of abstraction (which would only be useful for that SoC though) - if someone decides to work on it, do you think this should be effectively reverted, or should the NRT VBIF be instantiated in some other, more locallized way?
I think it should be added as a separate vbif_nrt, added and handled without touching the main catalog. The main difference point, xin_id, is still in place, it will be easy to add dpu_kms->vbif_nrt as a first-class object (instead of forcing the complexity of vbif[VBIF_MAX]). In such a case I'd prefer if calling code passes VBIF directly to dpu_vbif_set_*() functions instead of passing the index (or it might be easier to have a separate wrapper around those functions).
My opinion is that if something isn't applicable to 99% of cases, those 99% should not care about the remaining 1% usecase.
Signature · 2 lines
With best wishes Dmitry
Quoted 33 lines · Dmitry Baryshkov
Quoted 16 lines · Konrad Dybcio
Quoted 8 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.(in case someone interested is reading this - patches welcome!)
Quoted 3 lines
The only exception to that rule is MSM8996, where
VBIF_NRThas also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.Quoted 7 lines
Unfortunately, it seems that way. Fortunately, it seems like it's indeed isolated to MSM8996.
This patchset is tearing out a lot of abstraction (which would only be useful for that SoC though) - if someone decides to work on it, do you think this should be effectively reverted, or should the NRT VBIF be instantiated in some other, more locallized way?
I think it should be added as a separate
vbif_nrt, added and handled without touching the main catalog. The main difference point,xin_id, is still in place, it will be easy to adddpu_kms->vbif_nrtas a first-class object (instead of forcing the complexity of vbif[VBIF_MAX]). In such a case I'd prefer if calling code passes VBIF directly to dpu_vbif_set_*() functions instead of passing the index (or it might be easier to have a separate wrapper around those functions).
Quoted 2 lines
My opinion is that if something isn't applicable to 99% of cases, those 99% should not care about the remaining 1% usecase.
Sure, that makes sense. I wanted to make sure your opinion is put in writing for the aforementioned "someone comes around to hack on this" case
Konrad
Quoted 13 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.The only exception to that rule is MSM8996, where
VBIF_NRThas also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.
Quoted 6 lines
The missing features don't match the extra complexity required to support two VBIF interfaces, so drop the second one and all the options to support it.
Signed-off-by Dmitry Baryshkov <[email protected]>---
This leaves a trailing 'bool is_rt' in struct dpu_vbif_set_qos_params.
I'm not sure whether/if we're going to use that specific set of functions with rotator support, but we should probably retain (and at some point recheck) the dpu_vbif_cfg->qos_nrt_tbl data that the catalog houses
Konrad
Quoted 18 lines · Konrad Dybcio
Quoted 17 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.The only exception to that rule is MSM8996, where
VBIF_NRThas also been used for outputting all writeback data. The DPU driver don't support WB on that platform and most likely will not in the close feature.The missing features don't match the extra complexity required to support two VBIF interfaces, so drop the second one and all the options to support it.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Dmitry Baryshkov <[email protected]>---
This leaves a trailing 'bool
is_rt' in structdpu_vbif_set_qos_params.I'm not sure whether/if we're going to use that specific set of functions with rotator support, but we should probably retain (and at some point recheck) the
dpu_vbif_cfg->qos_nrt_tbldata that the catalog houses
is_rt and qos_nrt_tbl are related to the WB support, so they can't go away.
Quoted 2 lines
Konrad
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov
AppliedQuoted 10 lines · Dmitry Baryshkov
Once Konrad asked, what is the use for
VBIF_NRT. Answering to his question revealed that it's not actually used by the DPU driver.There are two VBIF interfaces two memory,
VBIF_RTandVBIF_NRTwithVBIF_NRTbeing used only for the offscreen rotator, a separate block performing writeback operation with the optional 90 degree rotation. This block will require a separate isntance of the DPU driver, and it is not supported at this point.[...]
Applied to msm-next, thanks!
[1/7] drm/msm/dpu: drop VBIF_NRT handling
https://gitlab.freedesktop.org/lumag/msm/-/commit/cfb64b092617 [2/7] drm/msm/dpu: stop declaring VBIFs as an array in catalog https://gitlab.freedesktop.org/lumag/msm/-/commit/2c0c3d9d95ca [3/7] drm/msm/dpu: replace VBIF-related array with bare pointers https://gitlab.freedesktop.org/lumag/msm/-/commit/014390e30a74 [4/7] drm/msm/dpu: drop VBIF id, base and name from the catalog https://gitlab.freedesktop.org/lumag/msm/-/commit/b26bfb5bf1aa [5/7] drm/msm/dpu: drop vbif_idx from WB configuration https://gitlab.freedesktop.org/lumag/msm/-/commit/021fd8ca0cdc [6/7] drm/msm/dpu: drop VBIF index from the VBIF params https://gitlab.freedesktop.org/lumag/msm/-/commit/1ce61688875d [7/7] drm/msm/dpu: drop VBIF index from the struct dpu_hw_vbif https://gitlab.freedesktop.org/lumag/msm/-/commit/7c5166fd79fc
Best regards,
Signature · 2 lines
With best wishes Dmitry