* [PATCH] drm/amd/display: Remove duplicate/repeating expressions
@ 2023-02-10 10:00 ` Deepak R Varma
0 siblings, 0 replies; 7+ messages in thread
From: Deepak R Varma @ 2023-02-10 10:00 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar, Deepak R Varma
Remove duplicate or repeating expressions in the if condition
evaluation. Issue identified using doubletest.cocci Coccinelle semantic
patch.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
.../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
index 4b8f5fa0f0ad..ae89760d887d 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
@@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
- if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
- && mode_lib->vba.OutputFormat[k] == dm_n422
+ if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
&& !mode_lib->vba.DSC422NativeSupport)
mode_lib->vba.DSC422NativeNotSupported = true;
@@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_32
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_16
- && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_8
&& mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] drm/amd/display: Remove duplicate/repeating expressions
@ 2023-02-10 10:00 ` Deepak R Varma
0 siblings, 0 replies; 7+ messages in thread
From: Deepak R Varma @ 2023-02-10 10:00 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Praveen Kumar, Deepak R Varma, Saurabh Singh Sengar
Remove duplicate or repeating expressions in the if condition
evaluation. Issue identified using doubletest.cocci Coccinelle semantic
patch.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
.../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
index 4b8f5fa0f0ad..ae89760d887d 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
@@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
- if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
- && mode_lib->vba.OutputFormat[k] == dm_n422
+ if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
&& !mode_lib->vba.DSC422NativeSupport)
mode_lib->vba.DSC422NativeNotSupported = true;
@@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_32
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_16
- && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
&& mode_lib->vba.SourcePixelFormat[k] != dm_444_8
&& mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expressions
2023-02-10 10:00 ` Deepak R Varma
@ 2023-02-10 19:36 ` Harry Wentland
-1 siblings, 0 replies; 7+ messages in thread
From: Harry Wentland @ 2023-02-10 19:36 UTC (permalink / raw)
To: Deepak R Varma, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar
On 2/10/23 05:00, Deepak R Varma wrote:
> Remove duplicate or repeating expressions in the if condition
> evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> patch.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> index 4b8f5fa0f0ad..ae89760d887d 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> @@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
>
> if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
> mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
> - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
> - && mode_lib->vba.OutputFormat[k] == dm_n422
> + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
> && !mode_lib->vba.DSC422NativeSupport)
> mode_lib->vba.DSC422NativeNotSupported = true;
>
> @@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_32
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_8
> && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
> if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expressions
@ 2023-02-10 19:36 ` Harry Wentland
0 siblings, 0 replies; 7+ messages in thread
From: Harry Wentland @ 2023-02-10 19:36 UTC (permalink / raw)
To: Deepak R Varma, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Praveen Kumar, Saurabh Singh Sengar
On 2/10/23 05:00, Deepak R Varma wrote:
> Remove duplicate or repeating expressions in the if condition
> evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> patch.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> index 4b8f5fa0f0ad..ae89760d887d 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> @@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
>
> if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
> mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
> - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
> - && mode_lib->vba.OutputFormat[k] == dm_n422
> + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
> && !mode_lib->vba.DSC422NativeSupport)
> mode_lib->vba.DSC422NativeNotSupported = true;
>
> @@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_32
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> && mode_lib->vba.SourcePixelFormat[k] != dm_444_8
> && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
> if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expressions
2023-02-10 19:36 ` Harry Wentland
(?)
@ 2023-02-15 4:24 ` Alex Deucher
-1 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2023-02-15 4:24 UTC (permalink / raw)
To: Harry Wentland
Cc: Deepak R Varma, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel, Praveen Kumar,
Saurabh Singh Sengar
Applied. Thanks!
Alex
On Fri, Feb 10, 2023 at 2:37 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2/10/23 05:00, Deepak R Varma wrote:
> > Remove duplicate or repeating expressions in the if condition
> > evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> > patch.
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > index 4b8f5fa0f0ad..ae89760d887d 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > @@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> >
> > if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
> > mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
> > - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
> > - && mode_lib->vba.OutputFormat[k] == dm_n422
> > + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
> > && !mode_lib->vba.DSC422NativeSupport)
> > mode_lib->vba.DSC422NativeNotSupported = true;
> >
> > @@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> > if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_32
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_8
> > && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
> > if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expressions
@ 2023-02-15 4:24 ` Alex Deucher
0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2023-02-15 4:24 UTC (permalink / raw)
To: Harry Wentland
Cc: Saurabh Singh Sengar, Deepak R Varma, Pan, Xinhui,
Rodrigo Siqueira, linux-kernel, amd-gfx, Leo Li, dri-devel,
Alex Deucher, Praveen Kumar, Christian König
Applied. Thanks!
Alex
On Fri, Feb 10, 2023 at 2:37 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2/10/23 05:00, Deepak R Varma wrote:
> > Remove duplicate or repeating expressions in the if condition
> > evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> > patch.
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > index 4b8f5fa0f0ad..ae89760d887d 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > @@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> >
> > if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
> > mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
> > - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
> > - && mode_lib->vba.OutputFormat[k] == dm_n422
> > + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
> > && !mode_lib->vba.DSC422NativeSupport)
> > mode_lib->vba.DSC422NativeNotSupported = true;
> >
> > @@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> > if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_32
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_8
> > && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
> > if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expressions
@ 2023-02-15 4:24 ` Alex Deucher
0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2023-02-15 4:24 UTC (permalink / raw)
To: Harry Wentland
Cc: Saurabh Singh Sengar, Deepak R Varma, Pan, Xinhui,
Rodrigo Siqueira, linux-kernel, amd-gfx, Leo Li, dri-devel,
Daniel Vetter, Alex Deucher, Praveen Kumar, David Airlie,
Christian König
Applied. Thanks!
Alex
On Fri, Feb 10, 2023 at 2:37 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2/10/23 05:00, Deepak R Varma wrote:
> > Remove duplicate or repeating expressions in the if condition
> > evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> > patch.
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > index 4b8f5fa0f0ad..ae89760d887d 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
> > @@ -2335,8 +2335,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> >
> > if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.ForcedOutputLinkBPP[k] != 0)
> > mode_lib->vba.DSCOnlyIfNecessaryWithBPP = true;
> > - if ((mode_lib->vba.DSCEnable[k] || mode_lib->vba.DSCEnable[k])
> > - && mode_lib->vba.OutputFormat[k] == dm_n422
> > + if (mode_lib->vba.DSCEnable[k] && mode_lib->vba.OutputFormat[k] == dm_n422
> > && !mode_lib->vba.DSC422NativeSupport)
> > mode_lib->vba.DSC422NativeNotSupported = true;
> >
> > @@ -3639,7 +3638,6 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
> > if (mode_lib->vba.SourcePixelFormat[k] != dm_444_64
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_32
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > - && mode_lib->vba.SourcePixelFormat[k] != dm_444_16
> > && mode_lib->vba.SourcePixelFormat[k] != dm_444_8
> > && mode_lib->vba.SourcePixelFormat[k] != dm_rgbe) {
> > if (mode_lib->vba.ViewportWidthChroma[k] > mode_lib->vba.SurfaceWidthC[k]
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-15 4:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 10:00 [PATCH] drm/amd/display: Remove duplicate/repeating expressions Deepak R Varma
2023-02-10 10:00 ` Deepak R Varma
2023-02-10 19:36 ` Harry Wentland
2023-02-10 19:36 ` Harry Wentland
2023-02-15 4:24 ` Alex Deucher
2023-02-15 4:24 ` Alex Deucher
2023-02-15 4:24 ` Alex Deucher
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.