OSDN Git Service

drm/msm/dpu: remove stage_cfg from struct dpu_crtc
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 30 Sep 2021 13:59:55 +0000 (16:59 +0300)
committerRob Clark <robdclark@chromium.org>
Sun, 28 Nov 2021 17:32:02 +0000 (09:32 -0800)
The stage_cfg is not used outside of _dpu_crtc_blend_setup(), so remove
the temporary config from global struct.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Link: https://lore.kernel.org/r/20210930140002.308628-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h

index 967245b..d290809 100644 (file)
@@ -337,7 +337,8 @@ static void _dpu_crtc_program_lm_output_roi(struct drm_crtc *crtc)
 }
 
 static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
-       struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer)
+       struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer,
+       struct dpu_hw_stage_cfg *stage_cfg)
 {
        struct drm_plane *plane;
        struct drm_framebuffer *fb;
@@ -346,7 +347,6 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
        struct dpu_plane_state *pstate = NULL;
        struct dpu_format *format;
        struct dpu_hw_ctl *ctl = mixer->lm_ctl;
-       struct dpu_hw_stage_cfg *stage_cfg = &dpu_crtc->stage_cfg;
 
        u32 flush_mask;
        uint32_t stage_idx, lm_idx;
@@ -422,6 +422,7 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
        struct dpu_crtc_mixer *mixer = cstate->mixers;
        struct dpu_hw_ctl *ctl;
        struct dpu_hw_mixer *lm;
+       struct dpu_hw_stage_cfg stage_cfg;
        int i;
 
        DRM_DEBUG_ATOMIC("%s\n", dpu_crtc->name);
@@ -435,9 +436,9 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
        }
 
        /* initialize stage cfg */
-       memset(&dpu_crtc->stage_cfg, 0, sizeof(struct dpu_hw_stage_cfg));
+       memset(&stage_cfg, 0, sizeof(struct dpu_hw_stage_cfg));
 
-       _dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer);
+       _dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer, &stage_cfg);
 
        for (i = 0; i < cstate->num_mixers; i++) {
                ctl = mixer[i].lm_ctl;
@@ -458,7 +459,7 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
                        mixer[i].flush_mask);
 
                ctl->ops.setup_blendstage(ctl, mixer[i].hw_lm->idx,
-                       &dpu_crtc->stage_cfg);
+                       &stage_cfg);
        }
 }
 
index ae9546c..4328e13 100644 (file)
@@ -129,7 +129,6 @@ struct dpu_crtc_frame_event {
  * @drm_requested_vblank : Whether vblanks have been enabled in the encoder
  * @property_info : Opaque structure for generic property support
  * @property_defaults : Array of default values for generic property support
- * @stage_cfg     : H/w mixer stage configuration
  * @debugfs_root  : Parent of debugfs node
  * @vblank_cb_count : count of vblank callback since last reset
  * @play_count    : frame count between crtc enable and disable
@@ -161,7 +160,6 @@ struct dpu_crtc {
        struct drm_pending_vblank_event *event;
        u32 vsync_count;
 
-       struct dpu_hw_stage_cfg stage_cfg;
        struct dentry *debugfs_root;
 
        u32 vblank_cb_count;