Commit de7d480f authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dpu: make dpu hardware catalog static const

Replace superfluous cfg_init functions, which just assign a static
config to the struct dpu_mdss_cfg, with static instances of struct
dpu_mdss_cfg.
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/488166/
Link: https://lore.kernel.org/r/20220602202447.1755115-8-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 32084967
...@@ -1722,285 +1722,230 @@ static const struct dpu_perf_cfg qcm2290_perf_data = { ...@@ -1722,285 +1722,230 @@ static const struct dpu_perf_cfg qcm2290_perf_data = {
.bw_inefficiency_factor = 120, .bw_inefficiency_factor = 120,
}; };
/************************************************************* /*************************************************************
* Hardware catalog init * Hardware catalog
*************************************************************/ *************************************************************/
/* static const struct dpu_mdss_cfg msm8998_dpu_cfg = {
* msm8998_cfg_init(): populate sdm845 dpu sub-blocks reg offsets .caps = &msm8998_dpu_caps,
* and instance counts. .mdp_count = ARRAY_SIZE(msm8998_mdp),
*/ .mdp = msm8998_mdp,
static void msm8998_cfg_init(struct dpu_mdss_cfg *dpu_cfg) .ctl_count = ARRAY_SIZE(msm8998_ctl),
{ .ctl = msm8998_ctl,
*dpu_cfg = (struct dpu_mdss_cfg){ .sspp_count = ARRAY_SIZE(msm8998_sspp),
.caps = &msm8998_dpu_caps, .sspp = msm8998_sspp,
.mdp_count = ARRAY_SIZE(msm8998_mdp), .mixer_count = ARRAY_SIZE(msm8998_lm),
.mdp = msm8998_mdp, .mixer = msm8998_lm,
.ctl_count = ARRAY_SIZE(msm8998_ctl), .dspp_count = ARRAY_SIZE(msm8998_dspp),
.ctl = msm8998_ctl, .dspp = msm8998_dspp,
.sspp_count = ARRAY_SIZE(msm8998_sspp), .pingpong_count = ARRAY_SIZE(sdm845_pp),
.sspp = msm8998_sspp, .pingpong = sdm845_pp,
.mixer_count = ARRAY_SIZE(msm8998_lm), .intf_count = ARRAY_SIZE(msm8998_intf),
.mixer = msm8998_lm, .intf = msm8998_intf,
.dspp_count = ARRAY_SIZE(msm8998_dspp), .vbif_count = ARRAY_SIZE(msm8998_vbif),
.dspp = msm8998_dspp, .vbif = msm8998_vbif,
.pingpong_count = ARRAY_SIZE(sdm845_pp), .reg_dma_count = 0,
.pingpong = sdm845_pp, .perf = &msm8998_perf_data,
.intf_count = ARRAY_SIZE(msm8998_intf), .mdss_irqs = IRQ_SM8250_MASK,
.intf = msm8998_intf, };
.vbif_count = ARRAY_SIZE(msm8998_vbif),
.vbif = msm8998_vbif, static const struct dpu_mdss_cfg sdm845_dpu_cfg = {
.reg_dma_count = 0, .caps = &sdm845_dpu_caps,
.perf = &msm8998_perf_data, .mdp_count = ARRAY_SIZE(sdm845_mdp),
.mdss_irqs = IRQ_SM8250_MASK, .mdp = sdm845_mdp,
}; .ctl_count = ARRAY_SIZE(sdm845_ctl),
} .ctl = sdm845_ctl,
.sspp_count = ARRAY_SIZE(sdm845_sspp),
/* .sspp = sdm845_sspp,
* sdm845_cfg_init(): populate sdm845 dpu sub-blocks reg offsets .mixer_count = ARRAY_SIZE(sdm845_lm),
* and instance counts. .mixer = sdm845_lm,
*/ .pingpong_count = ARRAY_SIZE(sdm845_pp),
static void sdm845_cfg_init(struct dpu_mdss_cfg *dpu_cfg) .pingpong = sdm845_pp,
{ .dsc_count = ARRAY_SIZE(sdm845_dsc),
*dpu_cfg = (struct dpu_mdss_cfg){ .dsc = sdm845_dsc,
.caps = &sdm845_dpu_caps, .intf_count = ARRAY_SIZE(sdm845_intf),
.mdp_count = ARRAY_SIZE(sdm845_mdp), .intf = sdm845_intf,
.mdp = sdm845_mdp, .vbif_count = ARRAY_SIZE(sdm845_vbif),
.ctl_count = ARRAY_SIZE(sdm845_ctl), .vbif = sdm845_vbif,
.ctl = sdm845_ctl, .reg_dma_count = 1,
.sspp_count = ARRAY_SIZE(sdm845_sspp), .dma_cfg = &sdm845_regdma,
.sspp = sdm845_sspp, .perf = &sdm845_perf_data,
.mixer_count = ARRAY_SIZE(sdm845_lm), .mdss_irqs = IRQ_SDM845_MASK,
.mixer = sdm845_lm, };
.pingpong_count = ARRAY_SIZE(sdm845_pp),
.pingpong = sdm845_pp, static const struct dpu_mdss_cfg sc7180_dpu_cfg = {
.dsc_count = ARRAY_SIZE(sdm845_dsc), .caps = &sc7180_dpu_caps,
.dsc = sdm845_dsc, .mdp_count = ARRAY_SIZE(sc7180_mdp),
.intf_count = ARRAY_SIZE(sdm845_intf), .mdp = sc7180_mdp,
.intf = sdm845_intf, .ctl_count = ARRAY_SIZE(sc7180_ctl),
.vbif_count = ARRAY_SIZE(sdm845_vbif), .ctl = sc7180_ctl,
.vbif = sdm845_vbif, .sspp_count = ARRAY_SIZE(sc7180_sspp),
.reg_dma_count = 1, .sspp = sc7180_sspp,
.dma_cfg = &sdm845_regdma, .mixer_count = ARRAY_SIZE(sc7180_lm),
.perf = &sdm845_perf_data, .mixer = sc7180_lm,
.mdss_irqs = IRQ_SDM845_MASK, .dspp_count = ARRAY_SIZE(sc7180_dspp),
}; .dspp = sc7180_dspp,
} .pingpong_count = ARRAY_SIZE(sc7180_pp),
.pingpong = sc7180_pp,
/* .intf_count = ARRAY_SIZE(sc7180_intf),
* sc7180_cfg_init(): populate sc7180 dpu sub-blocks reg offsets .intf = sc7180_intf,
* and instance counts. .wb_count = ARRAY_SIZE(sm8250_wb),
*/ .wb = sm8250_wb,
static void sc7180_cfg_init(struct dpu_mdss_cfg *dpu_cfg) .vbif_count = ARRAY_SIZE(sdm845_vbif),
{ .vbif = sdm845_vbif,
*dpu_cfg = (struct dpu_mdss_cfg){ .reg_dma_count = 1,
.caps = &sc7180_dpu_caps, .dma_cfg = &sdm845_regdma,
.mdp_count = ARRAY_SIZE(sc7180_mdp), .perf = &sc7180_perf_data,
.mdp = sc7180_mdp, .mdss_irqs = IRQ_SC7180_MASK,
.ctl_count = ARRAY_SIZE(sc7180_ctl), };
.ctl = sc7180_ctl,
.sspp_count = ARRAY_SIZE(sc7180_sspp), static const struct dpu_mdss_cfg sm8150_dpu_cfg = {
.sspp = sc7180_sspp, .caps = &sm8150_dpu_caps,
.mixer_count = ARRAY_SIZE(sc7180_lm), .mdp_count = ARRAY_SIZE(sdm845_mdp),
.mixer = sc7180_lm, .mdp = sdm845_mdp,
.dspp_count = ARRAY_SIZE(sc7180_dspp), .ctl_count = ARRAY_SIZE(sm8150_ctl),
.dspp = sc7180_dspp, .ctl = sm8150_ctl,
.pingpong_count = ARRAY_SIZE(sc7180_pp), .sspp_count = ARRAY_SIZE(sdm845_sspp),
.pingpong = sc7180_pp, .sspp = sdm845_sspp,
.intf_count = ARRAY_SIZE(sc7180_intf), .mixer_count = ARRAY_SIZE(sm8150_lm),
.intf = sc7180_intf, .mixer = sm8150_lm,
.wb_count = ARRAY_SIZE(sm8250_wb), .dspp_count = ARRAY_SIZE(sm8150_dspp),
.wb = sm8250_wb, .dspp = sm8150_dspp,
.vbif_count = ARRAY_SIZE(sdm845_vbif), .pingpong_count = ARRAY_SIZE(sm8150_pp),
.vbif = sdm845_vbif, .pingpong = sm8150_pp,
.reg_dma_count = 1, .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),
.dma_cfg = &sdm845_regdma, .merge_3d = sm8150_merge_3d,
.perf = &sc7180_perf_data, .intf_count = ARRAY_SIZE(sm8150_intf),
.mdss_irqs = IRQ_SC7180_MASK, .intf = sm8150_intf,
}; .vbif_count = ARRAY_SIZE(sdm845_vbif),
} .vbif = sdm845_vbif,
.reg_dma_count = 1,
/* .dma_cfg = &sm8150_regdma,
* sm8150_cfg_init(): populate sm8150 dpu sub-blocks reg offsets .perf = &sm8150_perf_data,
* and instance counts. .mdss_irqs = IRQ_SDM845_MASK,
*/ };
static void sm8150_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
{ static const struct dpu_mdss_cfg sc8180x_dpu_cfg = {
*dpu_cfg = (struct dpu_mdss_cfg){ .caps = &sc8180x_dpu_caps,
.caps = &sm8150_dpu_caps, .mdp_count = ARRAY_SIZE(sc8180x_mdp),
.mdp_count = ARRAY_SIZE(sdm845_mdp), .mdp = sc8180x_mdp,
.mdp = sdm845_mdp, .ctl_count = ARRAY_SIZE(sm8150_ctl),
.ctl_count = ARRAY_SIZE(sm8150_ctl), .ctl = sm8150_ctl,
.ctl = sm8150_ctl, .sspp_count = ARRAY_SIZE(sdm845_sspp),
.sspp_count = ARRAY_SIZE(sdm845_sspp), .sspp = sdm845_sspp,
.sspp = sdm845_sspp, .mixer_count = ARRAY_SIZE(sm8150_lm),
.mixer_count = ARRAY_SIZE(sm8150_lm), .mixer = sm8150_lm,
.mixer = sm8150_lm, .pingpong_count = ARRAY_SIZE(sm8150_pp),
.dspp_count = ARRAY_SIZE(sm8150_dspp), .pingpong = sm8150_pp,
.dspp = sm8150_dspp, .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),
.pingpong_count = ARRAY_SIZE(sm8150_pp), .merge_3d = sm8150_merge_3d,
.pingpong = sm8150_pp, .intf_count = ARRAY_SIZE(sc8180x_intf),
.merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), .intf = sc8180x_intf,
.merge_3d = sm8150_merge_3d, .vbif_count = ARRAY_SIZE(sdm845_vbif),
.intf_count = ARRAY_SIZE(sm8150_intf), .vbif = sdm845_vbif,
.intf = sm8150_intf, .reg_dma_count = 1,
.vbif_count = ARRAY_SIZE(sdm845_vbif), .dma_cfg = &sm8150_regdma,
.vbif = sdm845_vbif, .perf = &sc8180x_perf_data,
.reg_dma_count = 1, .mdss_irqs = IRQ_SC8180X_MASK,
.dma_cfg = &sm8150_regdma, };
.perf = &sm8150_perf_data,
.mdss_irqs = IRQ_SDM845_MASK, static const struct dpu_mdss_cfg sm8250_dpu_cfg = {
}; .caps = &sm8250_dpu_caps,
} .mdp_count = ARRAY_SIZE(sm8250_mdp),
.mdp = sm8250_mdp,
/* .ctl_count = ARRAY_SIZE(sm8150_ctl),
* sc8180x_cfg_init(): populate sc8180 dpu sub-blocks reg offsets .ctl = sm8150_ctl,
* and instance counts. .sspp_count = ARRAY_SIZE(sm8250_sspp),
*/ .sspp = sm8250_sspp,
static void sc8180x_cfg_init(struct dpu_mdss_cfg *dpu_cfg) .mixer_count = ARRAY_SIZE(sm8150_lm),
{ .mixer = sm8150_lm,
*dpu_cfg = (struct dpu_mdss_cfg){ .dspp_count = ARRAY_SIZE(sm8150_dspp),
.caps = &sc8180x_dpu_caps, .dspp = sm8150_dspp,
.mdp_count = ARRAY_SIZE(sc8180x_mdp), .pingpong_count = ARRAY_SIZE(sm8150_pp),
.mdp = sc8180x_mdp, .pingpong = sm8150_pp,
.ctl_count = ARRAY_SIZE(sm8150_ctl), .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),
.ctl = sm8150_ctl, .merge_3d = sm8150_merge_3d,
.sspp_count = ARRAY_SIZE(sdm845_sspp), .intf_count = ARRAY_SIZE(sm8150_intf),
.sspp = sdm845_sspp, .intf = sm8150_intf,
.mixer_count = ARRAY_SIZE(sm8150_lm), .vbif_count = ARRAY_SIZE(sdm845_vbif),
.mixer = sm8150_lm, .vbif = sdm845_vbif,
.pingpong_count = ARRAY_SIZE(sm8150_pp), .wb_count = ARRAY_SIZE(sm8250_wb),
.pingpong = sm8150_pp, .wb = sm8250_wb,
.merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), .reg_dma_count = 1,
.merge_3d = sm8150_merge_3d, .dma_cfg = &sm8250_regdma,
.intf_count = ARRAY_SIZE(sc8180x_intf), .perf = &sm8250_perf_data,
.intf = sc8180x_intf, .mdss_irqs = IRQ_SM8250_MASK,
.vbif_count = ARRAY_SIZE(sdm845_vbif), };
.vbif = sdm845_vbif,
.reg_dma_count = 1, static const struct dpu_mdss_cfg sc7280_dpu_cfg = {
.dma_cfg = &sm8150_regdma, .caps = &sc7280_dpu_caps,
.perf = &sc8180x_perf_data, .mdp_count = ARRAY_SIZE(sc7280_mdp),
.mdss_irqs = IRQ_SC8180X_MASK, .mdp = sc7280_mdp,
}; .ctl_count = ARRAY_SIZE(sc7280_ctl),
} .ctl = sc7280_ctl,
.sspp_count = ARRAY_SIZE(sc7280_sspp),
/* .sspp = sc7280_sspp,
* sm8250_cfg_init(): populate sm8250 dpu sub-blocks reg offsets .mixer_count = ARRAY_SIZE(sc7280_lm),
* and instance counts. .mixer = sc7280_lm,
*/ .pingpong_count = ARRAY_SIZE(sc7280_pp),
static void sm8250_cfg_init(struct dpu_mdss_cfg *dpu_cfg) .pingpong = sc7280_pp,
{ .intf_count = ARRAY_SIZE(sc7280_intf),
*dpu_cfg = (struct dpu_mdss_cfg){ .intf = sc7280_intf,
.caps = &sm8250_dpu_caps, .vbif_count = ARRAY_SIZE(sdm845_vbif),
.mdp_count = ARRAY_SIZE(sm8250_mdp), .vbif = sdm845_vbif,
.mdp = sm8250_mdp, .perf = &sc7280_perf_data,
.ctl_count = ARRAY_SIZE(sm8150_ctl), .mdss_irqs = IRQ_SC7280_MASK,
.ctl = sm8150_ctl, };
.sspp_count = ARRAY_SIZE(sm8250_sspp),
.sspp = sm8250_sspp, static const struct dpu_mdss_cfg qcm2290_dpu_cfg = {
.mixer_count = ARRAY_SIZE(sm8150_lm), .caps = &qcm2290_dpu_caps,
.mixer = sm8150_lm, .mdp_count = ARRAY_SIZE(qcm2290_mdp),
.dspp_count = ARRAY_SIZE(sm8150_dspp), .mdp = qcm2290_mdp,
.dspp = sm8150_dspp, .ctl_count = ARRAY_SIZE(qcm2290_ctl),
.pingpong_count = ARRAY_SIZE(sm8150_pp), .ctl = qcm2290_ctl,
.pingpong = sm8150_pp, .sspp_count = ARRAY_SIZE(qcm2290_sspp),
.merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), .sspp = qcm2290_sspp,
.merge_3d = sm8150_merge_3d, .mixer_count = ARRAY_SIZE(qcm2290_lm),
.intf_count = ARRAY_SIZE(sm8150_intf), .mixer = qcm2290_lm,
.intf = sm8150_intf, .dspp_count = ARRAY_SIZE(qcm2290_dspp),
.vbif_count = ARRAY_SIZE(sdm845_vbif), .dspp = qcm2290_dspp,
.vbif = sdm845_vbif, .pingpong_count = ARRAY_SIZE(qcm2290_pp),
.wb_count = ARRAY_SIZE(sm8250_wb), .pingpong = qcm2290_pp,
.wb = sm8250_wb, .intf_count = ARRAY_SIZE(qcm2290_intf),
.reg_dma_count = 1, .intf = qcm2290_intf,
.dma_cfg = &sm8250_regdma, .vbif_count = ARRAY_SIZE(sdm845_vbif),
.perf = &sm8250_perf_data, .vbif = sdm845_vbif,
.mdss_irqs = IRQ_SM8250_MASK, .reg_dma_count = 1,
}; .dma_cfg = &sdm845_regdma,
} .perf = &qcm2290_perf_data,
.mdss_irqs = IRQ_SC7180_MASK,
static void sc7280_cfg_init(struct dpu_mdss_cfg *dpu_cfg) };
{
*dpu_cfg = (struct dpu_mdss_cfg){
.caps = &sc7280_dpu_caps,
.mdp_count = ARRAY_SIZE(sc7280_mdp),
.mdp = sc7280_mdp,
.ctl_count = ARRAY_SIZE(sc7280_ctl),
.ctl = sc7280_ctl,
.sspp_count = ARRAY_SIZE(sc7280_sspp),
.sspp = sc7280_sspp,
.mixer_count = ARRAY_SIZE(sc7280_lm),
.mixer = sc7280_lm,
.pingpong_count = ARRAY_SIZE(sc7280_pp),
.pingpong = sc7280_pp,
.intf_count = ARRAY_SIZE(sc7280_intf),
.intf = sc7280_intf,
.vbif_count = ARRAY_SIZE(sdm845_vbif),
.vbif = sdm845_vbif,
.perf = &sc7280_perf_data,
.mdss_irqs = IRQ_SC7280_MASK,
};
}
/*
* qcm2290_cfg_init(): populate qcm2290 dpu sub-blocks reg offsets
* and instance counts.
*/
static void qcm2290_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
{
*dpu_cfg = (struct dpu_mdss_cfg){
.caps = &qcm2290_dpu_caps,
.mdp_count = ARRAY_SIZE(qcm2290_mdp),
.mdp = qcm2290_mdp,
.ctl_count = ARRAY_SIZE(qcm2290_ctl),
.ctl = qcm2290_ctl,
.sspp_count = ARRAY_SIZE(qcm2290_sspp),
.sspp = qcm2290_sspp,
.mixer_count = ARRAY_SIZE(qcm2290_lm),
.mixer = qcm2290_lm,
.dspp_count = ARRAY_SIZE(qcm2290_dspp),
.dspp = qcm2290_dspp,
.pingpong_count = ARRAY_SIZE(qcm2290_pp),
.pingpong = qcm2290_pp,
.intf_count = ARRAY_SIZE(qcm2290_intf),
.intf = qcm2290_intf,
.vbif_count = ARRAY_SIZE(sdm845_vbif),
.vbif = sdm845_vbif,
.reg_dma_count = 1,
.dma_cfg = &sdm845_regdma,
.perf = &qcm2290_perf_data,
.mdss_irqs = IRQ_SC7180_MASK,
};
}
static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = { static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
{ .hw_rev = DPU_HW_VER_300, .cfg_init = msm8998_cfg_init}, { .hw_rev = DPU_HW_VER_300, .dpu_cfg = &msm8998_dpu_cfg},
{ .hw_rev = DPU_HW_VER_301, .cfg_init = msm8998_cfg_init}, { .hw_rev = DPU_HW_VER_301, .dpu_cfg = &msm8998_dpu_cfg},
{ .hw_rev = DPU_HW_VER_400, .cfg_init = sdm845_cfg_init}, { .hw_rev = DPU_HW_VER_400, .dpu_cfg = &sdm845_dpu_cfg},
{ .hw_rev = DPU_HW_VER_401, .cfg_init = sdm845_cfg_init}, { .hw_rev = DPU_HW_VER_401, .dpu_cfg = &sdm845_dpu_cfg},
{ .hw_rev = DPU_HW_VER_500, .cfg_init = sm8150_cfg_init}, { .hw_rev = DPU_HW_VER_500, .dpu_cfg = &sm8150_dpu_cfg},
{ .hw_rev = DPU_HW_VER_501, .cfg_init = sm8150_cfg_init}, { .hw_rev = DPU_HW_VER_501, .dpu_cfg = &sm8150_dpu_cfg},
{ .hw_rev = DPU_HW_VER_510, .cfg_init = sc8180x_cfg_init}, { .hw_rev = DPU_HW_VER_510, .dpu_cfg = &sc8180x_dpu_cfg},
{ .hw_rev = DPU_HW_VER_600, .cfg_init = sm8250_cfg_init}, { .hw_rev = DPU_HW_VER_600, .dpu_cfg = &sm8250_dpu_cfg},
{ .hw_rev = DPU_HW_VER_620, .cfg_init = sc7180_cfg_init}, { .hw_rev = DPU_HW_VER_620, .dpu_cfg = &sc7180_dpu_cfg},
{ .hw_rev = DPU_HW_VER_650, .cfg_init = qcm2290_cfg_init}, { .hw_rev = DPU_HW_VER_650, .dpu_cfg = &qcm2290_dpu_cfg},
{ .hw_rev = DPU_HW_VER_720, .cfg_init = sc7280_cfg_init}, { .hw_rev = DPU_HW_VER_720, .dpu_cfg = &sc7280_dpu_cfg},
}; };
const struct dpu_mdss_cfg *dpu_hw_catalog_init(struct device *dev, u32 hw_rev) const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
{ {
int i; int i;
struct dpu_mdss_cfg *dpu_cfg; struct dpu_mdss_cfg *dpu_cfg;
dpu_cfg = devm_kzalloc(dev, sizeof(*dpu_cfg), GFP_KERNEL); dpu_cfg = kzalloc(sizeof(*dpu_cfg), GFP_KERNEL);
if (!dpu_cfg) if (!dpu_cfg)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) { for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) {
if (cfg_handler[i].hw_rev == hw_rev) { if (cfg_handler[i].hw_rev == hw_rev)
cfg_handler[i].cfg_init(dpu_cfg); return cfg_handler[i].dpu_cfg;
return dpu_cfg;
}
} }
DPU_ERROR("unsupported chipset id:%X\n", hw_rev); DPU_ERROR("unsupported chipset id:%X\n", hw_rev);
......
...@@ -878,17 +878,16 @@ struct dpu_mdss_cfg { ...@@ -878,17 +878,16 @@ struct dpu_mdss_cfg {
struct dpu_mdss_hw_cfg_handler { struct dpu_mdss_hw_cfg_handler {
u32 hw_rev; u32 hw_rev;
void (*cfg_init)(struct dpu_mdss_cfg *dpu_cfg); const struct dpu_mdss_cfg *dpu_cfg;
}; };
/** /**
* dpu_hw_catalog_init - dpu hardware catalog init API retrieves * dpu_hw_catalog_init - dpu hardware catalog init API retrieves
* hardcoded target specific catalog information in config structure * hardcoded target specific catalog information in config structure
* @dev: DPU device
* @hw_rev: caller needs provide the hardware revision. * @hw_rev: caller needs provide the hardware revision.
* *
* Return: dpu config structure * Return: dpu config structure
*/ */
const struct dpu_mdss_cfg *dpu_hw_catalog_init(struct device *dev, u32 hw_rev); const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev);
#endif /* _DPU_HW_CATALOG_H */ #endif /* _DPU_HW_CATALOG_H */
...@@ -1093,7 +1093,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms) ...@@ -1093,7 +1093,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
pr_info("dpu hardware revision:0x%x\n", dpu_kms->core_rev); pr_info("dpu hardware revision:0x%x\n", dpu_kms->core_rev);
dpu_kms->catalog = dpu_hw_catalog_init(dev->dev, dpu_kms->core_rev); dpu_kms->catalog = dpu_hw_catalog_init(dpu_kms->core_rev);
if (IS_ERR_OR_NULL(dpu_kms->catalog)) { if (IS_ERR_OR_NULL(dpu_kms->catalog)) {
rc = PTR_ERR(dpu_kms->catalog); rc = PTR_ERR(dpu_kms->catalog);
if (!dpu_kms->catalog) if (!dpu_kms->catalog)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment