| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 1 | gfxinit-y += hw-gfx-dp_aux_ch.adb |
| 2 | gfxinit-y += hw-gfx-dp_aux_ch.ads |
| 3 | gfxinit-y += hw-gfx-dp_defs.ads |
| Angel Pons | 8d5c24d | 2021-03-01 15:59:58 +0100 | [diff] [blame] | 4 | gfxinit-y += hw-gfx-dp_dual_mode.adb |
| 5 | gfxinit-y += hw-gfx-dp_dual_mode.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 6 | gfxinit-y += hw-gfx-dp_info.adb |
| 7 | gfxinit-y += hw-gfx-dp_info.ads |
| 8 | gfxinit-y += hw-gfx-dp_training.adb |
| 9 | gfxinit-y += hw-gfx-dp_training.ads |
| 10 | gfxinit-y += hw-gfx-edid.adb |
| 11 | gfxinit-y += hw-gfx-edid.ads |
| Nico Huber | 8c45bcf | 2016-11-20 17:30:57 +0100 | [diff] [blame] | 12 | gfxinit-y += hw-gfx-gma-config_helpers.adb |
| 13 | gfxinit-y += hw-gfx-gma-config_helpers.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 14 | gfxinit-y += hw-gfx-gma-connector_info.adb |
| 15 | gfxinit-y += hw-gfx-gma-connector_info.ads |
| 16 | gfxinit-y += hw-gfx-gma-connectors.ads |
| Nico Huber | 8c45bcf | 2016-11-20 17:30:57 +0100 | [diff] [blame] | 17 | gfxinit-y += hw-gfx-gma-display_probing.adb |
| 18 | gfxinit-y += hw-gfx-gma-display_probing.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 19 | gfxinit-y += hw-gfx-gma-dp_aux_ch.ads |
| 20 | gfxinit-y += hw-gfx-gma-dp_aux_request.adb |
| 21 | gfxinit-y += hw-gfx-gma-dp_aux_request.ads |
| Angel Pons | 8d5c24d | 2021-03-01 15:59:58 +0100 | [diff] [blame] | 22 | gfxinit-y += hw-gfx-gma-dp_dual_mode.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 23 | gfxinit-y += hw-gfx-gma-dp_info.ads |
| 24 | gfxinit-y += hw-gfx-gma-i2c.adb |
| 25 | gfxinit-y += hw-gfx-gma-i2c.ads |
| 26 | gfxinit-y += hw-gfx-gma-panel.adb |
| 27 | gfxinit-y += hw-gfx-gma-panel.ads |
| 28 | gfxinit-y += hw-gfx-gma-pch-fdi.adb |
| 29 | gfxinit-y += hw-gfx-gma-pch-fdi.ads |
| 30 | gfxinit-y += hw-gfx-gma-pch-sideband.adb |
| 31 | gfxinit-y += hw-gfx-gma-pch-sideband.ads |
| 32 | gfxinit-y += hw-gfx-gma-pch-transcoder.adb |
| 33 | gfxinit-y += hw-gfx-gma-pch-transcoder.ads |
| 34 | gfxinit-y += hw-gfx-gma-pch-vga.adb |
| 35 | gfxinit-y += hw-gfx-gma-pch-vga.ads |
| 36 | gfxinit-y += hw-gfx-gma-pch.ads |
| Nico Huber | 312433c | 2019-09-28 03:15:48 +0200 | [diff] [blame] | 37 | gfxinit-y += hw-gfx-gma-pcode.adb |
| 38 | gfxinit-y += hw-gfx-gma-pcode.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 39 | gfxinit-y += hw-gfx-gma-pipe_setup.adb |
| 40 | gfxinit-y += hw-gfx-gma-pipe_setup.ads |
| 41 | gfxinit-y += hw-gfx-gma-port_detect.ads |
| 42 | gfxinit-y += hw-gfx-gma-registers.adb |
| 43 | gfxinit-y += hw-gfx-gma-registers.ads |
| Nico Huber | 7ad2d65 | 2016-12-07 15:19:32 +0100 | [diff] [blame] | 44 | gfxinit-y += hw-gfx-gma-transcoder.adb |
| 45 | gfxinit-y += hw-gfx-gma-transcoder.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 46 | gfxinit-y += hw-gfx-gma.adb |
| 47 | gfxinit-y += hw-gfx-gma.ads |
| 48 | gfxinit-y += hw-gfx-i2c.ads |
| 49 | gfxinit-y += hw-gfx.ads |
| Nico Huber | 5374c3a | 2017-07-15 21:48:06 +0200 | [diff] [blame] | 50 | gfxinit-y += hw-gfx-framebuffer_filler.adb |
| 51 | gfxinit-y += hw-gfx-framebuffer_filler.ads |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 52 | |
| Nico Huber | e79babd | 2020-12-20 01:33:26 +0100 | [diff] [blame] | 53 | CONFIG_GFX_GMA_PCH ?= No_PCH |
| Nico Huber | 5dbaf4b | 2020-01-08 17:24:58 +0100 | [diff] [blame] | 54 | CONFIG_GFX_GMA_PANEL_2_PORT ?= Disabled |
| 55 | |
| Nico Huber | 6621a14 | 2018-06-07 23:56:54 +0200 | [diff] [blame] | 56 | CONFIG_GFX_GMA_GENERATION := $(call strip_quotes,$(CONFIG_GFX_GMA_GENERATION)) |
| Nico Huber | 3e50827 | 2016-10-09 20:44:16 +0200 | [diff] [blame] | 57 | CONFIG_GFX_GMA_CPU := $(call strip_quotes,$(CONFIG_GFX_GMA_CPU)) |
| 58 | CONFIG_GFX_GMA_CPU_VARIANT := $(call strip_quotes,$(CONFIG_GFX_GMA_CPU_VARIANT)) |
| Nico Huber | e79babd | 2020-12-20 01:33:26 +0100 | [diff] [blame] | 59 | CONFIG_GFX_GMA_PCH := $(call strip_quotes,$(CONFIG_GFX_GMA_PCH)) |
| Nico Huber | 8a6e7bd | 2020-01-07 16:36:38 +0100 | [diff] [blame] | 60 | CONFIG_GFX_GMA_PANEL_1_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_PANEL_1_PORT)) |
| Nico Huber | 5dbaf4b | 2020-01-08 17:24:58 +0100 | [diff] [blame] | 61 | CONFIG_GFX_GMA_PANEL_2_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_PANEL_2_PORT)) |
| Nico Huber | d55afeb | 2016-10-21 14:31:10 +0200 | [diff] [blame] | 62 | CONFIG_GFX_GMA_ANALOG_I2C_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_ANALOG_I2C_PORT)) |
| Matt DeVillier | 2a3dbba | 2020-05-14 17:34:13 -0500 | [diff] [blame] | 63 | CONFIG_GFX_GMA_IGNORE_PRESENCE_STRAPS := $(if $(filter y,$(CONFIG_GFX_GMA_IGNORE_PRESENCE_STRAPS)),True,False) |
| Nico Huber | 3e50827 | 2016-10-09 20:44:16 +0200 | [diff] [blame] | 64 | |
| Angel Pons | c0db994 | 2020-06-14 15:23:58 +0200 | [diff] [blame] | 65 | _GEN_TLA_SUBSTITUTIONS := \(g45\|ilk\|hsw\|skl\) |
| 66 | |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 67 | _GEN_NONCONST := $(strip \ |
| Nico Huber | 7f3e280 | 2019-09-28 20:40:55 +0200 | [diff] [blame] | 68 | $(if $(filter G45,$(CONFIG_GFX_GMA_GENERATION)),g45, \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 69 | $(if $(filter Ironlake,$(CONFIG_GFX_GMA_GENERATION)),ilk, \ |
| 70 | $(if $(filter Haswell,$(CONFIG_GFX_GMA_GENERATION)),hsw, \ |
| Nico Huber | 7f3e280 | 2019-09-28 20:40:55 +0200 | [diff] [blame] | 71 | $(if $(filter Skylake,$(CONFIG_GFX_GMA_GENERATION)),skl))))) |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 72 | # GNATprove (GPL 2017) doesn't realize when a boolean expression |
| 73 | # that depends both on static values and variables can be evalu- |
| 74 | # ated at compile time (e.g. `False and then Variable` is always |
| 75 | # `False` and GNAT acts appropriately). So for now, we generate |
| 76 | # functions instead of constant expressions for these mixed ex- |
| 77 | # pressions. |
| 78 | _GEN_CONST_TARGET := <cpufunc> # set to `constant` to generate constants. |
| 79 | |
| Nico Huber | 2600c36 | 2016-10-10 15:47:42 +0200 | [diff] [blame] | 80 | hw-gfx-gma-config-ads := $(subst //,/,$(call src-to-obj,,$(dir)/hw-gfx-gma-config).ads) |
| 81 | |
| Matt DeVillier | 8fc8e49 | 2020-05-15 15:44:47 -0500 | [diff] [blame] | 82 | GFX_GMA_COMMON_SUBSTITUTIONS := \ |
| 83 | -e's/<<GEN>>/$(CONFIG_GFX_GMA_GENERATION)/' \ |
| Nico Huber | e79babd | 2020-12-20 01:33:26 +0100 | [diff] [blame] | 84 | -e's/<<PCH>>/$(CONFIG_GFX_GMA_PCH)/' \ |
| Nico Huber | 8a6e7bd | 2020-01-07 16:36:38 +0100 | [diff] [blame] | 85 | -e's/<<PANEL_1_PORT>>/$(CONFIG_GFX_GMA_PANEL_1_PORT)/' \ |
| Nico Huber | 5dbaf4b | 2020-01-08 17:24:58 +0100 | [diff] [blame] | 86 | -e's/<<PANEL_2_PORT>>/$(CONFIG_GFX_GMA_PANEL_2_PORT)/' \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 87 | -e's/<<ANALOG_I2C_PORT>>/$(CONFIG_GFX_GMA_ANALOG_I2C_PORT)/' \ |
| 88 | -e's/<<DEFAULT_MMIO_BASE>>/$(CONFIG_GFX_GMA_DEFAULT_MMIO)/' \ |
| Matt DeVillier | 2a3dbba | 2020-05-14 17:34:13 -0500 | [diff] [blame] | 89 | -e's/<<IGNORE_STRAPS>>/$(CONFIG_GFX_GMA_IGNORE_PRESENCE_STRAPS)/' \ |
| Matt DeVillier | 8fc8e49 | 2020-05-15 15:44:47 -0500 | [diff] [blame] | 90 | |
| 91 | ifeq ($(CONFIG_GFX_GMA_DYN_CPU),y) |
| 92 | $(hw-gfx-gma-config-ads): $(dir)/hw-gfx-gma-config.ads.template $(cnf) |
| 93 | printf " GENERATE $(patsubst /%,%,$(subst $(obj)/,,$@))\n" |
| 94 | sed $(GFX_GMA_COMMON_SUBSTITUTIONS) \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 95 | -e'/constant Gen_CPU\(_Var\)\?/d' \ |
| 96 | -e's/<genbool>/constant Boolean/' \ |
| Angel Pons | c0db994 | 2020-06-14 15:23:58 +0200 | [diff] [blame] | 97 | -e's/<\($(_GEN_TLA_SUBSTITUTIONS)\(...\)\?\)bool>/<\1var> Boolean/' \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 98 | $(if $(_GEN_NONCONST),-e's/<\(...\)\?$(_GEN_NONCONST)\(...\)\?var>/<cpufunc>/') \ |
| Angel Pons | c0db994 | 2020-06-14 15:23:58 +0200 | [diff] [blame] | 99 | -e's/<$(_GEN_TLA_SUBSTITUTIONS)\(...\)\?var>/$(_GEN_CONST_TARGET)/' \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 100 | -e's/\(.*: *<cpufunc>.*:=\) *\(.*\);/\1\n (\2);/' \ |
| 101 | -e's/\([^ ]\+\) *: *<cpufunc> \+\([^ ]*\) *:=/function \1 return \2 is/' \ |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 102 | -e's/<cpunull>//' \ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 103 | $< >$@ |
| 104 | else |
| Nico Huber | 2600c36 | 2016-10-10 15:47:42 +0200 | [diff] [blame] | 105 | $(hw-gfx-gma-config-ads): $(dir)/hw-gfx-gma-config.ads.template $(cnf) |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 106 | printf " GENERATE $(patsubst /%,%,$(subst $(obj)/,,$@))\n" |
| Matt DeVillier | 8fc8e49 | 2020-05-15 15:44:47 -0500 | [diff] [blame] | 107 | sed $(GFX_GMA_COMMON_SUBSTITUTIONS) \ |
| Nico Huber | 6621a14 | 2018-06-07 23:56:54 +0200 | [diff] [blame] | 108 | -e's/<<CPU>>/$(CONFIG_GFX_GMA_CPU)/' \ |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 109 | -e's/<<CPU_VARIANT>>/$(CONFIG_GFX_GMA_CPU_VARIANT)/' \ |
| Angel Pons | c0db994 | 2020-06-14 15:23:58 +0200 | [diff] [blame] | 110 | -e's/<\(gen\|$(_GEN_TLA_SUBSTITUTIONS)\(...\)\?\)bool>/constant Boolean/' \ |
| 111 | -e's/<\($(_GEN_TLA_SUBSTITUTIONS)\(...\)\?\)var>/constant/' \ |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 112 | -e's/<cpunull>/ is null/' \ |
| Nico Huber | 04f919c | 2021-06-13 20:37:17 +0000 | [diff] [blame^] | 113 | -f $(dir $<)/delete_dyncpu.sed \ |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 114 | $< >$@ |
| Nico Huber | adfe11f | 2018-06-10 14:59:04 +0200 | [diff] [blame] | 115 | endif |
| Nico Huber | 2600c36 | 2016-10-10 15:47:42 +0200 | [diff] [blame] | 116 | gfxinit-gen-y += $(hw-gfx-gma-config-ads) |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 117 | gfxinit-$(CONFIG_GFX_GMA_DYN_CPU) += dyncpu/hw-gfx-gma-config.adb |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 118 | |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 119 | ifneq ($(filter G45,$(CONFIG_GFX_GMA_GENERATION)),) |
| Arthur Heymans | 73ea032 | 2018-03-28 17:17:07 +0200 | [diff] [blame] | 120 | subdirs-y += g45 |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 121 | else ifneq ($(filter Ironlake,$(CONFIG_GFX_GMA_GENERATION)),) |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 122 | subdirs-y += ironlake |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 123 | else ifneq ($(filter Haswell,$(CONFIG_GFX_GMA_GENERATION)),) |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 124 | subdirs-y += haswell_shared haswell |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 125 | else ifneq ($(filter Broxton,$(CONFIG_GFX_GMA_GENERATION)),) |
| Nico Huber | 21da574 | 2017-01-20 14:00:53 +0100 | [diff] [blame] | 126 | subdirs-y += haswell_shared broxton |
| Nico Huber | 6a996dc | 2018-06-17 16:30:33 +0200 | [diff] [blame] | 127 | else ifneq ($(filter Skylake,$(CONFIG_GFX_GMA_GENERATION)),) |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 128 | subdirs-y += haswell_shared skylake |
| 129 | endif |