From patchwork Fri Mar 29 07:18:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13610255 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EC7C3CD1288 for ; Fri, 29 Mar 2024 07:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JKTFitcB+C2yveg5+3hEa5yFIbZ9MuG5qayLQPYjMfg=; b=0iKUaMjazS2FL3 al/XZnSjy7u7XAQ3YRiB3pAmM0jzdjsDYQu9k1VoSj3XwHV/4dlkB7CV8oTPjkB1IY7PmuK4JiI1L QjfUDId+SjSZiY7gATpFJYI0G8NbsSfJVkG540vV0e7LHmInwiiNedsJnWWVlP6XB9/vGN7MrKjt6 7RKV0M5RLq+h5EV0WIxImcYzVudqXWltdJvQGA36sta5iw6ugJ+EfNy+cMbjighNFh9Hy3AIudbWm 3Bi1wczWJJ9QDWH12SM/s4UTFeLXYQMxXRjPGr8mg/5Emob4FMeTWliGGiAMpL5nsF0E2f91pvS4R gIpt3HLiXfwn8TI4IXJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq6g1-0000000HB7m-3qm8; Fri, 29 Mar 2024 07:29:25 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq6bx-0000000H8p7-2fJL for linux-arm-kernel@bombadil.infradead.org; Fri, 29 Mar 2024 07:25:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=bxmfK/dV9iwtkx63gHffuqsF2FQECTKGikC6K6RCS1A=; b=IZRHky5EJafHJEWTI5O4kE9d88 gMfAJDRn6TLHvrUcwTEgG3Wdy6IKSGIEQVIexv1/FoZQim9hJalfJ2k8F5Ldz1D1zDuUG8J+iPNjS KYrPeAKgI7l7Cnb56EIUbiT+tGhX8GVW6XaKt+N+WPoTO0D4ka9qaMezMaxRYu7CerWS+RoqZMbHh 3DywSkZASdRctixlGV6n5Z+Bq1GdahCxDd7HCxDe9uiYh6Nf5KblcepIf07Mw77q3B4ozniYFvM++ XpJETxhpIxQ+c8iAQhm3fqLSJey8+B2b+Oj7xf0GVoYRvqtf0nXJsVeJiEuhIUxnDmdtmUMPnMESQ uxbU4Tyg==; Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq6bq-00000001Qvl-0dBN for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2024 07:25:12 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-29fa10274e5so1326580a91.3 for ; Fri, 29 Mar 2024 00:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711697104; x=1712301904; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bxmfK/dV9iwtkx63gHffuqsF2FQECTKGikC6K6RCS1A=; b=RUqs+OavvAIN2aHxItEDedHFDbF/9Qc/i0JJ9ZzaCsisjYXvo8RVsCq++Be9MCMAec ILTS21bNYXRsSoncewPm8jj4WfmY0Gtq58ut5Fvy9cXs9fdsmsdqlWCjmlmi6Wi/Nn2R E4fzGAEfZJdyWqR3yMgrnOe5/n3NyPEi3wx2cRlThdCe5hhZ7RihVcYNg5d/ncyKCu+m av99DC0GAfJfSsXHQ8QgRxwHZCraT2xoFseJ8L54ksTeKdPFoRlhZyHjzThYjR7tdpiz dwRqbbiQRE6cXK6ewmuNSWeD3qafn6fVI840oJaTrTpa8dsEtbA20WDWoYnNhGBrhiBG /Asg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711697104; x=1712301904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bxmfK/dV9iwtkx63gHffuqsF2FQECTKGikC6K6RCS1A=; b=cDs5IhjX3BKWC3wZVnDe3AD6EDnDhlNEROkzyEQDeIH2u/zmhzD+bqQ3Mrh9CcbpwD 32f77oBSgl2Cy9sGf+czEgxXdhVsZ2MOc0YxJ7+0eeWLpGa+nEOh/Yj2wTGZMfEpJP9N MRCgRbHcah21nNFJmmGIlKwcjz6SqVVNrbplssFJZnyi6Cu2S/IFP/Uq9RSeoqqvremm 26EnlCXTZOdKtpAx+hYOaKRPMV4jrzgLRJjUnb0lZ3NAO0ZOZWeySY5wtVbefvR2OHo9 YQNMOtyGVNEi6TPg2cxtW16oVgaDqIbNLedbcAzJC3g4J42HuBVqPNMz6MXG7VN04JiN wkjA== X-Forwarded-Encrypted: i=1; AJvYcCVtgsRKjhPRnZsnjPaOCzeZqi4A6mGjHD/9OeabUX7oXVaqF3/OJhzEcqR5iNAwhVBMEbao8d3+DGpYBaL1DIKy2AR972h1VGurnxzSAzmIGLh58QM= X-Gm-Message-State: AOJu0YzuvIjFDqJ8NrYC0nBr2u/q2JxCPVc8fiEu6vUwb9s0Zq/H0KPH zwdNBPathprLHOfaqgLGky4CEjbMlahyRzLBLpaajo9r8VNDkaMMDFmyDQxOuUc= X-Google-Smtp-Source: AGHT+IHpeVerdLnkB6vVIrwuNmVNMPefUfPXpMCtetpMqAC6/YKtxmEHNVWfJReDkAcL5lZnKsQNnw== X-Received: by 2002:a17:90a:ff15:b0:2a0:4a22:3740 with SMTP id ce21-20020a17090aff1500b002a04a223740mr1338180pjb.49.1711697104041; Fri, 29 Mar 2024 00:25:04 -0700 (PDT) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id b8-20020a17090a010800b0029ddac03effsm4971798pjb.11.2024.03.29.00.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 00:25:03 -0700 (PDT) From: Samuel Holland To: Andrew Morton , linux-arm-kernel@lists.infradead.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Christoph Hellwig , loongarch@lists.linux.dev, amd-gfx@lists.freedesktop.org, Michael Ellerman , Alex Deucher , Samuel Holland Subject: [PATCH v4 12/15] drm/amd/display: Only use hard-float, not altivec on powerpc Date: Fri, 29 Mar 2024 00:18:27 -0700 Message-ID: <20240329072441.591471-13-samuel.holland@sifive.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329072441.591471-1-samuel.holland@sifive.com> References: <20240329072441.591471-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240329_072508_819672_79E45557 X-CRM114-Status: GOOD ( 13.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Michael Ellerman The compiler flags enable altivec, but that is not required; hard-float is sufficient for the code to build and function. Drop altivec from the compiler flags and adjust the enable/disable code to only enable FPU use. Signed-off-by: Michael Ellerman Acked-by: Alex Deucher Signed-off-by: Samuel Holland Acked-by: Harry Wentland --- (no changes since v2) Changes in v2: - New patch for v2 drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 12 ++---------- drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c index 4ae4720535a5..0de16796466b 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c @@ -92,11 +92,7 @@ void dc_fpu_begin(const char *function_name, const int line) #if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH) kernel_fpu_begin(); #elif defined(CONFIG_PPC64) - if (cpu_has_feature(CPU_FTR_VSX_COMP)) - enable_kernel_vsx(); - else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) - enable_kernel_altivec(); - else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) + if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) enable_kernel_fp(); #elif defined(CONFIG_ARM64) kernel_neon_begin(); @@ -125,11 +121,7 @@ void dc_fpu_end(const char *function_name, const int line) #if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH) kernel_fpu_end(); #elif defined(CONFIG_PPC64) - if (cpu_has_feature(CPU_FTR_VSX_COMP)) - disable_kernel_vsx(); - else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) - disable_kernel_altivec(); - else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) + if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) disable_kernel_fp(); #elif defined(CONFIG_ARM64) kernel_neon_end(); diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index c4a5efd2dda5..59d3972341d2 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -31,7 +31,7 @@ dml_ccflags := $(dml_ccflags-y) -msse endif ifdef CONFIG_PPC64 -dml_ccflags := -mhard-float -maltivec +dml_ccflags := -mhard-float endif ifdef CONFIG_ARM64 diff --git a/drivers/gpu/drm/amd/display/dc/dml2/Makefile b/drivers/gpu/drm/amd/display/dc/dml2/Makefile index acff3449b8d7..7b51364084b5 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml2/Makefile @@ -30,7 +30,7 @@ dml2_ccflags := $(dml2_ccflags-y) -msse endif ifdef CONFIG_PPC64 -dml2_ccflags := -mhard-float -maltivec +dml2_ccflags := -mhard-float endif ifdef CONFIG_ARM64