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