From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49D01C433EF for ; Fri, 22 Jul 2022 12:32:38 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Lq8383XhQz3dR1 for ; Fri, 22 Jul 2022 22:32:36 +1000 (AEST) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Lq82j0flZz2xh0 for ; Fri, 22 Jul 2022 22:32:13 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Lq82f5Q7Kz4xG6; Fri, 22 Jul 2022 22:32:09 +1000 (AEST) From: Michael Ellerman To: Dan =?utf-8?Q?Hor=C3=A1k?= , amd-gfx@lists.freedesktop.org, Linus Torvalds , Guenter Roeck , linux-kernel@vger.kernel.org Subject: Re: [PATCH] amdgpu: re-enable DCN for ppc64le In-Reply-To: <20220722082122.571974-1-dan@danny.cz> References: <20220722082122.571974-1-dan@danny.cz> Date: Fri, 22 Jul 2022 22:32:06 +1000 Message-ID: <87o7xhcoqh.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi Dan, [ Cc +=3D linuxppc-dev ] Dan Hor=C3=A1k writes: > Commit d11219ad53dc disabled the DCN driver for all platforms that > define PPC64 due long build issues during "make allmodconfig" using > cross-compilation. Cross-compilation defaults to the ppc64_defconfig > and thus big-endian toolchain configuration. The ppc64le platform uses a > different ABI and doesn't suffer from the build issues. Unfortunately it's a bit messier than that. The build error occurs when the compiler is built to use a 64-bit long double type. The ppc64le ABI document says that long double should be 128-bits, but there are ppc64le compilers out there that are configured to use 64-bit long double, notably the kernel.org crosstool compilers. So just testing for CPU_LITTLE_ENDIAN means we'll still get build errors on those compilers. But I think we can detect the long double size and key off that. Can you test the patch below works for you? cheers diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 7aa12e88c580..e9f8cd50af99 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -281,6 +281,9 @@ config PPC # Please keep this list sorted alphabetically. # =20 +config PCC_LONG_DOUBLE_128 + def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -= )" =3D 1) + config PPC_BARRIER_NOSPEC bool default y diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/disp= lay/Kconfig index b4029c0d5d8c..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 || PPC64) && !(KCOV_INSTRUMENT_ALL && KCOV_= ENABLE_COMPARISONS) + select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128) && !(KCOV_INSTRUMEN= T_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