drm/msm/dpu: remove struct encoder_kickoff_params
PATCH 1/1 drm/msm/dpu: remove struct encoder_kickoff_params
The contents of struct encoder_kickoff_params are never used. Remove the structure and all remnants of it from function calls.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 ++----- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +++---- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 9 +-------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 5 ++--- 6 files changed, 11 insertions(+), 25 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -5
@@ -716,11 +716,8 @@ void dpu_crtc_commit_kickoff(struct drm_crtc *crtc, bool async)* may delay and flush at an irq event (e.g. ppdone) */ drm_for_each_encoder_mask (encoder, crtc->dev, - crtc->state->encoder_mask) { -struct dpu_encoder_kickoff_params params = {0 }; -dpu_encoder_prepare_for_kickoff (encoder, ¶ms, async); - } - + crtc->state->encoder_mask) +dpu_encoder_prepare_for_kickoff (encoder, async);if (!async) {/* wait for frame_event_done completion */
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +3 -4
@@ -1758,15 +1758,14 @@ static void dpu_encoder_vsync_event_work_handler(struct kthread_work *work) nsecs_to_jiffies(ktime_to_ns(wakeup_time))); } -void dpu_encoder_prepare_for_kickoff (struct drm_encoder *drm_enc, -struct dpu_encoder_kickoff_params *params,bool async) +void dpu_encoder_prepare_for_kickoff (struct drm_encoder *drm_enc,bool async) {struct dpu_encoder_virt *dpu_enc;struct dpu_encoder_phys *phys;bool needs_hw_reset = false;unsigned int i; -if (!drm_enc || !params) { +if (!drm_enc) {DPU_ERROR ("invalid args\n" );return ; }
@@ -1780,7 +1779,7 @@ void dpu_encoder_prepare_for_kickoff(struct drm_encoder *drm_enc, phys = dpu_enc->phys_encs[i];if (phys) {if (phys->ops.prepare_for_kickoff) - phys->ops.prepare_for_kickoff (phys, params); + phys->ops.prepare_for_kickoff (phys);if (phys->enable_state ==DPU_ENC_ERR_NEEDS_HW_RESET ) needs_hw_reset = true; }
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +1 -8
@@ -37,11 +37,6 @@ struct dpu_encoder_hw_resources {enum dpu_intf_mode intfs[INTF_MAX ]; }; -/** -* dpu_encoder_kickoff_params - info encoder requires at kickoff -* @affected_displays: bitmask, bit set means the ROI of the commit lies within -* the bounds of the physical display at the bit index -*/ struct dpu_encoder_kickoff_params {unsigned long affected_displays; };
@@ -88,11 +83,9 @@ void dpu_encoder_register_frame_event_callback(struct drm_encoder *encoder,* Immediately: if no previous commit is outstanding. * Delayed: Block until next trigger can be issued. * @encoder: encoder pointer -* @params: kickoff time parameters * @async: true if this is an asynchronous commit */ -void dpu_encoder_prepare_for_kickoff (struct drm_encoder *encoder, -struct dpu_encoder_kickoff_params *params,bool async); +void dpu_encoder_prepare_for_kickoff (struct drm_encoder *encoder,bool async);/** * dpu_encoder_trigger_kickoff_pending - Clear the flush bits from previous
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +1 -2
@@ -144,8 +144,7 @@ struct dpu_encoder_phys_ops {int (*wait_for_commit_done)(struct dpu_encoder_phys *phys_enc);int (*wait_for_tx_complete)(struct dpu_encoder_phys *phys_enc);int (*wait_for_vblank)(struct dpu_encoder_phys *phys_enc); -void (*prepare_for_kickoff)(struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params); +void (*prepare_for_kickoff)(struct dpu_encoder_phys *phys_enc);void (*handle_post_kickoff)(struct dpu_encoder_phys *phys_enc);void (*trigger_start)(struct dpu_encoder_phys *phys_enc);bool (*needs_single_flush)(struct dpu_encoder_phys *phys_enc);
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +2 -3
@@ -594,8 +594,7 @@ static void dpu_encoder_phys_cmd_get_hw_resources( }static void dpu_encoder_phys_cmd_prepare_for_kickoff ( -struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params) +struct dpu_encoder_phys *phys_enc) {struct dpu_encoder_phys_cmd *cmd_enc =to_dpu_encoder_phys_cmd (phys_enc);
@@ -693,7 +692,7 @@ static int dpu_encoder_phys_cmd_wait_for_commit_done(/* required for both controllers */ if (!rc && cmd_enc->serialize_wait4pp) -dpu_encoder_phys_cmd_prepare_for_kickoff (phys_enc,NULL ); +dpu_encoder_phys_cmd_prepare_for_kickoff (phys_enc);return rc; }
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +2 -3
@@ -587,14 +587,13 @@ static int dpu_encoder_phys_vid_wait_for_vblank( }static void dpu_encoder_phys_vid_prepare_for_kickoff ( -struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params) +struct dpu_encoder_phys *phys_enc) {struct dpu_encoder_phys_vid *vid_enc;struct dpu_hw_ctl *ctl;int rc; -if (!phys_enc || !params) { +if (!phys_enc) {DPU_ERROR ("invalid encoder/parameters\n" );return ; }
Signature · 6 lines
2.20.1.415.g653613c723-goog _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
A message that is not in the archive (sent off-list or not yet received): 20181221194110.108573-1-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Quoted 83 lines · Bruce Wang
The contents of struct
encoder_kickoff_paramsare never used. Remove the structure and all remnants of it from function calls.Signed-off-by Bruce Wang <[email protected]>--- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 ++----- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +++---- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 9 +-------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 5 ++--- 6 files changed, 11 insertions(+), 25 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2
-5@@ -716,11 +716,8 @@ void dpu_crtc_commit_kickoff(struct drm_crtc*crtc, bool async) * may delay and flush at an irq event (e.g. ppdone) */ drm_for_each_encoder_mask (encoder, crtc->dev, - crtc->state->encoder_mask) { -struct dpu_encoder_kickoff_params params = {0 }; -dpu_encoder_prepare_for_kickoff (encoder, ¶ms, async); - } - + crtc->state->encoder_mask) +dpu_encoder_prepare_for_kickoff (encoder, async);drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +0
-0if (!async) {/* wait for frame_event_done completion */ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +2
-3@@ -1758,15 +1758,14 @@ static void dpu_encoder_vsync_event_work_handler(struct kthread_work *work) nsecs_to_jiffies(ktime_to_ns(wakeup_time))); } -void dpu_encoder_prepare_for_kickoff (struct drm_encoder *drm_enc, -struct dpu_encoder_kickoff_params *params,bool async) +void dpu_encoder_prepare_for_kickoff (struct drm_encoder *drm_enc,bool async) {struct dpu_encoder_virt *dpu_enc;struct dpu_encoder_phys *phys;bool needs_hw_reset = false;unsigned int i; -if (!drm_enc || !params) { +if (!drm_enc) {DPU_ERROR ("invalid args\n" );drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +1
-1return ; }@@ -1780,7 +1779,7 @@ void dpu_encoder_prepare_for_kickoff(structdrm_encoder *drm_enc, phys = dpu_enc->phys_encs[i];if (phys) {if (phys->ops.prepare_for_kickoff) - phys->ops.prepare_for_kickoff (phys, params); + phys->ops.prepare_for_kickoff (phys); if (phys->enable_state ==
DPU_ENC_ERR_NEEDS_HW_RESET)drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +0
-0needs_hw_reset = true; }drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +0
-3@@ -37,11 +37,6 @@ struct dpu_encoder_hw_resources {enum dpu_intf_mode intfs[INTF_MAX ]; }; -/** -* dpu_encoder_kickoff_params - info encoder requires at kickoff -* @affected_displays: bitmask, bit set means the ROI of the commit
Quoted 8 lines
lies
within
- * the bounds of the physical display at the bit
index
- */
structdpu_encoder_kickoff_params{
unsigned longaffected_displays;
};
Shouldn't you be removing this structure here?
Thanks,
Jeykumar S
Quoted 80 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +0
-0@@ -88,11 +83,9 @@ voiddpu_encoder_register_frame_event_callback(struct
drm_encoder*encoder,
* Immediately: if no previous commit is outstanding.
* Delayed: Block until next trigger can be issued.
* @encoder: encoder pointer
- * @params: kickoff time parameters
* @async: true if this is an asynchronous commit
*/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +1
-2-void dpu_encoder_prepare_for_kickoff (struct drm_encoder *encoder, -struct dpu_encoder_kickoff_params *params,bool async); +void dpu_encoder_prepare_for_kickoff(struct drm_encoder *encoder,bool
async);/**
*dpu_encoder_trigger_kickoff_pending- Clear the flush bits from
previousdrivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +1
-2@@ -144,8 +144,7 @@ struct dpu_encoder_phys_ops {int (*wait_for_commit_done)(struct dpu_encoder_phys *phys_enc);int (*wait_for_tx_complete)(struct dpu_encoder_phys *phys_enc);int (*wait_for_vblank)(struct dpu_encoder_phys *phys_enc); -void (*prepare_for_kickoff)(struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params); +void (*prepare_for_kickoff)(struct dpu_encoder_phys *phys_enc);void (*handle_post_kickoff)(struct dpu_encoder_phys *phys_enc);void (*trigger_start)(struct dpu_encoder_phys *phys_enc);bool (*needs_single_flush)(struct dpu_encoder_phys *phys_enc);drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +1
-2@@ -594,8 +594,7 @@ static void dpu_encoder_phys_cmd_get_hw_resources( }static void dpu_encoder_phys_cmd_prepare_for_kickoff ( -struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params) +struct dpu_encoder_phys *phys_enc) {struct dpu_encoder_phys_cmd *cmd_enc =to_dpu_encoder_phys_cmd (phys_enc);@@ -693,7 +692,7 @@ static intdpu_encoder_phys_cmd_wait_for_commit_done(
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +1
-1/* required for both controllers */ if (!rc && cmd_enc->serialize_wait4pp) -dpu_encoder_phys_cmd_prepare_for_kickoff (phys_enc,NULL ); +dpu_encoder_phys_cmd_prepare_for_kickoff (phys_enc);return rc; }drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +2
-3@@ -587,14 +587,13 @@ static int dpu_encoder_phys_vid_wait_for_vblank( }static void dpu_encoder_phys_vid_prepare_for_kickoff ( -struct dpu_encoder_phys *phys_enc, -struct dpu_encoder_kickoff_params *params) +struct dpu_encoder_phys *phys_enc) {struct dpu_encoder_phys_vid *vid_enc;struct dpu_hw_ctl *ctl;int rc; -if (!phys_enc || !params) { +if (!phys_enc) {DPU_ERROR ("invalid encoder/parameters\n" );return ; }
Signature · 5 lines
Jeykumar S _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno