drm/msm/dpu: drop dpu_plane_pipe function
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 16 Mar 2023 16:16:27 +0000 (19:16 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 6 Apr 2023 17:29:41 +0000 (20:29 +0300)
There no more need for the dpu_plane_pipe() function, crtc code can
access pstate->pipe_hw.idx directly.

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/527320/
Link: https://lore.kernel.org/r/20230316161653.4106395-7-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h

index 1bdf78cae12a37a1514538b93a86183dc7b023dd..b1a6de44a88a9fc76c1ff78893ffed0c83860ab9 100644 (file)
@@ -432,7 +432,7 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
                pstate = to_dpu_plane_state(state);
                fb = state->fb;
 
-               sspp_idx = dpu_plane_pipe(plane);
+               sspp_idx = pstate->hw_sspp->idx;
                set_bit(sspp_idx, fetch_active);
 
                DRM_DEBUG_ATOMIC("crtc %d stage:%d - plane %d sspp %d fb %d\n",
@@ -1227,7 +1227,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
                pstates[cnt].dpu_pstate = dpu_pstate;
                pstates[cnt].drm_pstate = pstate;
                pstates[cnt].stage = pstate->normalized_zpos;
-               pstates[cnt].pipe_id = dpu_plane_pipe(plane);
+               pstates[cnt].pipe_id = to_dpu_plane_state(pstate)->hw_sspp->idx;
 
                dpu_pstate->needs_dirtyfb = needs_dirtyfb;
 
index 9dfbad6a949f43270981d8009bad7513ff5ac671..30438b7ce6f797d9c038b7673d195609e635198b 100644 (file)
@@ -1443,11 +1443,6 @@ static const struct drm_plane_helper_funcs dpu_plane_helper_funcs = {
                .atomic_update = dpu_plane_atomic_update,
 };
 
-enum dpu_sspp dpu_plane_pipe(struct drm_plane *plane)
-{
-       return plane ? to_dpu_plane(plane)->pipe : SSPP_NONE;
-}
-
 /* initialize plane */
 struct drm_plane *dpu_plane_init(struct drm_device *dev,
                uint32_t pipe, enum drm_plane_type type,
index 08a4b6a99f51312a40b90cb3eeddb0a0a78b6e6e..25e261cabadcad873f9acde3b53c57b8721022bc 100644 (file)
@@ -59,13 +59,6 @@ struct dpu_multirect_plane_states {
 #define to_dpu_plane_state(x) \
        container_of(x, struct dpu_plane_state, base)
 
-/**
- * dpu_plane_pipe - return sspp identifier for the given plane
- * @plane:   Pointer to DRM plane object
- * Returns: sspp identifier of the given plane
- */
-enum dpu_sspp dpu_plane_pipe(struct drm_plane *plane);
-
 /**
  * dpu_plane_flush - final plane operations before commit flush
  * @plane: Pointer to drm plane structure