[PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field
Marijn Suijten
marijn.suijten at somainline.org
Mon Jun 26 12:28:58 UTC 2023
On 2023-06-20 00:25:04, Dmitry Baryshkov wrote:
> There is always a single MDP TOP block. Drop the mdp_count field and
> stop declaring dpu_mdp_cfg instances as arrays.
>
> Tested-by: Marijn Suijten <marijn.suijten at somainline.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
<snip>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> index a1a9e44bed36..c89746c6f500 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> @@ -146,13 +146,11 @@ struct dpu_hw_mdp {
>
> /**
> * dpu_hw_mdptop_init - initializes the top driver for the passed idx
No index is passed anymore, only a pointer directly to const catalog
data. After fixing that:
Reviewed-by: Marijn Suijten <marijn.suijten at somainline.org>
> - * @idx: Interface index for which driver object is required
> + * @cfg: MDP TOP configuration from catalog
> * @addr: Mapped register io address of MDP
> - * @m: Pointer to mdss catalog data
> */
> -struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx,
> - void __iomem *addr,
> - const struct dpu_mdss_cfg *m);
> +struct dpu_hw_mdp *dpu_hw_mdptop_init(const struct dpu_mdp_cfg *cfg,
> + void __iomem *addr);
>
> void dpu_hw_mdp_destroy(struct dpu_hw_mdp *mdp);
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index aa8499de1b9f..882f20fc51cc 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -1092,8 +1092,8 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
>
> dpu_kms->rm_init = true;
>
> - dpu_kms->hw_mdp = dpu_hw_mdptop_init(MDP_TOP, dpu_kms->mmio,
> - dpu_kms->catalog);
> + dpu_kms->hw_mdp = dpu_hw_mdptop_init(dpu_kms->catalog->mdp,
> + dpu_kms->mmio);
> if (IS_ERR(dpu_kms->hw_mdp)) {
> rc = PTR_ERR(dpu_kms->hw_mdp);
> DPU_ERROR("failed to get hw_mdp: %d\n", rc);
> --
> 2.39.2
>
More information about the dri-devel
mailing list