All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeykumar Sankaran <jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
Cc: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH 1/6] drm/msm: Remove dpu_encoder_phys_ops->hw_reset()
Date: Mon, 08 Oct 2018 15:27:17 -0700	[thread overview]
Message-ID: <ea512dbc26e1e083a6431940ffff0b99@codeaurora.org> (raw)
In-Reply-To: <20180920145818.32468-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>

On 2018-09-20 07:58, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> We call out of the virt encoder into phys only to call back into the
> virt for hw reset. So remove the indirection and just call the virt
> function directly.
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c          |  6 ++----
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h     | 12 ------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c |  1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c |  1 -
>  4 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 8f6880db5c99..7842b66fbe2e 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -1509,7 +1509,7 @@ static int dpu_encoder_helper_wait_event_timeout(
>  	return rc;
>  }
> 
> -void dpu_encoder_helper_hw_reset(struct dpu_encoder_phys *phys_enc)
> +static void dpu_encoder_helper_hw_reset(struct dpu_encoder_phys
> *phys_enc)
>  {
>  	struct dpu_encoder_virt *dpu_enc;
>  	struct dpu_hw_ctl *ctl;
> @@ -1805,9 +1805,7 @@ void dpu_encoder_prepare_for_kickoff(struct
> drm_encoder *drm_enc,
>  	if (needs_hw_reset) {
>  		trace_dpu_enc_prepare_kickoff_reset(DRMID(drm_enc));
>  		for (i = 0; i < dpu_enc->num_phys_encs; i++) {
> -			phys = dpu_enc->phys_encs[i];
> -			if (phys && phys->ops.hw_reset)
> -				phys->ops.hw_reset(phys);
> +
> dpu_encoder_helper_hw_reset(dpu_enc->phys_encs[i]);
>  		}
>  	}
>  }
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> index 964efcc757a4..3a67bb9f9d9d 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> @@ -114,8 +114,6 @@ struct dpu_encoder_virt_ops {
>   * @handle_post_kickoff:	Do any work necessary post-kickoff work
>   * @trigger_start:		Process start event on physical encoder
>   * @needs_single_flush:		Whether encoder slaves need to be
> flushed
> - * @hw_reset:			Issue HW recovery such as CTL reset and
> clear
> - *				DPU_ENC_ERR_NEEDS_HW_RESET state
>   * @irq_control:		Handler to enable/disable all the encoder
> IRQs
>   * @prepare_idle_pc:		phys encoder can update the vsync_enable
> status
>   *                              on idle power collapse prepare
> @@ -151,7 +149,6 @@ struct dpu_encoder_phys_ops {
>  	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);
> -	void (*hw_reset)(struct dpu_encoder_phys *phys_enc);
>  	void (*irq_control)(struct dpu_encoder_phys *phys, bool enable);
>  	void (*prepare_idle_pc)(struct dpu_encoder_phys *phys_enc);
>  	void (*restore)(struct dpu_encoder_phys *phys);
> @@ -342,15 +339,6 @@ struct dpu_encoder_phys 
> *dpu_encoder_phys_cmd_init(
>   */
>  void dpu_encoder_helper_trigger_start(struct dpu_encoder_phys 
> *phys_enc);
> 
> -/**
> - * dpu_encoder_helper_hw_reset - issue ctl hw reset
> - *	This helper function may be optionally specified by physical
> - *	encoders if they require ctl hw reset. If state is currently
> - *	DPU_ENC_ERR_NEEDS_HW_RESET, it is set back to DPU_ENC_ENABLED.
> - * @phys_enc: Pointer to physical encoder structure
> - */
> -void dpu_encoder_helper_hw_reset(struct dpu_encoder_phys *phys_enc);
> -
>  static inline enum dpu_3d_blend_mode
> dpu_encoder_helper_get_3d_blend_mode(
>  		struct dpu_encoder_phys *phys_enc)
>  {
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
> index b2d7f0ded24c..c30ae05b3349 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
> @@ -776,7 +776,6 @@ static void dpu_encoder_phys_cmd_init_ops(
>  	ops->wait_for_vblank = dpu_encoder_phys_cmd_wait_for_vblank;
>  	ops->trigger_start = dpu_encoder_phys_cmd_trigger_start;
>  	ops->needs_single_flush = dpu_encoder_phys_cmd_needs_single_flush;
> -	ops->hw_reset = dpu_encoder_helper_hw_reset;
>  	ops->irq_control = dpu_encoder_phys_cmd_irq_control;
>  	ops->restore = dpu_encoder_phys_cmd_enable_helper;
>  	ops->prepare_idle_pc = dpu_encoder_phys_cmd_prepare_idle_pc;
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> index 84de385a9f62..283a2491f3e3 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
> @@ -766,7 +766,6 @@ static void dpu_encoder_phys_vid_init_ops(struct
> dpu_encoder_phys_ops *ops)
>  	ops->prepare_for_kickoff =
> dpu_encoder_phys_vid_prepare_for_kickoff;
>  	ops->handle_post_kickoff =
> dpu_encoder_phys_vid_handle_post_kickoff;
>  	ops->needs_single_flush = dpu_encoder_phys_vid_needs_single_flush;
> -	ops->hw_reset = dpu_encoder_helper_hw_reset;
>  	ops->get_line_count = dpu_encoder_phys_vid_get_line_count;
>  }

-- 
Jeykumar S
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-10-08 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 14:58 [PATCH 0/6] drm/msm: dpu: Various cleanup patches Sean Paul
     [not found] ` <20180920145818.32468-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-20 14:58   ` [PATCH 1/6] drm/msm: Remove dpu_encoder_phys_ops->hw_reset() Sean Paul
     [not found]     ` <20180920145818.32468-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:27       ` Jeykumar Sankaran [this message]
2018-09-20 14:58   ` [PATCH 2/6] drm/msm: dpu: Remove unused functions from msm_media_info.h Sean Paul
     [not found]     ` <20180920145818.32468-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:27       ` Jeykumar Sankaran
2018-09-20 14:58   ` [PATCH 3/6] drm/msm: dpu: Remove _dpu_encoder_power_enable() Sean Paul
     [not found]     ` <20180920145818.32468-4-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:27       ` Jeykumar Sankaran
2018-09-20 14:58   ` [PATCH 4/6] drm/msm: dpu: Remove 'inline' from several functions Sean Paul
     [not found]     ` <20180920145818.32468-5-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:29       ` Jeykumar Sankaran
2018-09-20 14:58   ` [PATCH 5/6] drm/msm: dpu: Remove empty/useless labels Sean Paul
     [not found]     ` <20180920145818.32468-6-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:24       ` Jeykumar Sankaran
     [not found]         ` <f27fd1ba508b4b3efdd17b31971d37c7-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-10-08 22:30           ` Jeykumar Sankaran
2018-09-20 14:58   ` [PATCH 6/6] drm/msm: dpu: Clean up _dpu_core_video_mode_intf_connected() Sean Paul
     [not found]     ` <20180920145818.32468-7-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-08 22:28       ` Jeykumar Sankaran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea512dbc26e1e083a6431940ffff0b99@codeaurora.org \
    --to=jsanka-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.