* [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions
@ 2021-05-10 12:16 ` Zhen Lei
0 siblings, 0 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-10 12:16 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David Airlie, Daniel Vetter, amd-gfx, dri-devel
Cc: Zhen Lei
The result of an expression consisting of a single relational operator is
already of the bool type and does not need to be evaluated explicitly.
No functional change.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
index 8dc3d1f7398422e..2feb051a200294a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
@@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut(
next_mode = LUT_RAM_A;
dpp20_power_on_blnd_lut(dpp_base, true);
- dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp20_program_blnd_luta_settings(dpp_base, params);
@@ -893,7 +893,7 @@ bool dpp20_program_shaper(
else
next_mode = LUT_RAM_A;
- dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp20_program_shaper_luta_settings(dpp_base, params);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
index 910c17fd4278932..950c9bfd53de516 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
@@ -874,7 +874,7 @@ bool mpc3_program_shaper(
else
next_mode = LUT_RAM_A;
- mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
+ mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
if (next_mode == LUT_RAM_A)
mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions
@ 2021-05-10 12:16 ` Zhen Lei
0 siblings, 0 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-10 12:16 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David Airlie, Daniel Vetter, amd-gfx, dri-devel
Cc: Zhen Lei
The result of an expression consisting of a single relational operator is
already of the bool type and does not need to be evaluated explicitly.
No functional change.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
index 8dc3d1f7398422e..2feb051a200294a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
@@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut(
next_mode = LUT_RAM_A;
dpp20_power_on_blnd_lut(dpp_base, true);
- dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp20_program_blnd_luta_settings(dpp_base, params);
@@ -893,7 +893,7 @@ bool dpp20_program_shaper(
else
next_mode = LUT_RAM_A;
- dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+ dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
if (next_mode == LUT_RAM_A)
dpp20_program_shaper_luta_settings(dpp_base, params);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
index 910c17fd4278932..950c9bfd53de516 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
@@ -874,7 +874,7 @@ bool mpc3_program_shaper(
else
next_mode = LUT_RAM_A;
- mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
+ mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
if (next_mode == LUT_RAM_A)
mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);
--
2.26.0.106.g9fadedd
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions
2021-05-10 12:16 ` Zhen Lei
@ 2021-05-10 21:25 ` Alex Deucher
-1 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2021-05-10 21:25 UTC (permalink / raw)
To: Zhen Lei
Cc: Leo Li, amd-gfx, David Airlie, dri-devel, Alex Deucher,
Christian König
Applied. Thanks!
Alex
On Mon, May 10, 2021 at 8:16 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The result of an expression consisting of a single relational operator is
> already of the bool type and does not need to be evaluated explicitly.
>
> No functional change.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> index 8dc3d1f7398422e..2feb051a200294a 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> @@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut(
> next_mode = LUT_RAM_A;
>
> dpp20_power_on_blnd_lut(dpp_base, true);
> - dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp20_program_blnd_luta_settings(dpp_base, params);
> @@ -893,7 +893,7 @@ bool dpp20_program_shaper(
> else
> next_mode = LUT_RAM_A;
>
> - dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp20_program_shaper_luta_settings(dpp_base, params);
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> index 910c17fd4278932..950c9bfd53de516 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> @@ -874,7 +874,7 @@ bool mpc3_program_shaper(
> else
> next_mode = LUT_RAM_A;
>
> - mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
> + mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
>
> if (next_mode == LUT_RAM_A)
> mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);
> --
> 2.26.0.106.g9fadedd
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions
@ 2021-05-10 21:25 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2021-05-10 21:25 UTC (permalink / raw)
To: Zhen Lei
Cc: Leo Li, amd-gfx, David Airlie, dri-devel, Daniel Vetter,
Alex Deucher, Harry Wentland, Christian König
Applied. Thanks!
Alex
On Mon, May 10, 2021 at 8:16 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The result of an expression consisting of a single relational operator is
> already of the bool type and does not need to be evaluated explicitly.
>
> No functional change.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> index 8dc3d1f7398422e..2feb051a200294a 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
> @@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut(
> next_mode = LUT_RAM_A;
>
> dpp20_power_on_blnd_lut(dpp_base, true);
> - dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp20_program_blnd_luta_settings(dpp_base, params);
> @@ -893,7 +893,7 @@ bool dpp20_program_shaper(
> else
> next_mode = LUT_RAM_A;
>
> - dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
> + dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
>
> if (next_mode == LUT_RAM_A)
> dpp20_program_shaper_luta_settings(dpp_base, params);
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> index 910c17fd4278932..950c9bfd53de516 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> @@ -874,7 +874,7 @@ bool mpc3_program_shaper(
> else
> next_mode = LUT_RAM_A;
>
> - mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
> + mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
>
> if (next_mode == LUT_RAM_A)
> mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);
> --
> 2.26.0.106.g9fadedd
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-10 21:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 12:16 [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions Zhen Lei
2021-05-10 12:16 ` Zhen Lei
2021-05-10 21:25 ` Alex Deucher
2021-05-10 21:25 ` 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.