Commit 6c93a21d authored by Dmitry Baryshkov's avatar Dmitry Baryshkov
Browse files

drm/msm/dpu: move PINGPONG_NONE check to dpu_lm_init()



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: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: default avatarDmitry 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: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 76c40f14
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
+0 −5
Original line number Diff line number Diff line
@@ -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);