Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wframe-larger-than in display/dc/dml/dcn20/display_mode_vba_20.c #695

Closed
tpgxyz opened this issue Sep 24, 2019 · 3 comments
Closed

-Wframe-larger-than in display/dc/dml/dcn20/display_mode_vba_20.c #695

tpgxyz opened this issue Sep 24, 2019 · 3 comments
Labels
-Wframe-larger-than= [ARCH] x86 This bug impacts ARCH=i386 duplicate This issue or pull request already exists low priority This bug is not critical and not a priority

Comments

@tpgxyz
Copy link

tpgxyz commented Sep 24, 2019

Building kernel 5.3.1 with LLVM/clang-9.0.0 on i686

  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.o
BUILDSTDERR: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:1084:13: warning: stack frame size of 1292 bytes in function 'dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation' [-Wframe-larger-than=]
BUILDSTDERR: static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation(
BUILDSTDERR:             ^
BUILDSTDERR: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:3283:6: warning: stack frame size of 1452 bytes in function 'dml20_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=]
BUILDSTDERR: void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
BUILDSTDERR:      ^
BUILDSTDERR: 2 warnings generated.
@nickdesaulniers nickdesaulniers added low priority This bug is not critical and not a priority -Wframe-larger-than= labels Sep 24, 2019
@tpgxyz tpgxyz added the [ARCH] x86 This bug impacts ARCH=i386 label Sep 26, 2019
@nathanchance
Copy link
Member

Still reproducible with Linux @ https://git.kernel.org/linus/16fc44d6387e260f4932e9248b985837324705d8 and LLVM @ llvm/llvm-project@1c10201.

$ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 i386_defconfig

$ scripts/config -e DRM_AMDGPU

$ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 olddefconfig drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.o
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:1085:13: warning: stack frame size of 1324 bytes in function 'dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation' [-Wframe-larger-than=]
static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation(
            ^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:3286:6: warning: stack frame size of 1468 bytes in function 'dml20_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=]
void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
     ^
2 warnings generated.

Running the object file through frame-larger-than.py:

$ python3 ../../github/frame-larger-than/frame_larger_than.py drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.o dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation
dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation:
	4	unsigned int                  	k
	4	unsigned int                  	j
dml_max:
dml_max:
dml_ceil:
dml_min:
dml_max:
dml_max:
dml_ceil:
dml_min:
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
	4	int                           	__ret_warn_on
RoundToDFSGranularityUp:
dml_floor:
RoundToDFSGranularityUp:
dml_floor:
RoundToDFSGranularityDown:
dml_ceil:
dml_max:
RoundToDFSGranularityUp:
dml_floor:
dml_ceil:
dml_min:
dml_min:
	1	bool                          	MainPlaneDoesODMCombine
dml_min:
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
dml_ceil:
dml_floor:
	8	double                        	DataFabricLineDeliveryTimeChroma
	8	double                        	DataFabricLineDeliveryTimeLuma
dml_ceil:
dml_max:
dml_ceil:
dml_max:
dml_ceil:
dml_ceil:
dml_floor:
dml_floor:
dml_min:
dml_min:
dml_ceil:
dml_max:
dml_max:
dml_max:
dml_min:
dml_floor:
dml_min:
dml_min:
dml_floor:
dml_min:
dml_max:
	8	double                        	MaxTotalRDBandwidth
	1	bool                          	DestinationLineTimesForPrefetchLessThan2
	1	bool                          	VRatioPrefetchMoreThan4
	1	bool                          	prefetch_vm_bw_valid
	1	bool                          	prefetch_row_bw_valid
	8	double                        	TWait
CalculateTWait:
dml_max:
dml_max:
dml_min:
dml_min:
dml_ceil:
CalculateRemoteSurfaceFlipDelay:
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
	8	double                        	result
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
	8	double                        	result
dml_min:
dml_max:
dml_max:
dml_max:
	0	double[]                      	final_flip_bw
	0	unsigned int[]                	ImmediateFlipBytes
	8	double                        	total_dcn_read_bw_with_flip
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
	8	double                        	EffectiveLBLatencyHidingC
	8	double                        	EffectiveLBLatencyHidingY
	8	double                        	DPPOutputBufferLinesY
	8	double                        	DPPOutputBufferLinesC
	8	double                        	DPPOPPBufferingY
	8	double                        	MaxDETBufferingTimeY
	8	double                        	ActiveDRAMClockChangeLatencyMarginY
	8	double                        	WritebackDRAMClockChangeLatencyMargin
dml_min:
dml_min:
dml_min:
dml_max:
dml_min:
dml_floor:
dml_max:
dml_min:
dml_floor:
	8	double                        	DPPOPPBufferingC
	8	double                        	MaxDETBufferingTimeC
	8	double                        	ActiveDRAMClockChangeLatencyMarginC
dml_min:
dml_ceil:
dml_max:
dml_max:
	8	double                        	bpp
	4	unsigned int                  	slices
dscceComputeDelay:
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	lstall
	4	unsigned int                  	D
	4	unsigned int                  	a
	4	unsigned int                  	l
	4	unsigned int                  	pixels
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
	8	double                        	floor
dml_ceil:
dml_floor:
dscComputeDelay:
	4	unsigned int                  	Delay
	4	unsigned int                  	Delay
dscceComputeDelay:
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	lstall
	4	unsigned int                  	D
	4	unsigned int                  	a
	4	unsigned int                  	l
	4	unsigned int                  	pixels
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
	8	double                        	floor
dml_ceil:
dml_floor:
dscComputeDelay:
	4	unsigned int                  	Delay
	4	unsigned int                  	Delay
	8	double                        	TWait
CalculateTWait:
dml_max:
dml_max:
dml_ceil:
CalculateRemoteSurfaceFlipDelay:
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
	8	double                        	result
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
dml_floor:
dml_ceil:
dml_ceil:
dml_max:
	4	unsigned int                  	VStartupMargin
	1	bool                          	FirstMainPlane
	4	unsigned int                  	Margin
dml_min:
	4	unsigned int                  	MetaRowByteC
	4	unsigned int                  	PixelPTEBytesPerRowY
	4	unsigned int                  	PixelPTEBytesPerRowC
	4	unsigned int                  	PDEAndMetaPTEBytesFrameY
	4	unsigned int                  	MetaRowByteY
	4	unsigned int                  	PDEAndMetaPTEBytesFrameC
CalculateActiveRowBandwidth:
dml_ceil:
dml_ceil:
dml_ceil:
dml_ceil:

$ python3 ../../github/frame-larger-than/frame_larger_than.py drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.o dml20_ModeSupportAndSystemConfigurationFull
Unsupported type info for DW_TAG_enumeration_type, implement me!
DIE DW_TAG_enumeration_type, size=12, has_children=True
    |DW_AT_type        :  AttributeValue(name='DW_AT_type', form='DW_FORM_ref4', value=75, raw_value=75, offset=638)
    |DW_AT_name        :  AttributeValue(name='DW_AT_name', form='DW_FORM_strp', value=b'dm_validation_status', raw_value=2265, offset=642)
    |DW_AT_byte_size   :  AttributeValue(name='DW_AT_byte_size', form='DW_FORM_data1', value=4, raw_value=4, offset=646)
    |DW_AT_decl_file   :  AttributeValue(name='DW_AT_decl_file', form='DW_FORM_data1', value=1, raw_value=1, offset=647)
    |DW_AT_decl_line   :  AttributeValue(name='DW_AT_decl_line', form='DW_FORM_data1', value=133, raw_value=133, offset=648)

dml20_ModeSupportAndSystemConfigurationFull:
	4	struct vba_vars_st*           	locals
	4	unsigned int                  	k
	4	int                           	i
	4	unsigned int                  	j
	4	unsigned int                  	m
dml_ceil:
dml_ceil:
dml_min:
dml_min:
dml_min:
dml_pow:
dml_min:
dml_min:
dml_min:
dml_pow:
dml_min:
dml_min:
dml_ceil:
dml_max:
dml_max:
dml_ceil:
dml_min:
dml_max3:
dml_max:
dml_max:
dml_ceil:
dml_min:
dml_min:
dml_max5:
dml_max4:
dml_max:
dml_max:
dml_max:
dml_max:
dml_max:
dml_ceil:
dml_max:
dml_min:
dml_min:
dml_ceil:
dml_ceil:
dml_min:
RoundToDFSGranularityDown:
dml_ceil:
RoundToDFSGranularityDown:
dml_ceil:
dml_max:
	4	unsigned int                  	NumberOfNonSplitPlaneOfMaximumBandwidth
	8	double                        	BWOfNonSplitPlaneOfMaximumBandwidth
dml_max:
dml_max:
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
dml_ceil:
dml_floor:
dml_min:
dml_min:
TruncToValidBPP:
TruncToValidBPP:
TruncToValidBPP:
TruncToValidBPP:
dscceComputeDelay:
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	lstall
	4	unsigned int                  	D
	4	unsigned int                  	a
	4	unsigned int                  	l
	4	unsigned int                  	pixels
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	pixels
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
	8	double                        	floor
dml_ceil:
dml_floor:
dscComputeDelay:
	4	unsigned int                  	Delay
	4	unsigned int                  	Delay
dscceComputeDelay:
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	lstall
	4	unsigned int                  	D
	4	unsigned int                  	a
	4	unsigned int                  	l
	4	unsigned int                  	pixels
	4	unsigned int                  	rcModelSize
	4	unsigned int                  	pixelsPerClock
	4	unsigned int                  	initalXmitDelay
	4	unsigned int                  	w
	4	unsigned int                  	wx
	4	unsigned int                  	p
	4	unsigned int                  	ix
	4	unsigned int                  	l0
	4	unsigned int                  	s
	4	unsigned int                  	ax
	4	unsigned int                  	Delay
	4	unsigned int                  	pixels
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
	8	double                        	floor
dml_ceil:
dml_floor:
dscComputeDelay:
	4	unsigned int                  	Delay
	4	unsigned int                  	Delay
dml_ceil:
dml_ceil:
dml_min:
dml_round:
	8	double                        	round_pt
	8	double                        	floor
	8	double                        	ceil
	8	double                        	round_pt
dml_ceil:
dml_floor:
dml_min:
dml_ceil:
dml_ceil:
dml_ceil:
dml_ceil:
dml_ceil:
dml_ceil:
dml_max:
dml_min:
dml_floor:
dml_max:
dml_min:
dml_floor:
dml_min:
dml_floor:
dml_min:
dml_floor:
dml_max:
dml_max:
dml_max3:
dml_max:
dml_max:
dml_max:
CalculateActiveRowBandwidth:
dml_ceil:
dml_ceil:
dml_max:
dml_ceil:
dml_max:
CalculateTWait:
dml_max:
dml_max:
dml_ceil:
CalculateRemoteSurfaceFlipDelay:
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
	8	double                        	result
	8	double                        	AvgfillRate
	8	double                        	TSlvSetup
dml_max:
dml_max3:
dml_max:
dml_max:
dml_min:
dml_floor:
dml_floor:
dml_max:
dml_ceil:
dml_max:
dml_ceil:
dml_max:
dml_ceil:
	4	None                          	status
	4	unsigned int                  	MaximumMPCCombine

@nickdesaulniers
Copy link
Member

6f6cb17 needs to be reverted to reproduce this now, but I observe the issue still in clang-18 (after llvm/llvm-project@e698695).

drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:1085:13: error: stack frame size (1308) exceeds limit (1024) in 'dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation' [-Werror,-Wframe-larger-than]
 1085 | static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation(
      |             ^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:3286:6: error: stack frame size (1388) exceeds limit (1024) in 'dml20_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than]
 3286 | void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
      |      ^

(this is similar to #694 I suspect)

@nickdesaulniers
Copy link
Member

duplicating this to #39. Once the two issues identified by #39 (comment) are fixed in clang, we can reopen this if necessary.

@nickdesaulniers nickdesaulniers added the duplicate This issue or pull request already exists label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wframe-larger-than= [ARCH] x86 This bug impacts ARCH=i386 duplicate This issue or pull request already exists low priority This bug is not critical and not a priority
Projects
None yet
Development

No branches or pull requests

3 participants