Re: [PATCH] drm/amd/display: Fix DML file discovery for out-of-tree builds
Leo Li <[email protected]> Mon, 27 Jul 2026 18:16:19 -0400
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
On 2026-07-23 01:44, Prike Liang wrote: > By anchoring the search to the DML top-level Makefile directory, > FPU CFLAGS are now correctly applied to all relevant source files. > > Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Leo Li <[email protected]> > --- > drivers/gpu/drm/amd/display/dc/dml2_0/Makefile | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/Makefile b/drivers/gpu/drm/amd/display/dc/dml2_0/Makefile > index 44e00c2b7ac7..e9ce7813b0f5 100644 > --- a/drivers/gpu/drm/amd/display/dc/dml2_0/Makefile > +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/Makefile > @@ -55,8 +55,11 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/ > > # Add FPU flags to all dml2 files by default, remove NO_FPU flags. > # FPU flags step 1: Find all .c files in dal/dc/dml2_0 and it's subfolders > -DML2_ABS_PATH := $(FULL_AMD_DISPLAY_PATH)/dc/dml2_0 > -DML2_C_FILES := $(shell find $(DML2_ABS_PATH) -name '*.c' -type f) > + > +THIS_MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) > +DML2_ABS_PATH := $(patsubst %/,%,$(dir $(THIS_MAKEFILE_PATH))) > + > +DML2_C_FILES := $(shell find $(DML2_ABS_PATH) -name '*.c') > > # FPU flags step 2: Convert to .o and make paths relative to $(AMDDALPATH)/dc/dml2_0/ > DML2_RELATIVE_O_FILES := $(patsubst $(DML2_ABS_PATH)/%,dc/dml2_0/%,$(patsubst %.c,%.o,$(DML2_C_FILES)))