Debian Codegraph @

src/drivers/intel/gma/Makefile.mk

raw symbols SCIP
1 ## SPDX-License-Identifier: GPL-2.0-only
2
3 ramstage-$(CONFIG_INTEL_DDI) += intel_ddi.c
4 ramstage-$(CONFIG_INTEL_EDID) += edid.c vbt.c
5 ifeq ($(CONFIG_VGA_ROM_RUN),y)
6 ramstage-$(CONFIG_INTEL_INT15) += int15.c
7 endif
8 ramstage-$(CONFIG_INTEL_GMA_ACPI) += acpi.c
9 ramstage-$(CONFIG_INTEL_GMA_ACPI) += opregion.c
10
11 ifeq ($(CONFIG_INTEL_GMA_ADD_VBT),y)
12 # add_vbt_to_cbfs, first argument is the filename in cbfs, the second one
13 # is the filename in the coreboot tree.
14 add_vbt_to_cbfs= \
15 $(eval cbfs-files-y += $1) \
16 $(eval $1-file := $2) \
17 $(eval $1-type := raw) \
18 $(eval $1-compression := $(call strip_quotes,$(CONFIG_VBT_CBFS_COMPRESSION_ALGORITHM)))
19 endif
20
21 $(call add_vbt_to_cbfs, vbt.bin, $(call strip_quotes,$(CONFIG_INTEL_GMA_VBT_FILE)))
22
23 ifneq (,$(filter y, $(CONFIG_GFX_GMA) $(CONFIG_EARLY_GFX_GMA)))
24
25 gfx-gma-stages = \
26 $(if $(filter y,$(CONFIG_EARLY_GFX_GMA)),romstage) \
27 $(if $(filter y,$(CONFIG_GFX_GMA)),ramstage) \
28
29 $(call add-special-class,gfxinit)
30 gfxinit-handler +=$(foreach stage, $(gfx-gma-stages), \
31 $(eval $(stage)-srcs += $$(addprefix $(1),$(2))))
32
33 $(call add-special-class,gfxinit-gen)
34 gfxinit-gen-handler += \
35 $(eval additional-dirs += $(dir $(2))) \
36 $(foreach stage, $(gfx-gma-stages), \
37 $(eval $(stage)-srcs += $(2)) \
38 $(eval $(stage)-ads-deps += $(2)) \
39 $(eval $(stage)-adb-deps += $(2))) \
40 $(eval $(2): $(obj)/config.h)
41
42 ifeq ($(CONFIG_GFX_GMA_DEFAULT_MMIO),)
43 CONFIG_GFX_GMA_DEFAULT_MMIO := 0 # dummy, will be overwritten at runtime
44 else
45 $(call to-ada-hex,CONFIG_GFX_GMA_DEFAULT_MMIO)
46 endif
47
48 subdirs-y += ../../../../3rdparty/libgfxinit
49
50 $(foreach stage,$(gfx-gma-stages), \
51 $(eval $(stage)-y += gma.ads gma.adb))
52
53 endif # CONFIG_GFX_GMA || CONFIG_EARLY_GFX_GMA
54
55 ifeq ($(CONFIG_GFX_GMA),y)
56
57 ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-gfx_init.ads
58 ifeq ($(CONFIG_LINEAR_FRAMEBUFFER),y)
59 ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += hires_fb/gma-gfx_init.adb
60 else
61 ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += text_fb/gma-gfx_init.adb
62 endif
63
64 endif # CONFIG_GFX_GMA
65
66 ifeq ($(CONFIG_EARLY_GFX_GMA),y)
67
68 romstage-$(CONFIG_MAINBOARD_USE_EARLY_LIBGFXINIT) += \
69 gma-gfx_init.ads \
70 text_fb/gma-gfx_init.adb
71
72 endif # CONFIG_EARLY_GFX_GMA