From patchwork Fri Jul 12 09:37:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11041929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FE3414C0 for ; Fri, 12 Jul 2019 09:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F131E289D2 for ; Fri, 12 Jul 2019 09:37:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2A5328BEA; Fri, 12 Jul 2019 09:37:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 92592289D2 for ; Fri, 12 Jul 2019 09:37:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9062F6E339; Fri, 12 Jul 2019 09:37:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id D54F96E33A; Fri, 12 Jul 2019 09:37:28 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MdNLi-1iLCk53jKC-00ZPIO; Fri, 12 Jul 2019 11:37:21 +0200 From: Arnd Bergmann To: Harry Wentland , Leo Li , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH] drm/amd/display: Support clang option for stack alignment Date: Fri, 12 Jul 2019 11:37:00 +0200 Message-Id: <20190712093720.1461418-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:d225NHDmVD8iHvGnyul/A/ipRUep4hflYOdBban/FHrJgvhxnwv 4MOV5qJc3d5lz4zwHGjhcNI0lO6YeTDm7VaRk9k1YAdyNbsflFi7qPCg/GwFqlbD0OrsWYN FzvL8RHmKRWR1k4HjLX5fBsO5NlMAPZrlHpxcA/UIv+Sl9Iv3G9E7bFJKG7hCU0MpdQvLtR oZHlNirSXwa7UbVjwnrTw== X-UI-Out-Filterresults: notjunk:1;V03:K0:lTHGrsZeWDM=:JXCj53bNX2jlA8G/jk8q9+ ku8scKecqGHwd//M28KuzmF+Udem5qyLlHQV2zMS1Jg3rBvvg/cNt4x6RrCo5RH6PKIGrSu/i B/Bti/71s2AuQlWoXGqjfoFlxuug3UgBX91WMWnSENAN1bSjgZ0ZemyFsCYG5tvDjkOghoxGS /lDssxfXCq/AfHwMHdJajXPlEkIhVNxuUnssbH56PS2JISYB8pfKvyKYnymBNJcFBMUGvSVuy kqrT+3lW6FHT25MyhMn2IkdYmyNKC70IIoY+rVkZ8YXDd2UDXKt2jvizqLEpk+9RFAxrR4S8B z8Ac0OgVJ+uBz/9k/yLMWNwMsnTp+XGzWX3qEr0PBnXU+JiI1yQzyZe9t0KzBrxqkgPvzL3ia zSePZ2s3kMktRQXEgA7hTXaxOi7u/HnGhkrK3rgKy0nnOji2+J+gIunq7HQoyZUpNKIXQJk8S Cp6eTKeARkhKlWgOF52HoJLP7NGu8FjXF3EuVOTgSSGDLRPpIquHuUDQYwIiWKYikXIP2NNN7 wrnP3dPMWR9AL2YKmn/pVOchHMns4PVWViw8RiufYmdSP6uq3D8+5R7HhuBJYClSZ2mRmowMQ 9VVEiEKk2z8iku0UcsJOZolAmOHxj/dd+7a8zB5dUSgvf/OSVonGiG7c+Zy+L5RzpMLu6RXd9 g8TQse+9URd/yHET2bfxsVwbp/AF2e+qur4ac7cUDBd0VZCEj9YrMHtstMcgxWK0eWHD7BzmR FBtEJaNLWUDMuqMFssmtpEc9hsZPhizIMAx1Pw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Charlene Liu , Duke Du , Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, Dmytro Laktyushkin , amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP As previously fixed for dml in commit 4769278e5c7f ("amdgpu/dc/dml: Support clang option for stack alignment") and calcs in commit cc32ad8f559c ("amdgpu/dc/calcs: Support clang option for stack alignment"), dcn20 uses an option that is not available with clang: clang: error: unknown argument: '-mpreferred-stack-boundary=4' scripts/Makefile.build:281: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.o' failed Use the same trick that we have in the other two files. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 8 +++++++- drivers/gpu/drm/amd/display/dc/dsc/Makefile | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile index 1b68de27ba74..e9721a906592 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile @@ -10,7 +10,13 @@ ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT DCN20 += dcn20_dsc.o endif -CFLAGS_dcn20_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4 +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align := -mpreferred-stack-boundary=4 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align := -mstack-alignment=16 +endif + +CFLAGS_dcn20_resource.o := -mhard-float -msse $(cc_stack_align) AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20)) diff --git a/drivers/gpu/drm/amd/display/dc/dsc/Makefile b/drivers/gpu/drm/amd/display/dc/dsc/Makefile index c5d5b94e2604..e019cd9447e8 100644 --- a/drivers/gpu/drm/amd/display/dc/dsc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dsc/Makefile @@ -1,10 +1,18 @@ # # Makefile for the 'dsc' sub-component of DAL. -CFLAGS_rc_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4 -CFLAGS_rc_calc_dpi.o := -mhard-float -msse -mpreferred-stack-boundary=4 -CFLAGS_codec_main_amd.o := -mhard-float -msse -mpreferred-stack-boundary=4 -CFLAGS_dc_dsc.o := -mhard-float -msse -mpreferred-stack-boundary=4 +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align := -mpreferred-stack-boundary=4 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align := -mstack-alignment=16 +endif + +dsc_ccflags := -mhard-float -msse $(cc_stack_align) + +CFLAGS_rc_calc.o := $(dsc_ccflags) +CFLAGS_rc_calc_dpi.o := $(dsc_ccflags) +CFLAGS_codec_main_amd.o := $(dsc_ccflags) +CFLAGS_dc_dsc.o := $(dsc_ccflags) DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o