Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 2 participants 2 messages Oct 28, 2019 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

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

between commit:

  54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")

from Linus' tree and commits:

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.

Signature · 39 lines
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/display/dc/dcn20/Makefile
index ddb8d5649e79,be3a614963c6..000000000000
--- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile
@@@ -10,16 -10,21 +10,21 @@@ ifdef CONFIG_DRM_AMD_DC_DSC_SUPPOR
  DCN20 += dcn20_dsc.o
  endif
  
- 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
++CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
  
- CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_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_dcn20_resource.o += -mpreferred-stack-boundary=4
++CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -mpreferred-stack-boundary=4
+ else
 -CFLAGS_dcn20_resource.o += -msse2
 +CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -msse2
  endif
  
  AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20))
#1 lore raw
Quoted 17 lines · Stephen Rothwell

Hi all,

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

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

between commit:

  54b8ae66ae1a ("kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)")

from Linus' tree and commits:

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")

Quoted 8 lines

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.

I believe subsystems should queue up patches
against -rc1 or a later tag.

Developing based on an older version
causes unneeded conflicts like this.

Quoted 40 lines

--
Cheers,
Stephen Rothwell

drivers/gpu/drm/amd/display/dc/dcn20/Makefile +12 -7
diff --cc drivers/gpu/drm/amd/display/dc/dcn20/Makefile
index ddb8d5649e79,be3a614963c6..000000000000
@@@ -10,16 -10,21 +10,21 @@@ ifdef CONFIG_DRM_AMD_DC_DSC_SUPPOR
  DCN20 += dcn20_dsc.o
  endif
 
- 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
++CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
 
- CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_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_dcn20_resource.o += -mpreferred-stack-boundary=4
++CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -mpreferred-stack-boundary=4
+ else
 -CFLAGS_dcn20_resource.o += -msse2
 +CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -msse2
  endif
 
  AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20))
Signature · 2 lines
Best Regards
Masahiro Yamada