[PATCH] drm/amd/display: Revert "add DCN support for aarch64"

Will Deacon will at kernel.org
Mon Dec 14 23:50:24 UTC 2020


On Mon, Dec 14, 2020 at 06:52:25PM +0100, Ard Biesheuvel wrote:
> This reverts commit c38d444e44badc557cf29fdfdfb823604890ccfa.
> 
> Simply disabling -mgeneral-regs-only left and right is risky, given that
> the standard AArch64 ABI permits the use of FP/SIMD registers anywhere,
> and GCC is known to use SIMD registers for spilling, and may invent
> other uses of the FP/SIMD register file that have nothing to do with the
> floating point code in question. Note that putting kernel_neon_begin()
> and kernel_neon_end() around the code that does use FP is not sufficient
> here, the problem is in all the other code that may be emitted with
> references to SIMD registers in it.
> 
> So the only way to do this properly is to put all floating point code in
> a separate compilation unit, and only compile that unit with
> -mgeneral-regs-only. But perhaps the use of floating point here is
> something that should be reconsidered entirely.
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Dave Martin <dave.martin at arm.com>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Leo Li <sunpeng.li at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: "Christian König" <christian.koenig at amd.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Daniel Kolesa <daniel at octaforge.org>
> Cc: amd-gfx at lists.freedesktop.org
> Cc: dri-devel at lists.freedesktop.org
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
> ---
>  drivers/gpu/drm/amd/display/Kconfig                   |  2 +-
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile         |  7 --
>  drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile       |  7 --
>  drivers/gpu/drm/amd/display/dc/dcn10/Makefile         |  7 --
>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 81 ++++++++------------
>  drivers/gpu/drm/amd/display/dc/dcn20/Makefile         |  4 -
>  drivers/gpu/drm/amd/display/dc/dcn21/Makefile         |  4 -
>  drivers/gpu/drm/amd/display/dc/dml/Makefile           | 13 ----
>  drivers/gpu/drm/amd/display/dc/dsc/Makefile           |  5 --
>  drivers/gpu/drm/amd/display/dc/os_types.h             |  4 -
>  10 files changed, 32 insertions(+), 102 deletions(-)

I didn't notice we'd enabled this for arm64, but I agree with the reasoning
in the commit message, so:

Acked-by: Will Deacon <will at kernel.org>

The long and short of it is that it is not safe to compile kernel C code
without -mgeneral-regs-only on arm64.

Will


More information about the dri-devel mailing list