linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
To: Bruce Wang <bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH v2 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void
Date: Fri, 21 Sep 2018 11:52:26 -0400	[thread overview]
Message-ID: <20180921155226.GL72545@art_vandelay> (raw)
In-Reply-To: <20180920173853.GE809-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>

On Thu, Sep 20, 2018 at 11:38:54AM -0600, Jordan Crouse wrote:
> On Thu, Sep 20, 2018 at 12:49:23PM -0400, Bruce Wang wrote:
> > Removed all impossible checks from the function, which eliminates
> > the need for a return value. This function is also never used
> > outside of dpu_plane.c, so the function is made static.
> > 
> > Signed-off-by: Bruce Wang <bzwang@chromium.org>
> > ---
> >  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 27 +++++------------------
> >  1 file changed, 5 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > index 9a5d5afa53f2..f9e65acdf87e 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> > @@ -363,35 +363,18 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane,
> >  			&pdpu->pipe_qos_cfg);
> >  }
> >  
> > -int dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
> > +static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
> >  {
> > -	struct dpu_plane *pdpu;
> > -	struct msm_drm_private *priv;
> > -	struct dpu_kms *dpu_kms;
> > -
> > -	if (!plane || !plane->dev) {
> > -		DPU_ERROR("invalid arguments\n");
> > -		return -EINVAL;
> > -	}
> > -
> > -	priv = plane->dev->dev_private;
> > -	if (!priv || !priv->kms) {
> > -		DPU_ERROR("invalid KMS reference\n");
> > -		return -EINVAL;
> > -	}
> > -
> > -	dpu_kms = to_dpu_kms(priv->kms);
> > -	pdpu = to_dpu_plane(plane);
> > +	struct dpu_plane *pdpu = to_dpu_plane(plane);
> > +	struct msm_drm_private *priv = plane->dev->dev_private;
> > +	struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
> 
> I think _dpu_plane_get_kms() can be used here.

Nice catch on the _dpu_blah_get_kms() funcs :-). With that change

Reviewed-by: Sean Paul <seanpaul@chromium.org>


> 
> >  	if (!pdpu->is_rt_pipe)
> > -		goto end;
> > +		return;
> >  
> >  	pm_runtime_get_sync(&dpu_kms->pdev->dev);
> >  	_dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL);
> >  	pm_runtime_put_sync(&dpu_kms->pdev->dev);
> > -
> > -end:
> > -	return 0;
> >  }
> >  
> >  /**
> > -- 
> > 2.19.0.444.g18242da7ef-goog
> > 
> > _______________________________________________
> > Freedreno mailing list
> > Freedreno@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/freedreno
> 
> -- 
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> _______________________________________________
> Freedreno mailing list
> Freedreno@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/freedreno

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-09-21 15:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 16:49 [PATCH v2 0/7] drm/msm/dpu: Clean up dpu code Bruce Wang
     [not found] ` <20180920164924.225847-1-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-20 16:49   ` [PATCH v2 1/7] drm/msm/dpu: Remove unneeded checks in dpu_plane.c Bruce Wang
     [not found]     ` <20180920164924.225847-2-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-20 17:29       ` Jordan Crouse
2018-09-21 15:43       ` Sean Paul
2018-09-20 16:49   ` [PATCH v2 2/7] drm/msm/dpu: Clean up plane atomic disable/update Bruce Wang
     [not found]     ` <20180920164924.225847-3-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-21 15:44       ` Sean Paul
2018-09-20 16:49   ` [PATCH v2 3/7] drm/msm/dpu: Remove unneeded checks in dpu_crtc.c Bruce Wang
     [not found]     ` <20180920164924.225847-4-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-21 15:49       ` Sean Paul
2018-09-20 16:49   ` [PATCH v2 4/7] drm/msm/dpu: Change _dpu_crtc_power_enable to void Bruce Wang
     [not found]     ` <20180920164924.225847-5-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-20 17:36       ` Jordan Crouse
     [not found]         ` <20180920173634.GD809-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-09-21 15:51           ` Sean Paul
2018-09-24 16:00             ` Bruce Wang
2018-09-20 16:49   ` [PATCH v2 5/7] drm/msm/dpu: Change _dpu_crtc_vblank_enable_no_lock " Bruce Wang
     [not found]     ` <20180920164924.225847-6-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-21 15:51       ` Sean Paul
2018-09-20 16:49   ` [PATCH v2 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void Bruce Wang
     [not found]     ` <20180920164924.225847-7-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-20 17:38       ` Jordan Crouse
     [not found]         ` <20180920173853.GE809-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-09-21 15:52           ` Sean Paul [this message]
2018-09-20 16:49   ` [PATCH v2 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void Bruce Wang
     [not found]     ` <20180920164924.225847-8-bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-09-21 15:55       ` Sean Paul

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=20180921155226.GL72545@art_vandelay \
    --to=sean-p7ytbzm4h96eqtr555yldq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).