[Freedreno] [PATCH 04/11] drm/msm/dpu: remove stage_cfg from struct dpu_crtc
abhinavk at codeaurora.org
abhinavk at codeaurora.org
Thu Oct 21 22:30:11 UTC 2021
On 2021-09-30 06:59, Dmitry Baryshkov wrote:
> 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 at linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk at codeaurora.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 ++++++-----
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 2 --
> 2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 768012243b44..19f0715a4089 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -207,7 +207,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;
> @@ -216,7 +217,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;
> @@ -292,6 +292,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);
> @@ -305,9 +306,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;
> @@ -328,7 +329,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);
> }
> }
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> index cec3474340e8..30535acec670 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> @@ -116,7 +116,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
> @@ -147,7 +146,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;
More information about the Freedreno
mailing list