From patchwork Sun Sep 29 13:56:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 174669 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5994553ill; Sun, 29 Sep 2019 07:03:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwh2vj5x8lstwyPTWCa73ON2D9n82kmbxWKqVACQxj99lSej1fhPZeM4tzmvQ1/O/1zbrWt X-Received: by 2002:a17:906:254d:: with SMTP id j13mr15489445ejb.30.1569765829167; Sun, 29 Sep 2019 07:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569765829; cv=none; d=google.com; s=arc-20160816; b=0bBJTg0rv6Kx8un9zJFYNFJh63KC6+ePfWhsqDMYnewpkBxWySDBs0AxCacRWt/qIv PWKzATXAYjF1d4Dyc5+pNdWvDFmrs7J+ZPcO6/dPPUmcQdgaDstni6saVv57UjYizA8r 31EWJ+xzPRD1x0c82jnP3RCAQ6+GAT1EME/F+fvZXVWe4fO/XFrTifFftTJb9Q+//kD3 DbM3Y8NOPY+PhsF7DNjiT+/GXSP3dZF9FwPVeXM5gxX68nEGZaqHseucWhbdrW2xDckr Dfw7xYDfTLu9CIEVcIhX9FSDPmTbU+zb5Mc2Ty37pELSlGwra4938nxZeudvmsGI55pn 5Xhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QhlnInMSK7s8CCcOZRHNrn86qdOENlf6b/7Z9uidaPw=; b=0TRFBQnhVGoXsgw6iJ1W5m/xcRL8nL68eciJypNilqeXzY3ro772eX4CEs8S4kNVPS aHczpmT5lCcPeYq+gAm7GwK4eK2dX3Mpx9/ichNS0Cgwt139mPk2H/KcQxk7eOYmX+DI VrMa5fLVfYFABn0bsYhXuF5k8XprX/h5UV0fw5xq50o2SaIfIslyvoY4t53B8u8ZBceA iWLG4sxDWZLsf/OiofuTLn7+QTZWSSVV9RuXlvpm1cJgSGfZYMJZ/y5P4hnANN76pHpp q9Lt5Xqo6uJDfgSskmK7YNEmFeG0pl2yUKnOCb+0WF6Dwx9qGcb+v/6xrOEw+7IB4oHK EcdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZBXFe3yG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si5565571ejx.315.2019.09.29.07.03.48; Sun, 29 Sep 2019 07:03:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZBXFe3yG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729483AbfI2ODo (ORCPT + 14 others); Sun, 29 Sep 2019 10:03:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:46862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730374AbfI2ODl (ORCPT ); Sun, 29 Sep 2019 10:03:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D5D302086A; Sun, 29 Sep 2019 14:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765820; bh=6Aj5dbtLhd7kA0KmaquGmsU5Jz5yxPWzd2bJ84wED3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZBXFe3yG/TN7SlLM8pY6P5KsTKDB1NZ9sdIQkNg+9f9essi9oMYlKvLKt6zUJGIUB 1ysg7DELg0/uvpDLfSanX4CRB2mSZ+/1l60lmfg0Y57PDqncqBkfitdg9Q++fmOsII Ga0v3LEFL9atuyV7nudPS2RYAIZsDbKlwKqf2QFk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sedat Dilek , Sami Tolvanen , Nick Desaulniers , Alex Deucher Subject: [PATCH 5.3 07/25] drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines Date: Sun, 29 Sep 2019 15:56:10 +0200 Message-Id: <20190929135011.629505348@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135006.127269625@linuxfoundation.org> References: <20190929135006.127269625@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nick Desaulniers commit 0f0727d971f6fdf8f1077180d495ddb9928f0c8b upstream. arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The AMDGPU drivers modified in this patch re-enable SSE but not SSE2. Turn on SSE2 to support emitting double precision floating point instructions rather than calls to non-existent (usually available from gcc_s or compiler_rt) floating point helper routines for Clang. This was originally landed in: commit 10117450735c ("drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines") but reverted in: commit 193392ed9f69 ("Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"") due to bugreports from GCC builds. Add guards to only do so for Clang. Link: https://bugs.freedesktop.org/show_bug.cgi?id=109487 Link: https://github.com/ClangBuiltLinux/linux/issues/327 Suggested-by: Sedat Dilek Suggested-by: Sami Tolvanen Signed-off-by: Nick Desaulniers Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 4 ++++ drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 ++++ drivers/gpu/drm/amd/display/dc/dsc/Makefile | 4 ++++ 4 files changed, 16 insertions(+) --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile @@ -32,6 +32,10 @@ endif calcs_ccflags := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +calcs_ccflags += -msse2 +endif + CFLAGS_dcn_calcs.o := $(calcs_ccflags) CFLAGS_dcn_calc_auto.o := $(calcs_ccflags) CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare --- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile @@ -18,6 +18,10 @@ endif CFLAGS_dcn20_resource.o := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +CFLAGS_dcn20_resource.o += -msse2 +endif + AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20)) AMD_DISPLAY_FILES += $(AMD_DAL_DCN20) --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -32,6 +32,10 @@ endif dml_ccflags := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +dml_ccflags += -msse2 +endif + CFLAGS_display_mode_lib.o := $(dml_ccflags) ifdef CONFIG_DRM_AMD_DC_DCN2_0 --- a/drivers/gpu/drm/amd/display/dc/dsc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dsc/Makefile @@ -9,6 +9,10 @@ endif dsc_ccflags := -mhard-float -msse $(cc_stack_align) +ifdef CONFIG_CC_IS_CLANG +dsc_ccflags += -msse2 +endif + CFLAGS_rc_calc.o := $(dsc_ccflags) CFLAGS_rc_calc_dpi.o := $(dsc_ccflags) CFLAGS_codec_main_amd.o := $(dsc_ccflags)