diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-12-02 00:18:38 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-12-05 22:14:33 +0300 |
commit | a106ed98af6848ef5810b12f5c9e2e0566f1d9c4 (patch) | |
tree | ec7e08154fdc6a10785f67314595d6dc4d7c21f9 /drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | |
parent | 1e897dcc4c673b9d585c09ddcdbe7fab0934e64f (diff) | |
download | linux-stable-a106ed98af6848ef5810b12f5c9e2e0566f1d9c4.tar.gz linux-stable-a106ed98af6848ef5810b12f5c9e2e0566f1d9c4.tar.bz2 linux-stable-a106ed98af6848ef5810b12f5c9e2e0566f1d9c4.zip |
drm/msm/dpu: use devres-managed allocation for HW blocks
Use devm_kzalloc to create HW block structure. This allows us to remove
corresponding kfree and drop all dpu_hw_*_destroy() functions as well as
dpu_rm_destroy(), which becomes empty afterwards.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570041/
Link: https://lore.kernel.org/r/20231201211845.1026967-7-dmitry.baryshkov@linaro.org
Diffstat (limited to 'drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h')
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h index bea965681330..3b435690b6cc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h @@ -81,18 +81,14 @@ static inline struct dpu_hw_dspp *to_dpu_hw_dspp(struct dpu_hw_blk *hw) /** * dpu_hw_dspp_init() - Initializes the DSPP hw driver object. * should be called once before accessing every DSPP. + * @dev: Corresponding device for devres management * @cfg: DSPP catalog entry for which driver object is required * @addr: Mapped register io address of MDP * Return: pointer to structure or ERR_PTR */ -struct dpu_hw_dspp *dpu_hw_dspp_init(const struct dpu_dspp_cfg *cfg, - void __iomem *addr); - -/** - * dpu_hw_dspp_destroy(): Destroys DSPP driver context - * @dspp: Pointer to DSPP driver context - */ -void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp); +struct dpu_hw_dspp *dpu_hw_dspp_init(struct drm_device *dev, + const struct dpu_dspp_cfg *cfg, + void __iomem *addr); #endif /*_DPU_HW_DSPP_H */ |