Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c
@ 2024-12-19 17:12 Nathan Chancellor
  2024-12-19 22:21 ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2024-12-19 17:12 UTC (permalink / raw)
  To: Chaitanya Dhere, Jun Lei, Harry Wentland, Leo Li,
	Rodrigo Siqueira, Alex Deucher, Christian König, Xinhui Pan,
	Austin Zheng
  Cc: Dillon Varone, David Airlie, Simona Vetter, amd-gfx, dri-devel,
	llvm, patches, Nathan Chancellor

Commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various
Fixes") blew away commit fdedd77b0eb3 ("drm/amd/display: Reapply
2fde4fdddc1f"), which itself was a reapplication for the same reason,
which results in that compiler warning returning:

  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:215:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion]
    215 |         divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz));
        |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~

Just disable the warning for the whole file via Makefile to avoid having
to reapply the same fix every time the code syncs from wherever it is
actually maintained.

Fixes: be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
If you would prefer reapplying the local fix, feel free to do so, but I
would like for it to be in the upstream source so it does not have to
keep being applied.
---
 drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
index d9c27ebe12ee08d6330eb199cd8ca9c8489fa5b2..5c0f93644c5d43c8a0bc12713fc400712d8de50b 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
@@ -78,7 +78,7 @@ CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_ccfla
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_ccflags)
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags)
+CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags) $(call cc-disable-warning,enum-float-conversion)
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags)
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags)
 CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags)

---
base-commit: 695c2c745e5dff201b75da8a1d237ce403600d04
change-id: 20241219-amdgpu-fix-enum-float-conversion-again-again-cbfd9159f76d

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c
  2024-12-19 17:12 [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c Nathan Chancellor
@ 2024-12-19 22:21 ` Alex Deucher
  2024-12-19 22:24   ` Nathan Chancellor
  2025-02-14 16:28   ` Nathan Chancellor
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Deucher @ 2024-12-19 22:21 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Chaitanya Dhere, Jun Lei, Harry Wentland, Leo Li,
	Rodrigo Siqueira, Alex Deucher, Christian König, Xinhui Pan,
	Austin Zheng, Dillon Varone, David Airlie, Simona Vetter, amd-gfx,
	dri-devel, llvm, patches

On Thu, Dec 19, 2024 at 12:23 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various
> Fixes") blew away commit fdedd77b0eb3 ("drm/amd/display: Reapply
> 2fde4fdddc1f"), which itself was a reapplication for the same reason,
> which results in that compiler warning returning:
>
>   drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:215:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion]
>     215 |         divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz));
>         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Just disable the warning for the whole file via Makefile to avoid having
> to reapply the same fix every time the code syncs from wherever it is
> actually maintained.
>
> Fixes: be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> If you would prefer reapplying the local fix, feel free to do so, but I
> would like for it to be in the upstream source so it does not have to
> keep being applied.

I've reapplied the original fix and I've confirmed that the fix will
be pushed to the DML tree as well this time.

Thanks,

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
> index d9c27ebe12ee08d6330eb199cd8ca9c8489fa5b2..5c0f93644c5d43c8a0bc12713fc400712d8de50b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/Makefile
> @@ -78,7 +78,7 @@ CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_ccfla
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_ccflags)
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_ccflags)
> -CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags)
> +CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags) $(call cc-disable-warning,enum-float-conversion)
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags)
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags)
>  CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags)
>
> ---
> base-commit: 695c2c745e5dff201b75da8a1d237ce403600d04
> change-id: 20241219-amdgpu-fix-enum-float-conversion-again-again-cbfd9159f76d
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c
  2024-12-19 22:21 ` Alex Deucher
@ 2024-12-19 22:24   ` Nathan Chancellor
  2025-02-14 16:28   ` Nathan Chancellor
  1 sibling, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2024-12-19 22:24 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Chaitanya Dhere, Jun Lei, Harry Wentland, Leo Li,
	Rodrigo Siqueira, Alex Deucher, Christian König, Xinhui Pan,
	Austin Zheng, Dillon Varone, David Airlie, Simona Vetter, amd-gfx,
	dri-devel, llvm, patches

On Thu, Dec 19, 2024 at 05:21:41PM -0500, Alex Deucher wrote:
> On Thu, Dec 19, 2024 at 12:23 PM Nathan Chancellor <nathan@kernel.org> wrote:
> > If you would prefer reapplying the local fix, feel free to do so, but I
> > would like for it to be in the upstream source so it does not have to
> > keep being applied.
> 
> I've reapplied the original fix and I've confirmed that the fix will
> be pushed to the DML tree as well this time.

Thanks a lot!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c
  2024-12-19 22:21 ` Alex Deucher
  2024-12-19 22:24   ` Nathan Chancellor
@ 2025-02-14 16:28   ` Nathan Chancellor
  2025-02-14 16:35     ` Alex Deucher
  1 sibling, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2025-02-14 16:28 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Xinhui Pan, Austin Zheng, Dillon Varone,
	David Airlie, Simona Vetter, amd-gfx, dri-devel, llvm, patches

On Thu, Dec 19, 2024 at 05:21:41PM -0500, Alex Deucher wrote:
> On Thu, Dec 19, 2024 at 12:23 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > Commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various
> > Fixes") blew away commit fdedd77b0eb3 ("drm/amd/display: Reapply
> > 2fde4fdddc1f"), which itself was a reapplication for the same reason,
> > which results in that compiler warning returning:
> >
> >   drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:215:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion]
> >     215 |         divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz));
> >         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Just disable the warning for the whole file via Makefile to avoid having
> > to reapply the same fix every time the code syncs from wherever it is
> > actually maintained.
> >
> > Fixes: be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes")
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
> > If you would prefer reapplying the local fix, feel free to do so, but I
> > would like for it to be in the upstream source so it does not have to
> > keep being applied.
> 
> I've reapplied the original fix and I've confirmed that the fix will
> be pushed to the DML tree as well this time.

