[PATCH] drm/amd/display: Limit DCN to x86 arch
harry.wentland at amd.com
Fri May 19 19:36:39 UTC 2017
On 2017-05-19 11:02 AM, Christian König wrote:
> Am 19.05.2017 um 16:01 schrieb Harry Wentland:
>> DCN bw calcs currently rely on the following gcc options:
>> -mhard-float -msse -mpreferred-stack-boundary=4
> Mhm, price question: Why does DCN rely on the gcc options?
Tony and Dmytro can probably provide more info here but my understanding
is that DCN bandwidth calcs requires floating point support. This code
comes pretty much straight from hardware teams with a guarantee that the
output is good.
If we were to rewrite bandwidth calculations that guarantee would
basically fly out the window, which means when there's a bandwidth bug
we cannot easily get HW support unless we can prove that our
calculations yield the exact same results in all cases as HWs formula.
Covering all scenarios that bandwidth calcs covers would be quite an
extensive undertaking and I'm sure we'd miss important cases.
Bandwidth issues can be very hard to pin down and changes in the
calculations can have significant impact on our power efficiency.
> That is something very unusual for drivers. We occasionally have
> something like enabling additional warnings, but things like
> "-mhard-float" is clearly raising an eyebrow here.
Absolutely, and I'd love to hear more opinions on this.
>> We probably shouldn't allow building this on architectures
>> other than x86.
>> CC: Alex Deucher <Alexander.Deucher at amd.com>
>> CC: Christian König <christian.koenig at amd.com>
>> CC: Michel Dänzer <michel.daenzer at amd.com>
>> CC: Tony Cheng <Tony.Cheng at amd.com>
>> CC: Dmytro Laktyushkin <Dmytro.Laktyushkin at amd.com>
>> Signed-off-by: Harry Wentland <harry.wentland at amd.com>
>> Tested this change by running make menuconfig and make modules with
>> drivers/gpu/drm/amd/display/Kconfig | 2 +-
>> drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>> diff --git a/drivers/gpu/drm/amd/display/Kconfig
>> index 2b8d77cebe03..62ea9f600374 100644
>> --- a/drivers/gpu/drm/amd/display/Kconfig
>> +++ b/drivers/gpu/drm/amd/display/Kconfig
>> @@ -11,7 +11,7 @@ config DRM_AMD_DC
>> config DRM_AMD_DC_DCN1_0
>> bool "DCN 1.0 Raven family"
>> - depends on DRM_AMD_DC
>> + depends on DRM_AMD_DC && X86
>> Choose this option if you want to have
>> RV family for display engine
>> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> index a095472bf4b5..2e4ce0918c02 100644
>> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> @@ -3,9 +3,11 @@
>> # It calculates Bandwidth and Watermarks values for HW programming
>> +ifeq ($(ARCH),x86)
>> CFLAGS_dcn_calcs.o := -mhard-float -msse -mpreferred-stack-boundary=4
>> CFLAGS_dcn_calc_auto.o := -mhard-float -msse
>> CFLAGS_dcn_calc_math.o := -mhard-float -msse
>> BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o
More information about the amd-gfx