]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/msm/dpu: add DSPP blocks teardown
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 21 Jan 2022 21:06:14 +0000 (00:06 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 17:15:11 +0000 (20:15 +0300)
Add missing calls to dpu_hw_dspp_destroy() to free resources allocated
for DSPP hardware blocks.

Fixes: b6938f94391d ("drm/msm/dpu: add support for color processing blocks in dpu driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Link: https://lore.kernel.org/r/20220121210618.3482550-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

index b5b1ea1e4de63dfa9bbe20023440783cc1bae0e2..63ed0d7df84874e33a8029c1ca15be1e36737e9b 100644 (file)
@@ -35,6 +35,14 @@ int dpu_rm_destroy(struct dpu_rm *rm)
 {
        int i;
 
+       for (i = 0; i < ARRAY_SIZE(rm->dspp_blks); i++) {
+               struct dpu_hw_dspp *hw;
+
+               if (rm->dspp_blks[i]) {
+                       hw = to_dpu_hw_dspp(rm->dspp_blks[i]);
+                       dpu_hw_dspp_destroy(hw);
+               }
+       }
        for (i = 0; i < ARRAY_SIZE(rm->pingpong_blks); i++) {
                struct dpu_hw_pingpong *hw;