Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp635625imi; Fri, 22 Jul 2022 06:20:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tapE4nFcN2+wkTEKEQvrdWMkgSTBq/VFBA70pCd0nCboiL5ZQ+NR4elhT/BofvCxxuNSv/ X-Received: by 2002:a05:6870:d62b:b0:10d:be5c:9648 with SMTP id a43-20020a056870d62b00b0010dbe5c9648mr1111925oaq.85.1658496034819; Fri, 22 Jul 2022 06:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658496034; cv=none; d=google.com; s=arc-20160816; b=tmcNMWUWhJsIZdahGOfJCHRF5zy7LIgGhCSddjRPpowoZYU3ko68pkkQW9os4Sap0l ENCogQbc8G7epTT5Du+4M9D3c4eRlqNKEHr9ri+EZx3NApoqCvJOzjJpCyEQszTXjUx2 bbvM5FnrySMMgJC/pWIjemofvDmhETZDqr1chDZuHW/JQr4CMHH/7+v0xXNBZv/aJyAI fol/Xin8mHynPuIs7JjKg5zcIotAdggWLI9B/JhO01VDoGYvskTyATGAY3ZZiEMy5kYd CSAIZBWOkrDA6uVFIf+Gf+xRMtDiIv6SjWYssRwvZwJekE1gt7MIefiBQt/3k7E5WA2r vqLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vHUKjpjNx2pn4Z9RduwDfXI7JqwuaJ5Riw0z8cBvkvk=; b=UVyoPfL3YioH3OjGJRjhVXXCV2/Z6ORKJgx55o68vlrjS2aUaRWg5QQBDENS0b7PZN l1+Gh0PZKK5LsojAxmdTHbSr+NUbsY4gp45gi3nYl4rO9blbjPvoP+ciNg9UFokI8fJQ ooj7dYfh1SJQsW2G7Tif5eTJrc809yO4L9VIICpwFNplY3+87yk/c3HVfvhZ03NG+WSW amSuWdqyPc7AzhOK+p7sQtDJrQ6o3/Dd6pUk4KtPRxh9Lvy2VyUliC9xOkKa4xKcdnFP Ku/uy0WWIcaYh58SKNVr6QDmsATKTxlBQVjFT8+K+ihrm/YSYf/9Hof/QeH92chZb3hv Ym3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i124-20020acaea82000000b00335bd80af4fsi4145892oih.205.2022.07.22.06.20.18; Fri, 22 Jul 2022 06:20:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235101AbiGVNDf (ORCPT + 99 others); Fri, 22 Jul 2022 09:03:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234982AbiGVNDe (ORCPT ); Fri, 22 Jul 2022 09:03:34 -0400 X-Greylist: delayed 515 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 22 Jul 2022 06:03:31 PDT Received: from redcrew.org (redcrew.org [37.157.195.192]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29EBBAF949 for ; Fri, 22 Jul 2022 06:03:31 -0700 (PDT) Received: from server.danny.cz (85-71-161-19.rce.o2.cz [85.71.161.19]) by redcrew.org (Postfix) with ESMTP id 5175AA0C; Fri, 22 Jul 2022 14:54:54 +0200 (CEST) Received: from talos.danny.cz (unknown [IPv6:2001:470:5c11:160:47df:83f6:718e:218]) by server.danny.cz (Postfix) with SMTP id 1E81B11AA6B; Fri, 22 Jul 2022 14:54:54 +0200 (CEST) Date: Fri, 22 Jul 2022 14:54:53 +0200 From: Dan =?UTF-8?B?SG9yw6Fr?= To: Michael Ellerman Cc: amd-gfx@lists.freedesktop.org, Linus Torvalds , Guenter Roeck , linux-kernel@vger.kernel.org, Alex Deucher , Subject: Re: [PATCH] amdgpu: re-enable DCN for ppc64le Message-Id: <20220722145453.eb37bd3a99c4b738ed2e26b9@danny.cz> In-Reply-To: <87o7xhcoqh.fsf@mpe.ellerman.id.au> References: <20220722082122.571974-1-dan@danny.cz> <87o7xhcoqh.fsf@mpe.ellerman.id.au> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; powerpc64le-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jul 2022 22:32:06 +1000 Michael Ellerman wrote: > Hi Dan, > > [ Cc += linuxppc-dev ] > > Dan HorĂ¡k 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. > # > > +config PCC_LONG_DOUBLE_128 > + def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -)" = 1) ^^^ there is a typo s/PCC/PPC/ :-) with that fixed, it then defines AMD_DC_DCN on Fedora 36 with gcc-12.1.1-1.fc36.ppc64le and we should be OK. Dan > + > config PPC_BARRIER_NOSPEC > bool > default y > diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/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_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