Skip to content

Commit c653c59

Browse files
committed
drm/amdgpu: Re-enable DCN for 64-bit powerpc
Commit d11219a ("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 d11219a 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: d11219a ("amdgpu: disable powerpc support for the newer display engine") Fixes: 16a9dea ("amdgpu: Enable initial DCN support on POWER") Signed-off-by: Michael Ellerman <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Dan Horák <[email protected]> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2100 Link: https://lore.kernel.org/r/[email protected]
1 parent 3c69a99 commit c653c59

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/powerpc/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ config PPC
281281
# Please keep this list sorted alphabetically.
282282
#
283283

284+
config PPC_LONG_DOUBLE_128
285+
depends on PPC64
286+
def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -)" = 1)
287+
284288
config PPC_BARRIER_NOSPEC
285289
bool
286290
default y

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ config DRM_AMD_DC
66
bool "AMD DC - Enable new display engine"
77
default y
88
select SND_HDA_COMPONENT if SND_HDA_CORE
9-
select DRM_AMD_DC_DCN if X86 && !(KCOV_INSTRUMENT_ALL && KCOV_ENABLE_COMPARISONS)
9+
select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128) && !(KCOV_INSTRUMENT_ALL && KCOV_ENABLE_COMPARISONS)
1010
help
1111
Choose this option if you want to use the new display engine
1212
support for AMDGPU. This adds required support for Vega and

0 commit comments

Comments
 (0)