]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/msm/dpu: move PINGPONG_NONE check to dpu_lm_init()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 19 May 2023 23:40:25 +0000 (02:40 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 22 May 2023 07:14:19 +0000 (10:14 +0300)
Move the check for lm->pingpong being not NONE from dpu_rm_init() to
dpu_lm_init(), following the change to dpu_hw_intf_init().

Suggested-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/538206/
Link: https://lore.kernel.org/r/20230519234025.2864377-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

index 214f207ddf8ad20a23c69c69449297e10c44540c..d1c3bd8379ea947280d84516c607d7d70786c40b 100644 (file)
@@ -161,6 +161,11 @@ struct dpu_hw_mixer *dpu_hw_lm_init(const struct dpu_lm_cfg *cfg,
 {
        struct dpu_hw_mixer *c;
 
+       if (cfg->pingpong == PINGPONG_NONE) {
+               DPU_DEBUG("skip mixer %d without pingpong\n", cfg->id);
+               return NULL;
+       }
+
        c = kzalloc(sizeof(*c), GFP_KERNEL);
        if (!c)
                return ERR_PTR(-ENOMEM);
index bf7b8e7c45b1348435924f48bdb5f6e3dd69fe62..2ca3c666e22ff4294a6a8b11b8d822a93850583f 100644 (file)
@@ -117,11 +117,6 @@ int dpu_rm_init(struct dpu_rm *rm,
                struct dpu_hw_mixer *hw;
                const struct dpu_lm_cfg *lm = &cat->mixer[i];
 
-               if (lm->pingpong == PINGPONG_NONE) {
-                       DPU_DEBUG("skip mixer %d without pingpong\n", lm->id);
-                       continue;
-               }
-
                hw = dpu_hw_lm_init(lm, mmio);
                if (IS_ERR(hw)) {
                        rc = PTR_ERR(hw);