mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: Benjamin Gaignard <benjamin.gaignard@st.com>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"manasi.d.navare@intel.com" <manasi.d.navare@intel.com>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: fix warnings in DSC
Date: Wed, 11 Sep 2019 13:41:03 +0000	[thread overview]
Message-ID: <8235afe0-1796-1647-8a39-84ab354e290a@amd.com> (raw)
In-Reply-To: <20190911084759.6946-1-benjamin.gaignard@st.com>

On 2019-09-11 4:47 a.m., Benjamin Gaignard wrote:
> Remove always false comparisons due to limited range of nfl_bpg_offset
> and scale_increment_interval fields.
> Warnings detected when compiling with W=1.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/drm_dsc.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_dsc.c
> index 77f4e5ae4197..27e5c6036658 100644
> --- a/drivers/gpu/drm/drm_dsc.c
> +++ b/drivers/gpu/drm/drm_dsc.c
> @@ -336,12 +336,6 @@ int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg)
>  	else
>  		vdsc_cfg->nfl_bpg_offset = 0;
>  
> -	/* 2^16 - 1 */
> -	if (vdsc_cfg->nfl_bpg_offset > 65535) {
> -		DRM_DEBUG_KMS("NflBpgOffset is too large for this slice height\n");
> -		return -ERANGE;
> -	}
> -
>  	/* Number of groups used to code the entire slice */
>  	groups_total = groups_per_line * vdsc_cfg->slice_height;
>  
> @@ -371,11 +365,6 @@ int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg)
>  		vdsc_cfg->scale_increment_interval = 0;
>  	}
>  
> -	if (vdsc_cfg->scale_increment_interval > 65535) {
> -		DRM_DEBUG_KMS("ScaleIncrementInterval is large for slice height\n");
> -		return -ERANGE;
> -	}
> -
>  	/*
>  	 * DSC spec mentions that bits_per_pixel specifies the target
>  	 * bits/pixel (bpp) rate that is used by the encoder,
> 

  reply	other threads:[~2019-09-11 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11  8:47 Benjamin Gaignard
2019-09-11 13:41 ` Harry Wentland [this message]
2019-09-16 13:15   ` Benjamin Gaignard

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=8235afe0-1796-1647-8a39-84ab354e290a@amd.com \
    --to=hwentlan@amd.com \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=benjamin.gaignard@st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manasi.d.navare@intel.com \
    /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

all inboxes | Powered by JetHome®