drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 1 Dec 2023 21:18:45 +0000 (00:18 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 5 Dec 2023 19:14:34 +0000 (22:14 +0300)
commitcd42c56d9c0bb6007939408b4fbc62bbeccc9037
tree5533234c7805205ad0f328195333e0ae3a849b14
parent3285f4acb23c6ea611583fe32c4ad231daf15a08
drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt

It is incorrect to use devm-managed memory allocations for DRM data
structures exposed to userspace. They should use drmm_ allocations.
Change struct dpu_encoder allocation to use drmm_encoder_alloc(). This
removes the need to perform any actions on encoder destruction.

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570053/
Link: https://lore.kernel.org/r/20231201211845.1026967-14-dmitry.baryshkov@linaro.org
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c