drm: fix warnings in DSC
Subsystems (2)
PATCH 1/1 drm: fix warnings in DSC
Remove always false comparisons due to limited range of nfl_bpg_offset and scale_increment_interval fields.
Warnings detected when compiling with W=1.
--- drivers/gpu/drm/drm_dsc.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/gpu/drm/drm_dsc.c +0 -11
@@ -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,
Signature · 1 line
2.15.0
Quoted 5 lines · Benjamin Gaignard
Remove always false comparisons due to limited range of
nfl_bpg_offsetandscale_increment_intervalfields.
Warnings detected when compiling with W=1.Signed-off-by Benjamin Gaignard <[email protected]>
Harry
Quoted 24 lines
--- drivers/gpu/drm/drm_dsc.c | 11 ----------- 1 file changed, 11 deletions(-)drivers/gpu/drm/drm_dsc.c +0
-6@@ -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 ;
drivers/gpu/drm/drm_dsc.c int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg) · line 370
Quoted 10 lines
drivers/gpu/drm/drm_dsc.c +0
-5} -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Harry Wentland
Quoted 5 lines · Benjamin Gaignard
Remove always false comparisons due to limited range of
nfl_bpg_offsetandscale_increment_intervalfields.
Warnings detected when compiling with W=1.Signed-off-by Benjamin Gaignard <[email protected]>Reviewed-by Harry Wentland <[email protected]>
Applied on drm-misc-next
Thanks,
Benjamin
Quoted 37 lines
Harry
Quoted 34 lines
--- drivers/gpu/drm/drm_dsc.c | 11 ----------- 1 file changed, 11 deletions(-)drivers/gpu/drm/drm_dsc.c +0
-11@@ -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,