RE: [PATCH] drm/amdgpu: Re-enable DCN for 64-bit powerpc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Public]

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Michael Ellerman
> Sent: Monday, July 25, 2022 8:39 AM
> To: linuxppc-dev@xxxxxxxxxxxxxxxx
> Cc: dan@xxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; amd-
> gfx@xxxxxxxxxxxxxxxxxxxxx; tpearson@xxxxxxxxxxxxxxxxxxxxx;
> alexdeucher@xxxxxxxxx; torvalds@xxxxxxxxxxxxxxxxxxxx; linux@roeck-
> us.net
> Subject: [PATCH] drm/amdgpu: Re-enable DCN for 64-bit powerpc
> 
> Commit d11219ad53dc ("amdgpu: disable powerpc support for the newer
> display engine") disabled the DCN driver for all of powerpc due to unresolved
> build failures with some compilers.
> 
> Further digging shows that the build failures only occur with compilers that
> default to 64-bit long double.
> 
> Both the ppc64 and ppc64le ABIs define long double to be 128-bits, but there
> are compilers in the wild that default to 64-bits. The compilers provided by
> the major distros (Fedora, Ubuntu) default to 128-bits and are not affected
> by the build failure.
> 
> There is a compiler flag to force 128-bit long double, which may be the
> correct long term fix, but as an interim fix only allow building the DCN driver if
> long double is 128-bits by default.
> 
> The bisection in commit d11219ad53dc must have gone off the rails at some
> point, the build failure occurs all the way back to the original commit that
> enabled DCN support on powerpc, at least with some toolchains.
> 
> Depends-on: d11219ad53dc ("amdgpu: disable powerpc support for the
> newer display engine")
> Fixes: 16a9dea110a6 ("amdgpu: Enable initial DCN support on POWER")
> Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Link:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitla
> b.freedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F2100&amp;data=05%7C01%7Calexander.deucher%40amd.com
> %7C3bfc6788a65444cb7ffe08da6e3ee794%7C3dd8961fe4884e608e11a82d994
> e183d%7C0%7C0%7C637943513703402010%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7C3000%7C%7C%7C&amp;sdata=MTWp8MSgFBltLYbrPHCAyR8VdVEHakp
> KVMkNEBRx%2FrI%3D&amp;reserved=0
> ---
>  arch/powerpc/Kconfig                | 4 ++++
>  drivers/gpu/drm/amd/display/Kconfig | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> Alex, are you OK if I take this via the powerpc tree for v5.19?

No problem. 
Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>
FWIW, We should have all of this PPC FP stuff cleared up in 5.20.

Alex

> 
> cheers
> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index
> 7aa12e88c580..287cc2d4a4b3 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -281,6 +281,10 @@ config PPC
>  	# Please keep this list sorted alphabetically.
>  	#
> 
> +config PPC_LONG_DOUBLE_128
> +	depends on PPC64
> +	def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ |
> $(CC) -E
> +-P -)" = 1)
> +
>  config PPC_BARRIER_NOSPEC
>  	bool
>  	default y
> diff --git a/drivers/gpu/drm/amd/display/Kconfig
> b/drivers/gpu/drm/amd/display/Kconfig
> index 0ba0598eba20..ec6771e87e73 100644
> --- a/drivers/gpu/drm/amd/display/Kconfig
> +++ b/drivers/gpu/drm/amd/display/Kconfig
> @@ -6,7 +6,7 @@ config DRM_AMD_DC
>  	bool "AMD DC - Enable new display engine"
>  	default y
>  	select SND_HDA_COMPONENT if SND_HDA_CORE
> -	select DRM_AMD_DC_DCN if X86 && !(KCOV_INSTRUMENT_ALL &&
> KCOV_ENABLE_COMPARISONS)
> +	select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128) &&
> +!(KCOV_INSTRUMENT_ALL && KCOV_ENABLE_COMPARISONS)
>  	help
>  	  Choose this option if you want to use the new display engine
>  	  support for AMDGPU. This adds required support for Vega and
> --
> 2.35.3




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux