Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp915171lqh; Fri, 29 Mar 2024 00:27:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5IjMCHTNTrA3yRzFZA3LJ9PDqsyziMo4175ySR+3ER89nrUgJHhkDtSqNPP+pGDFbR10N4ngmzM8eZJviEck6WopBJZSQQViKo94RMw== X-Google-Smtp-Source: AGHT+IG+nmQSkEL/J/RZgTKzBg6swryn/pKg06pnC5FUfBLDkixyM+HpycHQ8atKDUdMcUW7Hmqw X-Received: by 2002:a17:906:24d7:b0:a4e:1aef:2d03 with SMTP id f23-20020a17090624d700b00a4e1aef2d03mr889474ejb.69.1711697256394; Fri, 29 Mar 2024 00:27:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711697256; cv=pass; d=google.com; s=arc-20160816; b=RsHduY/TBFYNLXjtrf3emgUCgqudUy3zKGOjFuqyxV2w5J0fvmxoigJRaTXmFQ6+NH z1i26NAfJtHpQmo0E5QpR/6BDdWLJGt+heMKJh4xdup1OZD9gxZV9LsjG4l8Mo0FlSCW ZlkVqEs5wBCYCG1NAHShAHdi+m18cy2qRVav7XYywmJIhv5pGr7SuP0jc3RIl4VLjXQ9 5ZC3d6xCAot4Q+S1U+oaO/M7xsaoqR2BX/hH8qqC5khVoJa4kH0F7al+CHNosxPkDl1i /hwQtO5rTY+nzYGkew0PwRYc5Gc3a58K3rmazOsklxlkJNsK5epHwIxXSznF8JFRP6Ws Cn9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bxmfK/dV9iwtkx63gHffuqsF2FQECTKGikC6K6RCS1A=; fh=l4CRMlybGQM6+xlsRd85oTkOpc/mLcB1+dEtmywZVb8=; b=xY0sVcjUUs2kA8EKcvEJOJ9aAaQnn+kl/Ko2aqhPhZQbwJLHgb/KCC4DZLMnFuX37F shiVGWD4NtADLNhwZeT4JRzjD8xGr/ICJrukUEXPmtS8bzSMp98/2JFVfTDwdFtCk4tw jWjXKWHETa7CPamwKodOFXvo+uwyULoX781/bPSpQsRC4Urt1YDParwc10+TEkG1G3o2 4i+FAbvUeoTYRv/excrHwObePjP917hfAR9csapED2xwEr5XU8nRhSowo/pkBBDF2YUg 4h6GkcAbZYRe2ClLsVrMD9G0Pkk3cN8CKw1PDSQ4/zn/wwt4FRajv99Axe9PJwEk3gca qX1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=U7Y9Zlzt; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j14-20020a1709062a0e00b00a474d617e43si1498526eje.869.2024.03.29.00.27.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 00:27:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=U7Y9Zlzt; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F01921F22306 for ; Fri, 29 Mar 2024 07:27:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4CCC5B1F6; Fri, 29 Mar 2024 07:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="U7Y9Zlzt" Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DF1A54676 for ; Fri, 29 Mar 2024 07:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711697106; cv=none; b=YhooYaG3v4yI2RwZGuZFtm1STWXyaLpjkOU/SmfLBdRjNqfoXvrMAPOJ5R9ySO3u+xCG0nVTh1k4dU6LgpwYVfgnMDfXmopvsIknX00TrfOOOPNEt8O91uH50cj+xvBjv6fs5lGU7moEL5eLlBM4gZlYM3Ys9OUfrJmS6Of4Y1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711697106; c=relaxed/simple; bh=kpa1yeFKUWqDA55hlpZXysxwBbXgX1S+zha/rueetK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VtE9RmMz+5uDScFO7CCha9g5urFSHm2mKdIQArd4EXvck5bsKf0x0FBNbEgdjDiHv9XdOsIrkxfZu/mNbSUcwghr2uY0tFXTfrUFgv4uDhP3DhOxazlBagGGkGiEm5qRtHkgZ6lBdXC48jVWLz6Rh3eo09BVnfQEGTBqhbfKb0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=U7Y9Zlzt; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-29fa10274e5so1326579a91.3 for ; Fri, 29 Mar 2024 00:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711697104; x=1712301904; darn=vger.kernel.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=U7Y9Zlzt6RyeGBerVrUZnzqMxIlEH1I8gyZr6jxSR+EYlgFk+UKcyjlvQLc7lx5Kv/ T++25o+F5oFKBiGewKMEU2muh4Ufw+Pv+il5Cv2l4KvQhGkEiPGlDGv8Doq1ikKPLOID qItr2ISBwzg0IPK/bvgdtfc9VEb186UEJYC9asK62rWpR7E8ZerOwfX2H2Dbly+Dycyv nS2vUWWFHHCIt4UTglTSelBxM1wYIpB3euklkRKXYLoheHlPx8QIysdqAFCYX6MkY5P1 rKUarWXFHQ/LWq6DSWczDrYfgFC8TnVvLAnXyYZth0Ztez8iPHUFtJ/GhAVPPvzCDx8Q 4psw== 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=IjIdi913L5ZTxuHwpaLigGk3DW5NRqlbbByHSSVk4oBxvL/v5LHM9wXDeDRApF5+Eb zqcyHh0zt5rfhfGk7/aNZ3uqd40ckNdyHQdRrttGZETkrIRS2MuOWgdtT5YGrpnwZhTI Kix3VxBRIG8EAUQOD98yBQJT0cH4lAgwqVfpjP56v4LQPRg8PWzMXQcfABLbqI6k6sR2 cTOmIj4f9Q4yLqeBK+g5G5N51/7ygv4Jawg36CGeCSj0zGbAhF5+VRZ9dNTqC1c7Linh j6y3GLGoqPAzt9Cz0ztJ5FkelHc2PfTExTjUlm3jGCmh9+H+ypgTDIl1T00+4Hru/S7T z+KQ== X-Gm-Message-State: AOJu0YzUHkYjf6aDwQ/iN+b/MArwfK9CeN/nM2Oyq1K8LPgwBynaJlHu 5wWsGZuL2AApA2Ust5BOV2GJIr46o1EpKiYXLGbW2PW3dPfxsKnyw5Q1CkmdBZI= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- (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 -- 2.44.0