linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeykumar Sankaran <jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
Cc: bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH v2 7/7] drm/msm: dpu: Don't continue after error in atomic_check
Date: Thu, 13 Sep 2018 15:34:00 -0700	[thread overview]
Message-ID: <9e9e7c7b65cba0c2ecd53c1c3ac5fdfd@codeaurora.org> (raw)
In-Reply-To: <20180912135459.216217-7-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>

On 2018-09-12 06:54, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> There's no benefit in falling out of the if, just return directly.
> 
> Changes in v2:
> - None
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---

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

>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 2cfa5583463e..1ce76460d710 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -1113,13 +1113,13 @@ static int dpu_plane_atomic_check(struct 
> drm_plane
> *plane,
>  		 | BIT(DPU_SSPP_CSC_10BIT))))) {
>  		DPU_ERROR_PLANE(pdpu,
>  				"plane doesn't have scaler/csc for
> yuv\n");
> -		ret = -EINVAL;
> +		return -EINVAL;
> 
>  	/* check src bounds */
>  	} else if (!dpu_plane_validate_src(&src, &fb_rect, min_src_size))
> {
>  		DPU_ERROR_PLANE(pdpu, "invalid source " DRM_RECT_FMT "\n",
>  				DRM_RECT_ARG(&src));
> -		ret = -E2BIG;
> +		return -E2BIG;
> 
>  	/* valid yuv image */
>  	} else if (DPU_FORMAT_IS_YUV(fmt) &&
> @@ -1128,22 +1128,22 @@ static int dpu_plane_atomic_check(struct 
> drm_plane
> *plane,
>  		    drm_rect_height(&src) & 0x1)) {
>  		DPU_ERROR_PLANE(pdpu, "invalid yuv source " DRM_RECT_FMT
> "\n",
>  				DRM_RECT_ARG(&src));
> -		ret = -EINVAL;
> +		return -EINVAL;
> 
>  	/* min dst support */
>  	} else if (drm_rect_width(&dst) < 0x1 || drm_rect_height(&dst) <
> 0x1) {
>  		DPU_ERROR_PLANE(pdpu, "invalid dest rect " DRM_RECT_FMT
> "\n",
>  				DRM_RECT_ARG(&dst));
> -		ret = -EINVAL;
> +		return -EINVAL;
> 
>  	/* check decimated source width */
>  	} else if (drm_rect_width(&src) > max_linewidth) {
>  		DPU_ERROR_PLANE(pdpu, "invalid src " DRM_RECT_FMT "
> line:%u\n",
>  				DRM_RECT_ARG(&src), max_linewidth);
> -		ret = -E2BIG;
> +		return -E2BIG;
>  	}
> 
> -	return ret;
> +	return 0;
>  }
> 
>  void dpu_plane_flush(struct drm_plane *plane)

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

  parent reply	other threads:[~2018-09-13 22:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 13:54 [PATCH v2 1/7] drm/msm: dpu: Remove impossible checks Sean Paul
     [not found] ` <20180912135459.216217-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-12 13:54   ` [PATCH v2 2/7] drm/msm: dpu: Move atomic_check_plane_state() call to atomic_check Sean Paul
     [not found]     ` <20180912135459.216217-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:24       ` Jeykumar Sankaran
2018-09-12 13:54   ` [PATCH v2 3/7] drm/msm: dpu: Consolidate atomic_check functions() Sean Paul
     [not found]     ` <20180912135459.216217-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:24       ` Jeykumar Sankaran
2018-09-12 13:54   ` [PATCH v2 4/7] drm/msm: dpu: Remove dpu_plane_sspp_enabled() Sean Paul
     [not found]     ` <20180912135459.216217-4-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:25       ` Jeykumar Sankaran
2018-09-12 13:54   ` [PATCH v2 5/7] drm/msm: dpu: Remove dpu_plane_enabled() Sean Paul
     [not found]     ` <20180912135459.216217-5-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:30       ` Jeykumar Sankaran
2018-09-12 13:54   ` [PATCH v2 6/7] drm/msm: dpu: Make dpu_plane_sspp_atomic_update() void Sean Paul
     [not found]     ` <20180912135459.216217-6-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:33       ` Jeykumar Sankaran
2018-09-12 13:54   ` [PATCH v2 7/7] drm/msm: dpu: Don't continue after error in atomic_check Sean Paul
     [not found]     ` <20180912135459.216217-7-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-09-13 22:34       ` Jeykumar Sankaran [this message]
2018-09-13 22:23   ` [PATCH v2 1/7] drm/msm: dpu: Remove impossible checks Jeykumar Sankaran
     [not found]     ` <3782b720d2c4bee1bc20cacff8f6f7f5-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-09-17 15:44       ` 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=9e9e7c7b65cba0c2ecd53c1c3ac5fdfd@codeaurora.org \
    --to=jsanka-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=bzwang-F7+t8E8rja9g9hUCZPvPmw@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 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).