Subject: linux-next: manual merge of the amdgpu tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 28 Oct 2019 12:03:25 +1100

Hi all,

Today's linux-next merge of the amdgpu tree got a conflict in:

  drivers/gpu/drm/amd/display/dc/dcn21/Makefile

between commits:

  d7b0827f28ab ("Merge tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild")
  c0e70e10b11b ("drm/amd/display: fix dcn21 Makefile for clang")

from Linus' tree and commits:

  618f55831b84 ("drm/amd/display: fix dcn21 Makefile for clang")
  4f952528add3 ("drm/amdgpu: fix stack alignment ABI mismatch for Clang")
  971463bea55c ("drm/amdgpu: fix stack alignment ABI mismatch for GCC 7.1+")
  101d09f07966 ("drm/amdgpu: enable -msse2 for GCC 7.1+ users")

from the amdgpu tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/display/dc/dcn21/Makefile
index ef673bffc241,feb7e705e792..000000000000
--- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile
@@@ -1,18 -1,23 +1,23 @@@
  #
  # Makefile for DCN21.
  
- DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o
+ DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o dcn21_hwseq.o dcn21_link_encoder.o
  
- 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_dcn21_resource.o := -mhard-float -msse
++CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
  
- CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse $(cc_stack_align)
+ ifdef CONFIG_CC_IS_GCC
+ ifeq ($(call cc-ifversion, -lt, 0701, y), y)
+ IS_OLD_GCC = 1
+ endif
+ endif
  
- ifdef CONFIG_CC_IS_CLANG
+ ifdef IS_OLD_GCC
+ # Stack alignment mismatch, proceed with caution.
+ # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
+ # (8B stack alignment).
 -CFLAGS_dcn21_resource.o += -mpreferred-stack-boundary=4
++CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -mpreferred-stack-boundary=4
+ else
 -CFLAGS_dcn21_resource.o += -msse2
 +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2
  endif
  
  AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))