]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: inline _setup_dspp_ops()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 22 May 2025 19:03:24 +0000 (22:03 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 4 Jul 2025 13:35:15 +0000 (16:35 +0300)
Inline the _setup_dspp_ops() function, it makes it easier to handle
different conditions involving DSPP configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655372/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-5-3b2085a07884@oss.qualcomm.com
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c

index 829ca272873e45b122c04bea7da22dc569732e10..0f5a74398e66642fba48c112db41ffc75ae2a79f 100644 (file)
@@ -63,13 +63,6 @@ static void dpu_setup_dspp_pcc(struct dpu_hw_dspp *ctx,
        DPU_REG_WRITE(&ctx->hw, base, PCC_EN);
 }
 
-static void _setup_dspp_ops(struct dpu_hw_dspp *c,
-               unsigned long features)
-{
-       if (test_bit(DPU_DSPP_PCC, &features))
-               c->ops.setup_pcc = dpu_setup_dspp_pcc;
-}
-
 /**
  * dpu_hw_dspp_init() - Initializes the DSPP hw driver object.
  * should be called once before accessing every DSPP.
@@ -97,7 +90,8 @@ struct dpu_hw_dspp *dpu_hw_dspp_init(struct drm_device *dev,
        /* Assign ops */
        c->idx = cfg->id;
        c->cap = cfg;
-       _setup_dspp_ops(c, c->cap->features);
+       if (test_bit(DPU_DSPP_PCC, &c->cap->features))
+               c->ops.setup_pcc = dpu_setup_dspp_pcc;
 
        return c;
 }