diff --git a/patches/4.19/0001-surface-acpi.patch b/patches/4.19/0001-surface-acpi.patch index ac8f7205f..120e46c40 100644 --- a/patches/4.19/0001-surface-acpi.patch +++ b/patches/4.19/0001-surface-acpi.patch @@ -1,4 +1,4 @@ -From 3dba190fc78be008b532c0ccc26508d29df452a7 Mon Sep 17 00:00:00 2001 +From bcb840821cd18b10375f24efb5b44f7f5adcc535 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Wed, 2 Oct 2019 22:28:37 +0200 Subject: [PATCH 01/12] surface-acpi diff --git a/patches/4.19/0002-suspend.patch b/patches/4.19/0002-suspend.patch index 3273bf29d..018fa31f6 100644 --- a/patches/4.19/0002-suspend.patch +++ b/patches/4.19/0002-suspend.patch @@ -1,4 +1,4 @@ -From fdd0d1e94fddf87f87225d5a75cfe52bb822091d Mon Sep 17 00:00:00 2001 +From fa7e9dbe07d4e3a7e5bc90483fb3855bf37a55b8 Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Fri, 20 Sep 2019 01:03:29 +0900 Subject: [PATCH 02/12] suspend diff --git a/patches/4.19/0003-buttons.patch b/patches/4.19/0003-buttons.patch index 2c773aedd..fc3e23a72 100644 --- a/patches/4.19/0003-buttons.patch +++ b/patches/4.19/0003-buttons.patch @@ -1,13 +1,13 @@ -From dbc12367327b76ce1c8018a5f5acf46c6516028c Mon Sep 17 00:00:00 2001 +From 5d229605142d04aed881b5df78faf510a3782e4d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:42:15 +0200 Subject: [PATCH 03/12] buttons --- drivers/input/misc/Kconfig | 6 +- - drivers/input/misc/soc_button_array.c | 105 +++++++++++++++++++--- - drivers/platform/x86/surfacepro3_button.c | 47 ++++++++++ - 3 files changed, 143 insertions(+), 15 deletions(-) + drivers/input/misc/soc_button_array.c | 112 +++++++++++++++++++--- + drivers/platform/x86/surfacepro3_button.c | 47 +++++++++ + 3 files changed, 150 insertions(+), 15 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index ca59a2be9bc5..ea69610370e8 100644 @@ -28,7 +28,7 @@ index ca59a2be9bc5..ea69610370e8 100644 To compile this driver as a module, choose M here: the module will be called soc_button_array. diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c -index 55cd6e0b409c..8f21c062c85d 100644 +index 55cd6e0b409c..5983733d78dd 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -29,6 +29,11 @@ struct soc_button_info { @@ -43,22 +43,29 @@ index 55cd6e0b409c..8f21c062c85d 100644 /* * Some of the buttons like volume up/down are auto repeat, while others * are not. To support both, we register two platform devices, and put -@@ -91,8 +96,13 @@ soc_button_device_create(struct platform_device *pdev, +@@ -91,8 +96,20 @@ soc_button_device_create(struct platform_device *pdev, continue; gpio = soc_button_lookup_gpio(&pdev->dev, info->acpi_index); - if (!gpio_is_valid(gpio)) -+ if (gpio < 0 && gpio != -ENOENT) { -+ error = gpio; -+ goto err_free_mem; -+ } else if (!gpio_is_valid(gpio)) { -+ /* Skip GPIO if not present */ ++ if (!gpio_is_valid(gpio)) { ++ /* ++ * Skip GPIO if not present. Note we deliberately ++ * ignore -EPROBE_DEFER errors here. On some devices ++ * Intel is using so called virtual GPIOs which are not ++ * GPIOs at all but some way for AML code to check some ++ * random status bits without need a custom opregion. ++ * In some cases the resources table we parse points to ++ * such a virtual GPIO, since these are not real GPIOs ++ * we do not have a driver for these so they will never ++ * show up, therefor we ignore -EPROBE_DEFER. ++ */ continue; + } gpio_keys[n_buttons].type = info->event_type; gpio_keys[n_buttons].code = info->event_code; -@@ -309,23 +319,26 @@ static int soc_button_remove(struct platform_device *pdev) +@@ -309,23 +326,26 @@ static int soc_button_remove(struct platform_device *pdev) static int soc_button_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -93,7 +100,7 @@ index 55cd6e0b409c..8f21c062c85d 100644 } error = gpiod_count(dev, NULL); -@@ -357,7 +370,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -357,7 +377,7 @@ static int soc_button_probe(struct platform_device *pdev) if (!priv->children[0] && !priv->children[1]) return -ENODEV; @@ -102,7 +109,7 @@ index 55cd6e0b409c..8f21c062c85d 100644 devm_kfree(dev, button_info); return 0; -@@ -368,7 +381,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -368,7 +388,7 @@ static int soc_button_probe(struct platform_device *pdev) * is defined in section 2.8.7.2 of "Windows ACPI Design Guide for SoC * Platforms" */ @@ -111,7 +118,7 @@ index 55cd6e0b409c..8f21c062c85d 100644 { "power", 0, EV_KEY, KEY_POWER, false, true }, { "home", 1, EV_KEY, KEY_LEFTMETA, false, true }, { "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false }, -@@ -377,9 +390,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { +@@ -377,9 +397,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { { } }; diff --git a/patches/4.19/0004-cameras.patch b/patches/4.19/0004-cameras.patch index 37e2379be..c66788c15 100644 --- a/patches/4.19/0004-cameras.patch +++ b/patches/4.19/0004-cameras.patch @@ -1,4 +1,4 @@ -From 32aae1e64da7ea1e6c4895467c661cc3751b376f Mon Sep 17 00:00:00 2001 +From 053effa42ff66c5287a54ee5890ffb36731a99c4 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:42:25 +0200 Subject: [PATCH 04/12] cameras diff --git a/patches/4.19/0005-ipts.patch b/patches/4.19/0005-ipts.patch index a6e58866f..ee70a25fa 100644 --- a/patches/4.19/0005-ipts.patch +++ b/patches/4.19/0005-ipts.patch @@ -1,4 +1,4 @@ -From 1c679b8c0ae742c6c08dc035b83040d40abd9203 Mon Sep 17 00:00:00 2001 +From ba20bcf9e7fa8faba1a373d89ecc18b3f9211d5a Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:52:46 +0900 Subject: [PATCH 05/12] ipts @@ -28,7 +28,7 @@ Subject: [PATCH 05/12] ipts drivers/misc/ipts/Makefile | 17 + drivers/misc/ipts/companion/Kconfig | 9 + drivers/misc/ipts/companion/Makefile | 1 + - drivers/misc/ipts/companion/ipts-surface.c | 82 ++ + drivers/misc/ipts/companion/ipts-surface.c | 100 ++ drivers/misc/ipts/ipts-binary-spec.h | 118 +++ drivers/misc/ipts/ipts-dbgfs.c | 364 +++++++ drivers/misc/ipts/ipts-fw.c | 113 ++ @@ -54,7 +54,7 @@ Subject: [PATCH 05/12] ipts drivers/misc/mei/pci-me.c | 1 + include/linux/intel_ipts_fw.h | 14 + include/linux/intel_ipts_if.h | 76 ++ - 50 files changed, 6154 insertions(+), 26 deletions(-) + 50 files changed, 6172 insertions(+), 26 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_ipts.c create mode 100644 drivers/gpu/drm/i915/intel_ipts.h create mode 100644 drivers/misc/ipts/Kconfig @@ -1401,14 +1401,14 @@ index af22bbc3d00c..eb1eb0d58c32 100644 obj-$(CONFIG_SRAM) += sram.o diff --git a/drivers/misc/ipts/Kconfig b/drivers/misc/ipts/Kconfig new file mode 100644 -index 000000000000..a24c4daaed42 +index 000000000000..992a51061b38 --- /dev/null +++ b/drivers/misc/ipts/Kconfig @@ -0,0 +1,11 @@ +config INTEL_IPTS + tristate "Intel Precise Touch & Stylus" + select INTEL_MEI -+ depends on X86 && PCI && HID ++ depends on X86 && PCI && HID && DRM_I915 + help + Intel Precise Touch & Stylus support + Supported SoCs: @@ -1463,10 +1463,10 @@ index 000000000000..fb4d58935f01 +obj-$(CONFIG_INTEL_IPTS_SURFACE)+= ipts-surface.o diff --git a/drivers/misc/ipts/companion/ipts-surface.c b/drivers/misc/ipts/companion/ipts-surface.c new file mode 100644 -index 000000000000..4d6116dfa728 +index 000000000000..6f5aabb14e5a --- /dev/null +++ b/drivers/misc/ipts/companion/ipts-surface.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,100 @@ +#include +#include +#include @@ -1476,6 +1476,24 @@ index 000000000000..4d6116dfa728 + +#define IPTS_SURFACE_FW_PATH_FMT "intel/ipts/%s/%s" + ++#define __IPTS_SURFACE_FIRMWARE(X, Y) \ ++ MODULE_FIRMWARE("intel/ipts/" X "/" Y) ++ ++#define IPTS_SURFACE_FIRMWARE(X) \ ++ __IPTS_SURFACE_FIRMWARE(X, "config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_fw_config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_kernel.bin") ++ ++IPTS_SURFACE_FIRMWARE("MSHW0076"); ++IPTS_SURFACE_FIRMWARE("MSHW0078"); ++IPTS_SURFACE_FIRMWARE("MSHW0079"); ++IPTS_SURFACE_FIRMWARE("MSHW0101"); ++IPTS_SURFACE_FIRMWARE("MSHW0102"); ++IPTS_SURFACE_FIRMWARE("MSHW0103"); ++IPTS_SURFACE_FIRMWARE("MSHW0137"); ++ +int ipts_surface_request_firmware(const struct firmware **fw, const char *name, + struct device *device, void *data) +{ diff --git a/patches/4.19/0006-hid.patch b/patches/4.19/0006-hid.patch index 5b12c8250..cdc5020fe 100644 --- a/patches/4.19/0006-hid.patch +++ b/patches/4.19/0006-hid.patch @@ -1,4 +1,4 @@ -From d46001bbd61c1662cf9c82837ebfea3239ebf0bd Mon Sep 17 00:00:00 2001 +From b0bbf860d2a601d8c565858b5f3524c94627ab25 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:42:50 +0200 Subject: [PATCH 06/12] hid diff --git a/patches/4.19/0007-sdcard-reader.patch b/patches/4.19/0007-sdcard-reader.patch index 6a539ebc5..d0092db56 100644 --- a/patches/4.19/0007-sdcard-reader.patch +++ b/patches/4.19/0007-sdcard-reader.patch @@ -1,4 +1,4 @@ -From d3edfe02eabb2eb171a4ae790a5e888e81c14101 Mon Sep 17 00:00:00 2001 +From 88a3bb4523f4681fd995f6c179e298317d57666f Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:43:03 +0200 Subject: [PATCH 07/12] sdcard-reader diff --git a/patches/4.19/0008-wifi.patch b/patches/4.19/0008-wifi.patch index 134dc4aeb..b9a907905 100644 --- a/patches/4.19/0008-wifi.patch +++ b/patches/4.19/0008-wifi.patch @@ -1,4 +1,4 @@ -From 82f3fd486b32769081e2d6812791c0f8921623f8 Mon Sep 17 00:00:00 2001 +From 91d5d2387c622beda4a808d030d26088f2561715 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:43:14 +0200 Subject: [PATCH 08/12] wifi diff --git a/patches/4.19/0009-surface3-power.patch b/patches/4.19/0009-surface3-power.patch index 9f93d107c..57db84c35 100644 --- a/patches/4.19/0009-surface3-power.patch +++ b/patches/4.19/0009-surface3-power.patch @@ -1,4 +1,4 @@ -From ca36331bd3ce2f4f835a3949d5dd318017cdd4c6 Mon Sep 17 00:00:00 2001 +From 735dba4a5b07638b17ba1ac139e7028bac29cf1d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:43:27 +0200 Subject: [PATCH 09/12] surface3-power diff --git a/patches/4.19/0010-mwlwifi.patch b/patches/4.19/0010-mwlwifi.patch index e035f78d4..67fd972cc 100644 --- a/patches/4.19/0010-mwlwifi.patch +++ b/patches/4.19/0010-mwlwifi.patch @@ -1,4 +1,4 @@ -From 080e6670d3626985fcf2989b4e0ab472be942954 Mon Sep 17 00:00:00 2001 +From 9545f8525aa758207c974215ee6b635516aeac82 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:43:45 +0200 Subject: [PATCH 10/12] mwlwifi diff --git a/patches/4.19/0011-surface-lte.patch b/patches/4.19/0011-surface-lte.patch index 5d0cff632..00adf5eb4 100644 --- a/patches/4.19/0011-surface-lte.patch +++ b/patches/4.19/0011-surface-lte.patch @@ -1,4 +1,4 @@ -From 810ebe900e48d6a50c715b9b0b6d3fc842976ae4 Mon Sep 17 00:00:00 2001 +From 59199ea3163562e29bc8a5ad2a1c1bf11cc634f9 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:43:57 +0200 Subject: [PATCH 11/12] surface-lte diff --git a/patches/4.19/0012-surfacebook2-dgpu.patch b/patches/4.19/0012-surfacebook2-dgpu.patch index 9d5868a68..8b5e92297 100644 --- a/patches/4.19/0012-surfacebook2-dgpu.patch +++ b/patches/4.19/0012-surfacebook2-dgpu.patch @@ -1,4 +1,4 @@ -From 0627b97f70cb301ac315e38fffc6e1237c3ebedd Mon Sep 17 00:00:00 2001 +From 11d49c9f0d336f6575f38228044a209652d1ede1 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 03:44:10 +0200 Subject: [PATCH 12/12] surfacebook2-dgpu diff --git a/patches/5.2/0001-surface-acpi.patch b/patches/5.2/0001-surface-acpi.patch index ad91d0ea3..88f593817 100644 --- a/patches/5.2/0001-surface-acpi.patch +++ b/patches/5.2/0001-surface-acpi.patch @@ -1,4 +1,4 @@ -From f2650d86b6172e3dbc6f9510ef50bd7ef32b509b Mon Sep 17 00:00:00 2001 +From fe620408edbe977514da914279f549e7d8fb036a Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Wed, 2 Oct 2019 22:36:03 +0200 Subject: [PATCH 01/12] surface-acpi diff --git a/patches/5.2/0002-suspend.patch b/patches/5.2/0002-suspend.patch index 46039dc46..1d894f0d4 100644 --- a/patches/5.2/0002-suspend.patch +++ b/patches/5.2/0002-suspend.patch @@ -1,4 +1,4 @@ -From 96d9183e53e80209086d7f5c5225a1108a451748 Mon Sep 17 00:00:00 2001 +From cb14df71f8a2da98fd242a35143613c55525ca44 Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Wed, 31 Jul 2019 08:41:30 +0900 Subject: [PATCH 02/12] suspend diff --git a/patches/5.2/0003-buttons.patch b/patches/5.2/0003-buttons.patch index 98eb2590a..19824ec4a 100644 --- a/patches/5.2/0003-buttons.patch +++ b/patches/5.2/0003-buttons.patch @@ -1,13 +1,13 @@ -From e0465b614d5191e2fc3ecae7bfa6f1e44ed94a84 Mon Sep 17 00:00:00 2001 +From 2a57dacdffa4b231321c0dfd4490a0c7f5b70153 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:45:10 +0200 Subject: [PATCH 03/12] buttons --- drivers/input/misc/Kconfig | 6 +- - drivers/input/misc/soc_button_array.c | 105 +++++++++++++++++++--- - drivers/platform/x86/surfacepro3_button.c | 47 ++++++++++ - 3 files changed, 143 insertions(+), 15 deletions(-) + drivers/input/misc/soc_button_array.c | 112 +++++++++++++++++++--- + drivers/platform/x86/surfacepro3_button.c | 47 +++++++++ + 3 files changed, 150 insertions(+), 15 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d07c1eb15aa6..7d9ae394e597 100644 @@ -28,7 +28,7 @@ index d07c1eb15aa6..7d9ae394e597 100644 To compile this driver as a module, choose M here: the module will be called soc_button_array. diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c -index 5e59f8e57f8e..6f0133fe1546 100644 +index 5e59f8e57f8e..ef89698c7d43 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -25,6 +25,11 @@ struct soc_button_info { @@ -43,22 +43,29 @@ index 5e59f8e57f8e..6f0133fe1546 100644 /* * Some of the buttons like volume up/down are auto repeat, while others * are not. To support both, we register two platform devices, and put -@@ -87,8 +92,13 @@ soc_button_device_create(struct platform_device *pdev, +@@ -87,8 +92,20 @@ soc_button_device_create(struct platform_device *pdev, continue; gpio = soc_button_lookup_gpio(&pdev->dev, info->acpi_index); - if (!gpio_is_valid(gpio)) -+ if (gpio < 0 && gpio != -ENOENT) { -+ error = gpio; -+ goto err_free_mem; -+ } else if (!gpio_is_valid(gpio)) { -+ /* Skip GPIO if not present */ ++ if (!gpio_is_valid(gpio)) { ++ /* ++ * Skip GPIO if not present. Note we deliberately ++ * ignore -EPROBE_DEFER errors here. On some devices ++ * Intel is using so called virtual GPIOs which are not ++ * GPIOs at all but some way for AML code to check some ++ * random status bits without need a custom opregion. ++ * In some cases the resources table we parse points to ++ * such a virtual GPIO, since these are not real GPIOs ++ * we do not have a driver for these so they will never ++ * show up, therefor we ignore -EPROBE_DEFER. ++ */ continue; + } gpio_keys[n_buttons].type = info->event_type; gpio_keys[n_buttons].code = info->event_code; -@@ -309,23 +319,26 @@ static int soc_button_remove(struct platform_device *pdev) +@@ -309,23 +326,26 @@ static int soc_button_remove(struct platform_device *pdev) static int soc_button_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -93,7 +100,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 } error = gpiod_count(dev, NULL); -@@ -357,7 +370,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -357,7 +377,7 @@ static int soc_button_probe(struct platform_device *pdev) if (!priv->children[0] && !priv->children[1]) return -ENODEV; @@ -102,7 +109,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 devm_kfree(dev, button_info); return 0; -@@ -368,7 +381,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -368,7 +388,7 @@ static int soc_button_probe(struct platform_device *pdev) * is defined in section 2.8.7.2 of "Windows ACPI Design Guide for SoC * Platforms" */ @@ -111,7 +118,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 { "power", 0, EV_KEY, KEY_POWER, false, true }, { "home", 1, EV_KEY, KEY_LEFTMETA, false, true }, { "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false }, -@@ -377,9 +390,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { +@@ -377,9 +397,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { { } }; diff --git a/patches/5.2/0004-cameras.patch b/patches/5.2/0004-cameras.patch index a4f979947..d57d5041f 100644 --- a/patches/5.2/0004-cameras.patch +++ b/patches/5.2/0004-cameras.patch @@ -1,4 +1,4 @@ -From a2df42f63c69a0b100d4dd59a6f06eefc45b1a2c Mon Sep 17 00:00:00 2001 +From c4462fc162588ba31e4afc9c7865a2ee2d62afd5 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:45:19 +0200 Subject: [PATCH 04/12] cameras diff --git a/patches/5.2/0005-ipts.patch b/patches/5.2/0005-ipts.patch index 00c1331f8..8118e9bf9 100644 --- a/patches/5.2/0005-ipts.patch +++ b/patches/5.2/0005-ipts.patch @@ -1,4 +1,4 @@ -From d39dd89cae4f537eec84d5bd7c7b52837766fe3f Mon Sep 17 00:00:00 2001 +From 80e9c51a3d3b646698a40d761fd30a8cf6b45244 Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:54:42 +0900 Subject: [PATCH 05/12] ipts @@ -28,7 +28,7 @@ Subject: [PATCH 05/12] ipts drivers/misc/ipts/Makefile | 17 + drivers/misc/ipts/companion/Kconfig | 9 + drivers/misc/ipts/companion/Makefile | 1 + - drivers/misc/ipts/companion/ipts-surface.c | 82 ++ + drivers/misc/ipts/companion/ipts-surface.c | 100 ++ drivers/misc/ipts/ipts-binary-spec.h | 118 +++ drivers/misc/ipts/ipts-dbgfs.c | 364 +++++++ drivers/misc/ipts/ipts-fw.c | 113 ++ @@ -54,7 +54,7 @@ Subject: [PATCH 05/12] ipts drivers/misc/mei/pci-me.c | 1 + include/linux/intel_ipts_fw.h | 14 + include/linux/intel_ipts_if.h | 76 ++ - 50 files changed, 6154 insertions(+), 26 deletions(-) + 50 files changed, 6172 insertions(+), 26 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_ipts.c create mode 100644 drivers/gpu/drm/i915/intel_ipts.h create mode 100644 drivers/misc/ipts/Kconfig @@ -1403,14 +1403,14 @@ index b9affcdaa3d6..e681e345a9ed 100644 obj-$(CONFIG_SRAM) += sram.o diff --git a/drivers/misc/ipts/Kconfig b/drivers/misc/ipts/Kconfig new file mode 100644 -index 000000000000..a24c4daaed42 +index 000000000000..992a51061b38 --- /dev/null +++ b/drivers/misc/ipts/Kconfig @@ -0,0 +1,11 @@ +config INTEL_IPTS + tristate "Intel Precise Touch & Stylus" + select INTEL_MEI -+ depends on X86 && PCI && HID ++ depends on X86 && PCI && HID && DRM_I915 + help + Intel Precise Touch & Stylus support + Supported SoCs: @@ -1465,10 +1465,10 @@ index 000000000000..fb4d58935f01 +obj-$(CONFIG_INTEL_IPTS_SURFACE)+= ipts-surface.o diff --git a/drivers/misc/ipts/companion/ipts-surface.c b/drivers/misc/ipts/companion/ipts-surface.c new file mode 100644 -index 000000000000..4d6116dfa728 +index 000000000000..6f5aabb14e5a --- /dev/null +++ b/drivers/misc/ipts/companion/ipts-surface.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,100 @@ +#include +#include +#include @@ -1478,6 +1478,24 @@ index 000000000000..4d6116dfa728 + +#define IPTS_SURFACE_FW_PATH_FMT "intel/ipts/%s/%s" + ++#define __IPTS_SURFACE_FIRMWARE(X, Y) \ ++ MODULE_FIRMWARE("intel/ipts/" X "/" Y) ++ ++#define IPTS_SURFACE_FIRMWARE(X) \ ++ __IPTS_SURFACE_FIRMWARE(X, "config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_fw_config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_kernel.bin") ++ ++IPTS_SURFACE_FIRMWARE("MSHW0076"); ++IPTS_SURFACE_FIRMWARE("MSHW0078"); ++IPTS_SURFACE_FIRMWARE("MSHW0079"); ++IPTS_SURFACE_FIRMWARE("MSHW0101"); ++IPTS_SURFACE_FIRMWARE("MSHW0102"); ++IPTS_SURFACE_FIRMWARE("MSHW0103"); ++IPTS_SURFACE_FIRMWARE("MSHW0137"); ++ +int ipts_surface_request_firmware(const struct firmware **fw, const char *name, + struct device *device, void *data) +{ diff --git a/patches/5.2/0006-hid.patch b/patches/5.2/0006-hid.patch index 7e0eb230e..9d821188f 100644 --- a/patches/5.2/0006-hid.patch +++ b/patches/5.2/0006-hid.patch @@ -1,4 +1,4 @@ -From d6f5b803983d215120e53aa3c4ba79b04eba8a1c Mon Sep 17 00:00:00 2001 +From 7f34de9f7976e18b2b12c45a4be88fe4be309ac3 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:45:42 +0200 Subject: [PATCH 06/12] hid diff --git a/patches/5.2/0007-sdcard-reader.patch b/patches/5.2/0007-sdcard-reader.patch index 79995ded8..28249eac8 100644 --- a/patches/5.2/0007-sdcard-reader.patch +++ b/patches/5.2/0007-sdcard-reader.patch @@ -1,4 +1,4 @@ -From d2dfd17628decf485774792e209e52ce5f909d95 Mon Sep 17 00:00:00 2001 +From 20f5d4e58e6e6f59dd62410bae2fbe8267f6b3fb Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:45:55 +0200 Subject: [PATCH 07/12] sdcard-reader diff --git a/patches/5.2/0008-wifi.patch b/patches/5.2/0008-wifi.patch index eb2e5b4b5..61065c66b 100644 --- a/patches/5.2/0008-wifi.patch +++ b/patches/5.2/0008-wifi.patch @@ -1,4 +1,4 @@ -From 5955f13ceae15d8be7f867967009eefab01111fd Mon Sep 17 00:00:00 2001 +From 3dba15603a8fd4eb99f5abf3e569bae6affa4d8a Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:46:16 +0200 Subject: [PATCH 08/12] wifi diff --git a/patches/5.2/0009-surface3-power.patch b/patches/5.2/0009-surface3-power.patch index a4eee6ec9..4820d6f00 100644 --- a/patches/5.2/0009-surface3-power.patch +++ b/patches/5.2/0009-surface3-power.patch @@ -1,4 +1,4 @@ -From 4fe3df8ceba771043ed1da5247be317c1212c71d Mon Sep 17 00:00:00 2001 +From 584dca5082c73e445989cc9dd7db57ba4e8f3f70 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:46:48 +0200 Subject: [PATCH 09/12] surface3-power diff --git a/patches/5.2/0010-mwlwifi.patch b/patches/5.2/0010-mwlwifi.patch index f3d063aed..9dbfe243f 100644 --- a/patches/5.2/0010-mwlwifi.patch +++ b/patches/5.2/0010-mwlwifi.patch @@ -1,4 +1,4 @@ -From 2da6425e02eb20ca98ae94e82a569f66b4b719a3 Mon Sep 17 00:00:00 2001 +From 7d59140a399019781fb485e29111a8ea02b2d29f Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:47:02 +0200 Subject: [PATCH 10/12] mwlwifi diff --git a/patches/5.2/0011-surface-lte.patch b/patches/5.2/0011-surface-lte.patch index ccc963ed4..c87894d15 100644 --- a/patches/5.2/0011-surface-lte.patch +++ b/patches/5.2/0011-surface-lte.patch @@ -1,4 +1,4 @@ -From 826929495dfbce2c34164619a4f4c165da1a6ca4 Mon Sep 17 00:00:00 2001 +From 92babb348163d945fb4291fe53fa131efab7bf1b Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:47:13 +0200 Subject: [PATCH 11/12] surface-lte diff --git a/patches/5.2/0012-surfacebook2-dgpu.patch b/patches/5.2/0012-surfacebook2-dgpu.patch index ef2ae7645..3dc07e2c1 100644 --- a/patches/5.2/0012-surfacebook2-dgpu.patch +++ b/patches/5.2/0012-surfacebook2-dgpu.patch @@ -1,4 +1,4 @@ -From b26c755e29da94bbcfc7c6c968c3518f144266c0 Mon Sep 17 00:00:00 2001 +From 6d1be33af986a10d63cf4c4dbd6a2cd7532d8bde Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Jul 2019 04:47:27 +0200 Subject: [PATCH 12/12] surfacebook2-dgpu diff --git a/patches/5.3/0001-surface-acpi.patch b/patches/5.3/0001-surface-acpi.patch index 94e252664..9f3fb59af 100644 --- a/patches/5.3/0001-surface-acpi.patch +++ b/patches/5.3/0001-surface-acpi.patch @@ -1,6 +1,6 @@ -From 8e6aaa0ba3cdbcc3df145e6b986b9d59e3c16b54 Mon Sep 17 00:00:00 2001 +From c7543d2458c5282bda2802701324cc77478146d8 Mon Sep 17 00:00:00 2001 From: Maximilian Luz -Date: Wed, 2 Oct 2019 22:40:13 +0200 +Date: Mon, 26 Aug 2019 01:11:08 +0200 Subject: [PATCH 1/9] surface-acpi --- @@ -180,7 +180,7 @@ index 415104033060..662e595ae13f 100644 obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o diff --git a/drivers/platform/x86/surface_acpi.c b/drivers/platform/x86/surface_acpi.c new file mode 100644 -index 000000000000..5dbf48a3d9b3 +index 000000000000..633fd8929037 --- /dev/null +++ b/drivers/platform/x86/surface_acpi.c @@ -0,0 +1,4010 @@ @@ -1802,7 +1802,7 @@ index 000000000000..5dbf48a3d9b3 +{ + struct surfacegen5_ec *ec; + unsigned long flags; -+ int status; ++ //int status; + + ec = surfacegen5_ec_acquire_init(); + if (!ec) { @@ -1812,10 +1812,10 @@ index 000000000000..5dbf48a3d9b3 + surfacegen5_ssh_sysfs_unregister(&serdev->dev); + + // suspend EC and disable events -+ status = surfacegen5_ssh_ec_suspend(ec); -+ if (status) { -+ dev_err(&serdev->dev, "failed to suspend EC: %d\n", status); -+ } ++ //status = surfacegen5_ssh_ec_suspend(ec); ++ //if (status) { ++ // dev_err(&serdev->dev, "failed to suspend EC: %d\n", status); ++ //} + + // make sure all events (received up to now) have been properly handled + flush_workqueue(ec->events.queue_ack); @@ -3667,12 +3667,12 @@ index 000000000000..5dbf48a3d9b3 + .gpe_number = 0x17, +}; + -+static const struct si_lid_device lid_device_l4F = { ++static const struct si_lid_device lid_device_l57 = { + .acpi_path = "\\_SB.LID0", -+ .gpe_number = 0x4F, ++ .gpe_number = 0x57, +}; + -+static const struct si_lid_device lid_device_l57 = { ++static const struct si_lid_device lid_device_l4F = { + .acpi_path = "\\_SB.LID0", + .gpe_number = 0x57, +}; diff --git a/patches/5.3/0002-buttons.patch b/patches/5.3/0002-buttons.patch index be44608f7..8f2d18304 100644 --- a/patches/5.3/0002-buttons.patch +++ b/patches/5.3/0002-buttons.patch @@ -1,13 +1,13 @@ -From ee93ea3b18abfd08bca1345d06cbb28e3ef2e402 Mon Sep 17 00:00:00 2001 +From 83d479932acd83ecf45941386615d8518d79f568 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Jul 2019 17:51:37 +0200 Subject: [PATCH 2/9] buttons --- drivers/input/misc/Kconfig | 6 +- - drivers/input/misc/soc_button_array.c | 105 +++++++++++++++++++--- - drivers/platform/x86/surfacepro3_button.c | 47 ++++++++++ - 3 files changed, 143 insertions(+), 15 deletions(-) + drivers/input/misc/soc_button_array.c | 112 +++++++++++++++++++--- + drivers/platform/x86/surfacepro3_button.c | 47 +++++++++ + 3 files changed, 150 insertions(+), 15 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index d07c1eb15aa6..7d9ae394e597 100644 @@ -28,7 +28,7 @@ index d07c1eb15aa6..7d9ae394e597 100644 To compile this driver as a module, choose M here: the module will be called soc_button_array. diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c -index 5e59f8e57f8e..6f0133fe1546 100644 +index 5e59f8e57f8e..ef89698c7d43 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -25,6 +25,11 @@ struct soc_button_info { @@ -43,22 +43,29 @@ index 5e59f8e57f8e..6f0133fe1546 100644 /* * Some of the buttons like volume up/down are auto repeat, while others * are not. To support both, we register two platform devices, and put -@@ -87,8 +92,13 @@ soc_button_device_create(struct platform_device *pdev, +@@ -87,8 +92,20 @@ soc_button_device_create(struct platform_device *pdev, continue; gpio = soc_button_lookup_gpio(&pdev->dev, info->acpi_index); - if (!gpio_is_valid(gpio)) -+ if (gpio < 0 && gpio != -ENOENT) { -+ error = gpio; -+ goto err_free_mem; -+ } else if (!gpio_is_valid(gpio)) { -+ /* Skip GPIO if not present */ ++ if (!gpio_is_valid(gpio)) { ++ /* ++ * Skip GPIO if not present. Note we deliberately ++ * ignore -EPROBE_DEFER errors here. On some devices ++ * Intel is using so called virtual GPIOs which are not ++ * GPIOs at all but some way for AML code to check some ++ * random status bits without need a custom opregion. ++ * In some cases the resources table we parse points to ++ * such a virtual GPIO, since these are not real GPIOs ++ * we do not have a driver for these so they will never ++ * show up, therefor we ignore -EPROBE_DEFER. ++ */ continue; + } gpio_keys[n_buttons].type = info->event_type; gpio_keys[n_buttons].code = info->event_code; -@@ -309,23 +319,26 @@ static int soc_button_remove(struct platform_device *pdev) +@@ -309,23 +326,26 @@ static int soc_button_remove(struct platform_device *pdev) static int soc_button_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -93,7 +100,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 } error = gpiod_count(dev, NULL); -@@ -357,7 +370,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -357,7 +377,7 @@ static int soc_button_probe(struct platform_device *pdev) if (!priv->children[0] && !priv->children[1]) return -ENODEV; @@ -102,7 +109,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 devm_kfree(dev, button_info); return 0; -@@ -368,7 +381,7 @@ static int soc_button_probe(struct platform_device *pdev) +@@ -368,7 +388,7 @@ static int soc_button_probe(struct platform_device *pdev) * is defined in section 2.8.7.2 of "Windows ACPI Design Guide for SoC * Platforms" */ @@ -111,7 +118,7 @@ index 5e59f8e57f8e..6f0133fe1546 100644 { "power", 0, EV_KEY, KEY_POWER, false, true }, { "home", 1, EV_KEY, KEY_LEFTMETA, false, true }, { "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false }, -@@ -377,9 +390,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { +@@ -377,9 +397,77 @@ static struct soc_button_info soc_button_PNP0C40[] = { { } }; diff --git a/patches/5.3/0003-surfacebook2-dgpu.patch b/patches/5.3/0003-surfacebook2-dgpu.patch index a8e8db2e5..d5b23dab5 100644 --- a/patches/5.3/0003-surfacebook2-dgpu.patch +++ b/patches/5.3/0003-surfacebook2-dgpu.patch @@ -1,7 +1,7 @@ -From 9bcf352058db70b14d90816398867dca3bf516e3 Mon Sep 17 00:00:00 2001 +From 1f8ca45b0f8650219a98d05f14ccf98c33967ba7 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 2 Jul 2019 22:17:46 +0200 -Subject: [PATCH 3/9] surfacebook2 dgpu +Subject: [PATCH 3/9] surfacebook2-dgpu --- drivers/platform/x86/Kconfig | 9 + diff --git a/patches/5.3/0004-hid.patch b/patches/5.3/0004-hid.patch index 98f32fd78..b216612c3 100644 --- a/patches/5.3/0004-hid.patch +++ b/patches/5.3/0004-hid.patch @@ -1,5 +1,5 @@ -From f6f6be7bd81ba183a7394be360bca24a3dfb0496 Mon Sep 17 00:00:00 2001 -From: qzed +From ea18400e859c6d7656b81e5d33314046743d34a1 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz Date: Tue, 17 Sep 2019 17:16:23 +0200 Subject: [PATCH 4/9] hid diff --git a/patches/5.3/0005-surface3-power.patch b/patches/5.3/0005-surface3-power.patch index a12de150d..850f0edef 100644 --- a/patches/5.3/0005-surface3-power.patch +++ b/patches/5.3/0005-surface3-power.patch @@ -1,7 +1,7 @@ -From 02cfa881044c1ad2779c493b24b128411904ede1 Mon Sep 17 00:00:00 2001 -From: qzed +From a39f413e5460c0d1fb901872518a33038b9d463c Mon Sep 17 00:00:00 2001 +From: Maximilian Luz Date: Tue, 17 Sep 2019 17:17:56 +0200 -Subject: [PATCH 5/9] surface3 power +Subject: [PATCH 5/9] surface3-power --- drivers/platform/x86/Kconfig | 7 + diff --git a/patches/5.3/0006-surface-lte.patch b/patches/5.3/0006-surface-lte.patch index 0708248b4..19d0cb853 100644 --- a/patches/5.3/0006-surface-lte.patch +++ b/patches/5.3/0006-surface-lte.patch @@ -1,7 +1,7 @@ -From 15c9a6f59543bb4d55cbae7e0734122e81a4a115 Mon Sep 17 00:00:00 2001 -From: qzed +From 83e53749458cab7575105ddbae13f750a4cc09e4 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz Date: Tue, 17 Sep 2019 17:21:43 +0200 -Subject: [PATCH 6/9] surface lte +Subject: [PATCH 6/9] surface-lte --- drivers/usb/serial/qcserial.c | 1 + diff --git a/patches/5.3/0007-wifi.patch b/patches/5.3/0007-wifi.patch index 333a2ad7f..b8e71bdd1 100644 --- a/patches/5.3/0007-wifi.patch +++ b/patches/5.3/0007-wifi.patch @@ -1,5 +1,5 @@ -From d74cf106de188669286d18943bdfb86538aae0eb Mon Sep 17 00:00:00 2001 -From: qzed +From 829c222814c0617dad16d036876f94c725d2d638 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz Date: Wed, 18 Sep 2019 03:18:25 +0200 Subject: [PATCH 7/9] wifi diff --git a/patches/5.3/0008-use-legacy-i915-driver.patch b/patches/5.3/0008-legacy-i915.patch similarity index 99% rename from patches/5.3/0008-use-legacy-i915-driver.patch rename to patches/5.3/0008-legacy-i915.patch index fdf77f818..448fd4ee6 100644 --- a/patches/5.3/0008-use-legacy-i915-driver.patch +++ b/patches/5.3/0008-legacy-i915.patch @@ -1,7 +1,7 @@ -From a1e520b7f0e94ca4a0365c6fcf9cfb31b57149ac Mon Sep 17 00:00:00 2001 -From: Dorian Stoll +From 05296f2e99a9f6c9ef6fa47e7c879c73b07c7322 Mon Sep 17 00:00:00 2001 +From: Maximilian Luz Date: Mon, 16 Sep 2019 04:10:51 +0200 -Subject: [PATCH 8/9] use legacy i915 driver +Subject: [PATCH 8/9] legacy-i915 --- drivers/gpu/drm/Kconfig | 2 +- @@ -133,7 +133,7 @@ Subject: [PATCH 8/9] use legacy i915 driver drivers/gpu/drm/i915_legacy/i915_oa_sklgt4.c | 90 + drivers/gpu/drm/i915_legacy/i915_oa_sklgt4.h | 15 + drivers/gpu/drm/i915_legacy/i915_params.c | 237 + - drivers/gpu/drm/i915_legacy/i915_params.h | 93 + + drivers/gpu/drm/i915_legacy/i915_params.h | 94 + drivers/gpu/drm/i915_legacy/i915_pci.c | 957 + drivers/gpu/drm/i915_legacy/i915_perf.c | 3519 ++++ drivers/gpu/drm/i915_legacy/i915_pmu.c | 1096 + @@ -362,7 +362,7 @@ Subject: [PATCH 8/9] use legacy i915 driver .../drm/i915_legacy/selftests/scatterlist.c | 379 + drivers/gpu/drm/i915_legacy/vlv_dsi.c | 1830 ++ drivers/gpu/drm/i915_legacy/vlv_dsi_pll.c | 567 + - 358 files changed, 244184 insertions(+), 2 deletions(-) + 358 files changed, 244185 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/i915_legacy/.gitignore create mode 100644 drivers/gpu/drm/i915_legacy/Kconfig create mode 100644 drivers/gpu/drm/i915_legacy/Kconfig.debug @@ -4934,7 +4934,7 @@ index 000000000000..19cf1bbe059d +} diff --git a/drivers/gpu/drm/i915_legacy/gvt/cmd_parser.c b/drivers/gpu/drm/i915_legacy/gvt/cmd_parser.c new file mode 100644 -index 000000000000..54abe249861d +index 000000000000..de5347725564 --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/gvt/cmd_parser.c @@ -0,0 +1,2998 @@ @@ -5186,16 +5186,16 @@ index 000000000000..54abe249861d +#define OP_3DSTATE_BINDING_TABLE_EDIT_DS OP_3D_MEDIA(0x3, 0x0, 0x46) /* HSW+ */ +#define OP_3DSTATE_BINDING_TABLE_EDIT_PS OP_3D_MEDIA(0x3, 0x0, 0x47) /* HSW+ */ + -+#define OP_3DSTATE_VF_INSTANCING OP_3D_MEDIA(0x3, 0x0, 0x49) /* BDW+ */ -+#define OP_3DSTATE_VF_SGVS OP_3D_MEDIA(0x3, 0x0, 0x4A) /* BDW+ */ -+#define OP_3DSTATE_VF_TOPOLOGY OP_3D_MEDIA(0x3, 0x0, 0x4B) /* BDW+ */ -+#define OP_3DSTATE_WM_CHROMAKEY OP_3D_MEDIA(0x3, 0x0, 0x4C) /* BDW+ */ -+#define OP_3DSTATE_PS_BLEND OP_3D_MEDIA(0x3, 0x0, 0x4D) /* BDW+ */ -+#define OP_3DSTATE_WM_DEPTH_STENCIL OP_3D_MEDIA(0x3, 0x0, 0x4E) /* BDW+ */ -+#define OP_3DSTATE_PS_EXTRA OP_3D_MEDIA(0x3, 0x0, 0x4F) /* BDW+ */ -+#define OP_3DSTATE_RASTER OP_3D_MEDIA(0x3, 0x0, 0x50) /* BDW+ */ -+#define OP_3DSTATE_SBE_SWIZ OP_3D_MEDIA(0x3, 0x0, 0x51) /* BDW+ */ -+#define OP_3DSTATE_WM_HZ_OP OP_3D_MEDIA(0x3, 0x0, 0x52) /* BDW+ */ ++#define OP_3DSTATE_VF_INSTANCING OP_3D_MEDIA(0x3, 0x0, 0x49) /* BDW+ */ ++#define OP_3DSTATE_VF_SGVS OP_3D_MEDIA(0x3, 0x0, 0x4A) /* BDW+ */ ++#define OP_3DSTATE_VF_TOPOLOGY OP_3D_MEDIA(0x3, 0x0, 0x4B) /* BDW+ */ ++#define OP_3DSTATE_WM_CHROMAKEY OP_3D_MEDIA(0x3, 0x0, 0x4C) /* BDW+ */ ++#define OP_3DSTATE_PS_BLEND OP_3D_MEDIA(0x3, 0x0, 0x4D) /* BDW+ */ ++#define OP_3DSTATE_WM_DEPTH_STENCIL OP_3D_MEDIA(0x3, 0x0, 0x4E) /* BDW+ */ ++#define OP_3DSTATE_PS_EXTRA OP_3D_MEDIA(0x3, 0x0, 0x4F) /* BDW+ */ ++#define OP_3DSTATE_RASTER OP_3D_MEDIA(0x3, 0x0, 0x50) /* BDW+ */ ++#define OP_3DSTATE_SBE_SWIZ OP_3D_MEDIA(0x3, 0x0, 0x51) /* BDW+ */ ++#define OP_3DSTATE_WM_HZ_OP OP_3D_MEDIA(0x3, 0x0, 0x52) /* BDW+ */ +#define OP_3DSTATE_COMPONENT_PACKING OP_3D_MEDIA(0x3, 0x0, 0x55) /* SKL+ */ + +#define OP_3DSTATE_DRAWING_RECTANGLE OP_3D_MEDIA(0x3, 0x1, 0x00) @@ -39236,7 +39236,7 @@ index 000000000000..d485d49c473b +#endif diff --git a/drivers/gpu/drm/i915_legacy/i915_drv.h b/drivers/gpu/drm/i915_legacy/i915_drv.h new file mode 100644 -index 000000000000..bf555493e85d +index 000000000000..066fd2a12851 --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/i915_drv.h @@ -0,0 +1,3693 @@ @@ -41810,7 +41810,7 @@ index 000000000000..bf555493e85d +#define SUPPORTS_TV(dev_priv) (INTEL_INFO(dev_priv)->display.supports_tv) +#define I915_HAS_HOTPLUG(dev_priv) (INTEL_INFO(dev_priv)->display.has_hotplug) + -+#define HAS_FW_BLC(dev_priv) (INTEL_GEN(dev_priv) > 2) ++#define HAS_FW_BLC(dev_priv) (INTEL_GEN(dev_priv) > 2) +#define HAS_FBC(dev_priv) (INTEL_INFO(dev_priv)->display.has_fbc) +#define HAS_CUR_FBC(dev_priv) (!HAS_GMCH(dev_priv) && INTEL_GEN(dev_priv) >= 7) + @@ -73683,10 +73683,10 @@ index 000000000000..b5be0abbba35 +} diff --git a/drivers/gpu/drm/i915_legacy/i915_params.h b/drivers/gpu/drm/i915_legacy/i915_params.h new file mode 100644 -index 000000000000..8e0d003ff419 +index 000000000000..3f14e9881a0d --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/i915_params.h -@@ -0,0 +1,93 @@ +@@ -0,0 +1,94 @@ +/* + * Copyright © 2015 Intel Corporation + * @@ -73780,6 +73780,7 @@ index 000000000000..8e0d003ff419 +void i915_params_free(struct i915_params *params); + +#endif ++ diff --git a/drivers/gpu/drm/i915_legacy/i915_pci.c b/drivers/gpu/drm/i915_legacy/i915_pci.c new file mode 100644 index 000000000000..f893c2cbce15 @@ -79847,7 +79848,7 @@ index 000000000000..31dcef181f63 +#endif diff --git a/drivers/gpu/drm/i915_legacy/i915_reg.h b/drivers/gpu/drm/i915_legacy/i915_reg.h new file mode 100644 -index 000000000000..eeebefcc34a8 +index 000000000000..cf748b80e640 --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/i915_reg.h @@ -0,0 +1,11424 @@ @@ -87570,7 +87571,7 @@ index 000000000000..eeebefcc34a8 +#define _PIPEC_CHICKEN 0x72038 +#define PIPE_CHICKEN(pipe) _MMIO_PIPE(pipe, _PIPEA_CHICKEN,\ + _PIPEB_CHICKEN) -+#define PIXEL_ROUNDING_TRUNC_FB_PASSTHRU (1 << 15) ++#define PIXEL_ROUNDING_TRUNC_FB_PASSTHRU (1 << 15) +#define PER_PIXEL_ALPHA_BYPASS_EN (1 << 7) + +/* PCH */ @@ -138004,7 +138005,7 @@ index 000000000000..2220588e86ac +#endif diff --git a/drivers/gpu/drm/i915_legacy/intel_dp.c b/drivers/gpu/drm/i915_legacy/intel_dp.c new file mode 100644 -index 000000000000..b3b2805014ce +index 000000000000..560274d1c50b --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/intel_dp.c @@ -0,0 +1,7405 @@ @@ -140234,10 +140235,10 @@ index 000000000000..b3b2805014ce + /* + * There are four kinds of DP registers: + * -+ * IBX PCH -+ * SNB CPU ++ * IBX PCH ++ * SNB CPU + * IVB CPU -+ * CPT PCH ++ * CPT PCH + * + * IBX PCH and CPU are the same for almost everything, + * except that the CPU DP PLL is configured in this @@ -140302,7 +140303,7 @@ index 000000000000..b3b2805014ce +} + +#define IDLE_ON_MASK (PP_ON | PP_SEQUENCE_MASK | 0 | PP_SEQUENCE_STATE_MASK) -+#define IDLE_ON_VALUE (PP_ON | PP_SEQUENCE_NONE | 0 | PP_SEQUENCE_STATE_ON_IDLE) ++#define IDLE_ON_VALUE (PP_ON | PP_SEQUENCE_NONE | 0 | PP_SEQUENCE_STATE_ON_IDLE) + +#define IDLE_OFF_MASK (PP_ON | PP_SEQUENCE_MASK | 0 | 0) +#define IDLE_OFF_VALUE (0 | PP_SEQUENCE_NONE | 0 | 0) @@ -218151,7 +218152,7 @@ index 000000000000..0e3bd580e267 +#endif diff --git a/drivers/gpu/drm/i915_legacy/intel_uncore.c b/drivers/gpu/drm/i915_legacy/intel_uncore.c new file mode 100644 -index 000000000000..6c9a1e506122 +index 000000000000..d1d51e1121e2 --- /dev/null +++ b/drivers/gpu/drm/i915_legacy/intel_uncore.c @@ -0,0 +1,1958 @@ @@ -220077,7 +220078,7 @@ index 000000000000..6c9a1e506122 + +/** + * intel_uncore_forcewake_for_reg - which forcewake domains are needed to access -+ * a register ++ * a register + * @uncore: pointer to struct intel_uncore + * @reg: register in question + * @op: operation bitmask of FW_REG_READ and/or FW_REG_WRITE diff --git a/patches/5.3/0009-ipts.patch b/patches/5.3/0009-ipts.patch index 58495a42d..187c333c4 100644 --- a/patches/5.3/0009-ipts.patch +++ b/patches/5.3/0009-ipts.patch @@ -1,4 +1,4 @@ -From 35bb10933585c0a23cec451cd87b466e53121e77 Mon Sep 17 00:00:00 2001 +From 3def8f788efa2bfd7f541d9282b2353bdbbecf48 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Wed, 18 Sep 2019 13:04:18 +0200 Subject: [PATCH 9/9] ipts @@ -26,7 +26,7 @@ Subject: [PATCH 9/9] ipts drivers/misc/ipts/Makefile | 17 + drivers/misc/ipts/companion/Kconfig | 9 + drivers/misc/ipts/companion/Makefile | 1 + - drivers/misc/ipts/companion/ipts-surface.c | 82 ++ + drivers/misc/ipts/companion/ipts-surface.c | 100 ++ drivers/misc/ipts/ipts-binary-spec.h | 118 ++ drivers/misc/ipts/ipts-dbgfs.c | 291 +++++ drivers/misc/ipts/ipts-fw.c | 113 ++ @@ -52,7 +52,7 @@ Subject: [PATCH 9/9] ipts drivers/misc/mei/pci-me.c | 1 + include/linux/intel_ipts_fw.h | 14 + include/linux/intel_ipts_if.h | 76 ++ - 48 files changed, 6008 insertions(+), 21 deletions(-) + 48 files changed, 6026 insertions(+), 21 deletions(-) create mode 100644 drivers/gpu/drm/i915_legacy/intel_ipts.c create mode 100644 drivers/gpu/drm/i915_legacy/intel_ipts.h create mode 100644 drivers/misc/ipts/Kconfig @@ -219,7 +219,7 @@ index d485d49c473b..adb7af18dc2b 100644 /* diff --git a/drivers/gpu/drm/i915_legacy/i915_drv.h b/drivers/gpu/drm/i915_legacy/i915_drv.h -index bf555493e85d..d48133d459d2 100644 +index 066fd2a12851..2a872d8725b5 100644 --- a/drivers/gpu/drm/i915_legacy/i915_drv.h +++ b/drivers/gpu/drm/i915_legacy/i915_drv.h @@ -3184,6 +3184,9 @@ void i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj, @@ -304,7 +304,7 @@ index b5be0abbba35..831f2bcae687 100644 i915_param_named(guc_log_level, int, 0400, "GuC firmware logging level. Requires GuC to be loaded. " diff --git a/drivers/gpu/drm/i915_legacy/i915_params.h b/drivers/gpu/drm/i915_legacy/i915_params.h -index 8e0d003ff419..2f96df4c9d1c 100644 +index 3f14e9881a0d..e314a2414041 100644 --- a/drivers/gpu/drm/i915_legacy/i915_params.h +++ b/drivers/gpu/drm/i915_legacy/i915_params.h @@ -54,7 +54,7 @@ struct drm_printer; @@ -1310,14 +1310,14 @@ index abd8ae249746..40c8683b4ce6 100644 obj-$(CONFIG_SRAM) += sram.o diff --git a/drivers/misc/ipts/Kconfig b/drivers/misc/ipts/Kconfig new file mode 100644 -index 000000000000..a24c4daaed42 +index 000000000000..992a51061b38 --- /dev/null +++ b/drivers/misc/ipts/Kconfig @@ -0,0 +1,11 @@ +config INTEL_IPTS + tristate "Intel Precise Touch & Stylus" + select INTEL_MEI -+ depends on X86 && PCI && HID ++ depends on X86 && PCI && HID && DRM_I915 + help + Intel Precise Touch & Stylus support + Supported SoCs: @@ -1372,10 +1372,10 @@ index 000000000000..fb4d58935f01 +obj-$(CONFIG_INTEL_IPTS_SURFACE)+= ipts-surface.o diff --git a/drivers/misc/ipts/companion/ipts-surface.c b/drivers/misc/ipts/companion/ipts-surface.c new file mode 100644 -index 000000000000..4d6116dfa728 +index 000000000000..6f5aabb14e5a --- /dev/null +++ b/drivers/misc/ipts/companion/ipts-surface.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,100 @@ +#include +#include +#include @@ -1385,6 +1385,24 @@ index 000000000000..4d6116dfa728 + +#define IPTS_SURFACE_FW_PATH_FMT "intel/ipts/%s/%s" + ++#define __IPTS_SURFACE_FIRMWARE(X, Y) \ ++ MODULE_FIRMWARE("intel/ipts/" X "/" Y) ++ ++#define IPTS_SURFACE_FIRMWARE(X) \ ++ __IPTS_SURFACE_FIRMWARE(X, "config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "intel_fw_config.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_desc.bin"); \ ++ __IPTS_SURFACE_FIRMWARE(X, "vendor_kernel.bin") ++ ++IPTS_SURFACE_FIRMWARE("MSHW0076"); ++IPTS_SURFACE_FIRMWARE("MSHW0078"); ++IPTS_SURFACE_FIRMWARE("MSHW0079"); ++IPTS_SURFACE_FIRMWARE("MSHW0101"); ++IPTS_SURFACE_FIRMWARE("MSHW0102"); ++IPTS_SURFACE_FIRMWARE("MSHW0103"); ++IPTS_SURFACE_FIRMWARE("MSHW0137"); ++ +int ipts_surface_request_firmware(const struct firmware **fw, const char *name, + struct device *device, void *data) +{