drm/msm/dpu: pass dpu_format to _dpu_hw_sspp_setup_scaler3()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 16 Mar 2023 16:16:30 +0000 (19:16 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 6 Apr 2023 17:29:41 +0000 (20:29 +0300)
There is no need to pass full dpu_hw_sspp_cfg instance to
_dpu_hw_sspp_setup_scaler3, pass just struct dpu_format pointer.

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/527328/
Link: https://lore.kernel.org/r/20230316161653.4106395-10-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index a1492a7..3030cd3 100644 (file)
@@ -419,19 +419,18 @@ static void dpu_hw_sspp_setup_pe_config(struct dpu_hw_sspp *ctx,
 }
 
 static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_sspp *ctx,
-               struct dpu_hw_sspp_cfg *sspp,
-               void *scaler_cfg)
+               struct dpu_hw_scaler3_cfg *scaler3_cfg,
+               const struct dpu_format *format)
 {
        u32 idx;
-       struct dpu_hw_scaler3_cfg *scaler3_cfg = scaler_cfg;
 
-       if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx) || !sspp
+       if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx)
                || !scaler3_cfg)
                return;
 
        dpu_hw_setup_scaler3(&ctx->hw, scaler3_cfg, idx,
                        ctx->cap->sblk->scaler_blk.version,
-                       sspp->layout.format);
+                       format);
 }
 
 static u32 _dpu_hw_sspp_get_scaler3_ver(struct dpu_hw_sspp *ctx)
index 5903413..136b871 100644 (file)
@@ -317,13 +317,12 @@ struct dpu_hw_sspp_ops {
 
        /**
         * setup_scaler - setup scaler
-        * @ctx: Pointer to pipe context
-        * @pipe_cfg: Pointer to pipe configuration
-        * @scaler_cfg: Pointer to scaler configuration
+        * @scaler3_cfg: Pointer to scaler configuration
+        * @format: pixel format parameters
         */
        void (*setup_scaler)(struct dpu_hw_sspp *ctx,
-               struct dpu_hw_sspp_cfg *pipe_cfg,
-               void *scaler_cfg);
+               struct dpu_hw_scaler3_cfg *scaler3_cfg,
+               const struct dpu_format *format);
 
        /**
         * get_scaler_ver - get scaler h/w version
index e48e540..f9ba6c4 100644 (file)
@@ -678,8 +678,8 @@ static void _dpu_plane_setup_scaler(struct dpu_sw_pipe *pipe,
        if (pipe_hw->ops.setup_scaler &&
                        pipe->multirect_index != DPU_SSPP_RECT_1)
                pipe_hw->ops.setup_scaler(pipe_hw,
-                               pipe_cfg,
-                               &scaler3_cfg);
+                               &scaler3_cfg,
+                               fmt);
 }
 
 /**