Did that actually end up happening? Commit 1b30456150e5
("drm/amd/display: DML21 Reintegration") in next-20250214 reintroduces
this warning... I guess it may be a timing thing because the author date
is three weeks ago or so. Should I send my "Reapply" patch or will you
take care of it?

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c
  2025-02-14 16:28   ` Nathan Chancellor
@ 2025-02-14 16:35     ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2025-02-14 16:35 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Xinhui Pan, Austin Zheng, Dillon Varone,
	David Airlie, Simona Vetter, amd-gfx, dri-devel, llvm, patches

On Fri, Feb 14, 2025 at 11:28 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Thu, Dec 19, 2024 at 05:21:41PM -0500, Alex Deucher wrote:
> > On Thu, Dec 19, 2024 at 12:23 PM Nathan Chancellor <nathan@kernel.org> wrote:
> > >
> > > Commit be4e3509314a ("drm/amd/display: DML21 Reintegration For Various
> > > Fixes") blew away commit fdedd77b0eb3 ("drm/amd/display: Reapply
> > > 2fde4fdddc1f"), which itself was a reapplication for the same reason,
> > > which results in that compiler warning returning:
> > >
> > >   drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:215:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion]
> > >     215 |         divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz));
> > >         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Just disable the warning for the whole file via Makefile to avoid having
> > > to reapply the same fix every time the code syncs from wherever it is
> > > actually maintained.
> > >
> > > Fixes: be4e3509314a ("drm/amd/display: DML21 Reintegration For Various Fixes")
> > > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > > ---
> > > If you would prefer reapplying the local fix, feel free to do so, but I
> > > would like for it to be in the upstream source so it does not have to
> > > keep being applied.
> >
> > I've reapplied the original fix and I've confirmed that the fix will
> > be pushed to the DML tree as well this time.
>
> Did that actually end up happening? Commit 1b30456150e5
> ("drm/amd/display: DML21 Reintegration") in next-20250214 reintroduces
> this warning... I guess it may be a timing thing because the author date
> is three weeks ago or so. Should I send my "Reapply" patch or will you
> take care of it?

<sigh>  I'll reapply.  Come on guys.  Please make sure this makes it's
way into the DML code this time if it hasn't already.

Thanks,

Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-14 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 17:12 [PATCH] drm/amd/display: Disable -Wenum-float-conversion for dml2_dpmm_dcn4.c Nathan Chancellor
2024-12-19 22:21 ` Alex Deucher
2024-12-19 22:24   ` Nathan Chancellor
2025-02-14 16:28   ` Nathan Chancellor
2025-02-14 16:35     ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox