From patchwork Thu Dec 28 01:42:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 183615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1759069dyb; Wed, 27 Dec 2023 17:45:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpH9/OXQKbfOyd1OdaZyqRDgUA55b16/NbCTWTfFmdzlhdlUpVBQLSxT2grBwcTGluQ0UO X-Received: by 2002:a05:6a21:1507:b0:196:2fb1:8014 with SMTP id nq7-20020a056a21150700b001962fb18014mr2006120pzb.37.1703727953546; Wed, 27 Dec 2023 17:45:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703727953; cv=none; d=google.com; s=arc-20160816; b=DJRb/o6kiY9aPTPO1eCBpZ2okA05ry+KuncTiavRAIalxl+ggGgglb7lhmhtcaYFM/ YhdFrLdZVw5yDufBhxyY0hDlRVBLtLpoEI1VGynI5l+Y9OLbKOtFCUfn5P9ZL6MKrW60 P7n2VauUnpJaFwE148lGAcmp1hIeWJUNiJcV18wfD1kgi0GZiU2srVORyRM92iSDPHUD ZjwN9VTIQMVA6M5FfUoY93uuq59m3N0SB2LBHQEHZtF/owNXy0PN8p7enSVc8ruZhQcj vt9fkvIFwCkRfzqIktGs3bWU1vDOi5QKIEglxZIDZgQGvOfBXLE5JPgRPTD3E1+i0GxA Av9Q== ARC-Message-Signature: i=1; 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=g3Nao5aFqcs14j7uzTeCL4obzFSkk9OE7jeAS4fIG/k=; fh=JJk1/8XGS6rFVWVttU2E1kjrx08LqtvmAio0w7AmBuc=; b=se0L+ZG0Pn0+hTrvrD902z5pqz71+x6Kt6ghOae2JM/4oB51xLUUi++0v/PRREztBU 0xo4MjGG3yA5AroozqRt/MB++IJhiTCz84x58IajFXSOmAnD1EIfHWh+pHoczC9Zk9tw M0rmzvrIBHHltPhEzYaF5gd+YgcnBI7M5tEy9xD9VyNbOR7VgJK897wfVZMdwcW+pd4Z c5KTT3P6F66MWteX0eN0LoIbCqIOLcR0tiaBXkMkFQcHfP3qwXzeEgR0V8BuWNHzr/15 OGlbNZBe8nDX9srXSgwTjw4c8zuME3ysmf6gGXxj7+qAtmn3IqWakBstd0F/ywKIw7ao bZww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ZFKOQfn+; spf=pass (google.com: domain of linux-kernel+bounces-12379-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12379-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r13-20020a17090aa08d00b0028b6f9f3660si15405200pjp.133.2023.12.27.17.45.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 17:45:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12379-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ZFKOQfn+; spf=pass (google.com: domain of linux-kernel+bounces-12379-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12379-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 53F6E281564 for ; Thu, 28 Dec 2023 01:45:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4DC1DF4A; Thu, 28 Dec 2023 01:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="ZFKOQfn+" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (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 6EBE98826 for ; Thu, 28 Dec 2023 01:42:37 +0000 (UTC) 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-pf1-f178.google.com with SMTP id d2e1a72fcca58-6da202aa138so51999b3a.2 for ; Wed, 27 Dec 2023 17:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1703727757; x=1704332557; 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=g3Nao5aFqcs14j7uzTeCL4obzFSkk9OE7jeAS4fIG/k=; b=ZFKOQfn+flb1yljOg1I0thtFnTF5M53pXHXgyuZaSQmH/mp0Ou6imI43cipjv6GCTJ thz4YrX3zO6YNcBL5TWXAn22hZVlxX009H6nyYbIxqtp/9ZQRbtTdxq9SmWmgO0pMxyS ITIV2E645ndM6RY8PfHovuMyJ2cduJw9cQg8a4Vi8QLdnNS1VmZr02FZ5qAldSXxBE7L UbPZr9oOEXLweoGtkhpnbgresAYrx1D5TDV+qcDYJKqvc0ChYo2iaNEXDNH70NuCXtyG v0WX9zO4JAE3ZUnw37EPADjNso5+5QwInbAI2pczmVQoTKA5C0C56LW37ZqM+9kv/E3i Yn0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703727757; x=1704332557; 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=g3Nao5aFqcs14j7uzTeCL4obzFSkk9OE7jeAS4fIG/k=; b=VjyZYGWvNDgOfVMEp4ej5mLa4tV72vUuQxL6XZ8HQsNMEru6gVnXn24ZjwQ/mqCkwt XeVtpjxjEHXw6L6FIbyu8T6NY17GRBg8krhxI88fxbfTynQQSV1IfLbPeNookQVQvj7N z6gAYExAn6PuWLf30A+tmFhYKgsw90omtudg5XEXkZ6G8EQj4MgRpIhwyqhsyMyOilVM 3yBrnsntmt8gc6xSk7NQfnrD7NTI5fLhFF+VQOexekCnqd4Zo2nW+GO2W60GCPulN8W6 PSzXsQwabfT9m5T8bfQGP6YJWXonhe7TmPzscbgyW2oP9EwIP4RX0fWYDTc/GBoEw43u M81w== X-Gm-Message-State: AOJu0YyA4aP1ehhdccoedz7PY1cawT0BINBgpFoi8vlvupZxS4PDVwSI 2sSbvm9/JluFcesUCyCivaOdr5gAW7Ia5g== X-Received: by 2002:aa7:91d5:0:b0:6d2:95d4:9c37 with SMTP id z21-20020aa791d5000000b006d295d49c37mr9390922pfa.30.1703727756811; Wed, 27 Dec 2023 17:42:36 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id g24-20020aa78758000000b006d49ed3effasm7335440pfo.63.2023.12.27.17.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 17:42:36 -0800 (PST) From: Samuel Holland To: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-riscv@lists.infradead.org, Christoph Hellwig Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-arch@vger.kernel.org, Michael Ellerman , Samuel Holland Subject: [PATCH v2 11/14] drm/amd/display: Only use hard-float, not altivec on powerpc Date: Wed, 27 Dec 2023 17:42:01 -0800 Message-ID: <20231228014220.3562640-12-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231228014220.3562640-1-samuel.holland@sifive.com> References: <20231228014220.3562640-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786488242980606562 X-GMAIL-MSGID: 1786488242980606562 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 Signed-off-by: Samuel Holland --- 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 6042a5a6a44f..554c39024a40 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