* [PATCH] drm: fix warnings in DSC
@ 2019-09-11 8:47 ` Benjamin Gaignard
0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Gaignard @ 2019-09-11 8:47 UTC (permalink / raw)
To: benjamin.gaignard, airlied, daniel, hwentlan, manasi.d.navare
Cc: dri-devel, linux-kernel, Benjamin Gaignard
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>
---
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,
--
2.15.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] drm: fix warnings in DSC
@ 2019-09-11 8:47 ` Benjamin Gaignard
0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Gaignard @ 2019-09-11 8:47 UTC (permalink / raw)
To: benjamin.gaignard, airlied, daniel, hwentlan, manasi.d.navare
Cc: dri-devel, linux-kernel, Benjamin Gaignard
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>
---
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,
--
2.15.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: fix warnings in DSC
2019-09-11 8:47 ` Benjamin Gaignard
@ 2019-09-11 13:41 ` Harry Wentland
-1 siblings, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2019-09-11 13:41 UTC (permalink / raw)
To: Benjamin Gaignard, benjamin.gaignard, airlied, daniel, manasi.d.navare
Cc: dri-devel, linux-kernel
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,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: fix warnings in DSC
@ 2019-09-11 13:41 ` Harry Wentland
0 siblings, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2019-09-11 13:41 UTC (permalink / raw)
To: Benjamin Gaignard, benjamin.gaignard, airlied, daniel, manasi.d.navare
Cc: linux-kernel, dri-devel
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,
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm: fix warnings in DSC
2019-09-11 13:41 ` Harry Wentland
(?)
@ 2019-09-16 13:15 ` Benjamin Gaignard
-1 siblings, 0 replies; 5+ messages in thread
From: Benjamin Gaignard @ 2019-09-16 13:15 UTC (permalink / raw)
To: Harry Wentland
Cc: Benjamin Gaignard, airlied, daniel, manasi.d.navare, dri-devel,
linux-kernel
Le mer. 11 sept. 2019 à 15:41, Harry Wentland <hwentlan@amd.com> a écrit :
>
> 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>
Applied on drm-misc-next
Thanks,
Benjamin
>
> 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,
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-16 13:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 8:47 [PATCH] drm: fix warnings in DSC Benjamin Gaignard
2019-09-11 8:47 ` Benjamin Gaignard
2019-09-11 13:41 ` Harry Wentland
2019-09-11 13:41 ` Harry Wentland
2019-09-16 13:15 ` Benjamin Gaignard
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.