Skip to content

Commit cf887d8

Browse files
committed
IPTS: Add device link for PM
1 parent 9cf5636 commit cf887d8

12 files changed

Lines changed: 64 additions & 58 deletions

‎patches/5.2/0001-surface-acpi.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 64f3368a6822e2b9d031b6c372316b7e92206a23 Mon Sep 17 00:00:00 2001
1+
From 6e3f7064ceb76ee5d28ae13ff82a5389ab1dae41 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:10:38 +0200
3+
Date: Fri, 26 Jul 2019 04:44:14 +0200
44
Subject: [PATCH 01/12] surface-acpi
55

66
---

‎patches/5.2/0002-suspend.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 2291bc5ea806399d9c649bb8a889400ce8672ec3 Mon Sep 17 00:00:00 2001
1+
From 650da81322f891cb9606f38e8613992f2013a9cd Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:02 +0200
3+
Date: Fri, 26 Jul 2019 04:44:56 +0200
44
Subject: [PATCH 02/12] suspend
55

66
---

‎patches/5.2/0003-buttons.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From ca1590dfcd342f0f1fb0a2fd4b262d067d2fd1fd Mon Sep 17 00:00:00 2001
1+
From 4aeededdff17f504089c636a70133881becdad5a Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:17 +0200
3+
Date: Fri, 26 Jul 2019 04:45:10 +0200
44
Subject: [PATCH 03/12] buttons
55

66
---

‎patches/5.2/0004-cameras.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 6a9467f92c3ea31879bb760a43dc950150641e5e Mon Sep 17 00:00:00 2001
1+
From 322870ba12ce3a20155d4d445b43094f90836dd8 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:26 +0200
3+
Date: Fri, 26 Jul 2019 04:45:19 +0200
44
Subject: [PATCH 04/12] cameras
55

66
---

‎patches/5.2/0005-ipts.patch‎

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From ccfb3ab207379ed7efafbb0f58298620a875b3f8 Mon Sep 17 00:00:00 2001
1+
From 3d53d1dd3d6d79a795c58006eeda264bbba28140 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:35 +0200
3+
Date: Fri, 26 Jul 2019 04:45:32 +0200
44
Subject: [PATCH 05/12] ipts
55

66
---
@@ -15,7 +15,7 @@ Subject: [PATCH 05/12] ipts
1515
drivers/gpu/drm/i915/intel_guc.h | 1 +
1616
drivers/gpu/drm/i915/intel_guc_submission.c | 89 +-
1717
drivers/gpu/drm/i915/intel_guc_submission.h | 4 +
18-
drivers/gpu/drm/i915/intel_ipts.c | 657 ++++++++++++
18+
drivers/gpu/drm/i915/intel_ipts.c | 661 ++++++++++++
1919
drivers/gpu/drm/i915/intel_ipts.h | 36 +
2020
drivers/gpu/drm/i915/intel_lrc.c | 15 +-
2121
drivers/gpu/drm/i915/intel_lrc.h | 6 +
@@ -27,7 +27,7 @@ Subject: [PATCH 05/12] ipts
2727
drivers/misc/ipts/Makefile | 13 +
2828
drivers/misc/ipts/ipts-binary-spec.h | 118 +++
2929
drivers/misc/ipts/ipts-dbgfs.c | 152 +++
30-
drivers/misc/ipts/ipts-gfx.c | 184 ++++
30+
drivers/misc/ipts/ipts-gfx.c | 185 ++++
3131
drivers/misc/ipts/ipts-gfx.h | 24 +
3232
drivers/misc/ipts/ipts-hid.c | 456 ++++++++
3333
drivers/misc/ipts/ipts-hid.h | 34 +
@@ -44,8 +44,8 @@ Subject: [PATCH 05/12] ipts
4444
drivers/misc/ipts/ipts.h | 200 ++++
4545
drivers/misc/mei/hw-me-regs.h | 1 +
4646
drivers/misc/mei/pci-me.c | 1 +
47-
include/linux/intel_ipts_if.h | 75 ++
48-
41 files changed, 5578 insertions(+), 25 deletions(-)
47+
include/linux/intel_ipts_if.h | 76 ++
48+
41 files changed, 5584 insertions(+), 25 deletions(-)
4949
create mode 100644 drivers/gpu/drm/i915/intel_ipts.c
5050
create mode 100644 drivers/gpu/drm/i915/intel_ipts.h
5151
create mode 100644 drivers/misc/ipts/Kconfig
@@ -418,10 +418,10 @@ index aa5e6749c925..c9e5c14e7f67 100644
418418
#endif
419419
diff --git a/drivers/gpu/drm/i915/intel_ipts.c b/drivers/gpu/drm/i915/intel_ipts.c
420420
new file mode 100644
421-
index 000000000000..efc9607f6f73
421+
index 000000000000..5d9145ac221c
422422
--- /dev/null
423423
+++ b/drivers/gpu/drm/i915/intel_ipts.c
424-
@@ -0,0 +1,657 @@
424+
@@ -0,0 +1,661 @@
425425
+/*
426426
+ * Copyright 2016 Intel Corporation
427427
+ *
@@ -920,32 +920,36 @@ index 000000000000..efc9607f6f73
920920
+
921921
+int intel_ipts_connect(intel_ipts_connect_t *ipts_connect)
922922
+{
923+
+ u32 flags = DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_CONSUMER;
923924
+ struct drm_i915_private *dev_priv = to_i915(intel_ipts.dev);
924-
+ int ret = 0;
925925
+
926926
+ if (!intel_ipts.initialized)
927927
+ return -EIO;
928928
+
929-
+ if (ipts_connect && ipts_connect->if_version <=
930-
+ SUPPORTED_IPTS_INTERFACE_VERSION) {
929+
+ if (!ipts_connect)
930+
+ return -EINVAL;
931931
+
932-
+ /* return gpu operations for ipts */
933-
+ ipts_connect->ipts_ops.get_wq_info = intel_ipts_get_wq_info;
934-
+ ipts_connect->ipts_ops.map_buffer = intel_ipts_map_buffer;
935-
+ ipts_connect->ipts_ops.unmap_buffer = intel_ipts_unmap_buffer;
936-
+ ipts_connect->gfx_version = INTEL_INFO(dev_priv)->gen;
937-
+ ipts_connect->gfx_handle = (uint64_t)&intel_ipts;
932+
+ if (ipts_connect->if_version > SUPPORTED_IPTS_INTERFACE_VERSION)
933+
+ return -EINVAL;
938934
+
939-
+ /* save callback and data */
940-
+ intel_ipts.data = ipts_connect->data;
941-
+ intel_ipts.ipts_clbks = ipts_connect->ipts_cb;
935+
+ /* set up device-link for PM */
936+
+ if (!device_link_add(ipts_connect->client, intel_ipts.dev->dev, flags))
937+
+ return -EFAULT;
942938
+
943-
+ intel_ipts.connected = true;
944-
+ } else {
945-
+ ret = -EINVAL;
946-
+ }
939+
+ /* return gpu operations for ipts */
940+
+ ipts_connect->ipts_ops.get_wq_info = intel_ipts_get_wq_info;
941+
+ ipts_connect->ipts_ops.map_buffer = intel_ipts_map_buffer;
942+
+ ipts_connect->ipts_ops.unmap_buffer = intel_ipts_unmap_buffer;
943+
+ ipts_connect->gfx_version = INTEL_INFO(dev_priv)->gen;
944+
+ ipts_connect->gfx_handle = (uint64_t)&intel_ipts;
947945
+
948-
+ return ret;
946+
+ /* save callback and data */
947+
+ intel_ipts.data = ipts_connect->data;
948+
+ intel_ipts.ipts_clbks = ipts_connect->ipts_cb;
949+
+
950+
+ intel_ipts.connected = true;
951+
+
952+
+ return 0;
949953
+}
950954
+EXPORT_SYMBOL_GPL(intel_ipts_connect);
951955
+
@@ -1225,7 +1229,7 @@ index 4ab4ce6569e7..2d3c523ba5c7 100644
12251229

12261230
static void pch_enable_backlight(const struct intel_crtc_state *crtc_state,
12271231
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
1228-
index 42bb635895cf..3a362f107188 100644
1232+
index b603c14d043b..03448d3a29f2 100644
12291233
--- a/drivers/hid/hid-multitouch.c
12301234
+++ b/drivers/hid/hid-multitouch.c
12311235
@@ -169,6 +169,7 @@ struct mt_device {
@@ -1642,10 +1646,10 @@ index 000000000000..1c5c92f7d4ba
16421646
+}
16431647
diff --git a/drivers/misc/ipts/ipts-gfx.c b/drivers/misc/ipts/ipts-gfx.c
16441648
new file mode 100644
1645-
index 000000000000..51727770e75d
1649+
index 000000000000..4989a22227d2
16461650
--- /dev/null
16471651
+++ b/drivers/misc/ipts/ipts-gfx.c
1648-
@@ -0,0 +1,184 @@
1652+
@@ -0,0 +1,185 @@
16491653
+/*
16501654
+ *
16511655
+ * Intel Integrated Touch Gfx Interface Layer
@@ -1694,6 +1698,7 @@ index 000000000000..51727770e75d
16941698
+ int ret = 0;
16951699
+ intel_ipts_connect_t ipts_connect;
16961700
+
1701+
+ ipts_connect.client = ipts->cldev->dev.parent;
16971702
+ ipts_connect.if_version = IPTS_INTERFACE_V1;
16981703
+ ipts_connect.ipts_cb.workload_complete = gfx_processing_complete;
16991704
+ ipts_connect.ipts_cb.notify_gfx_status = notify_gfx_status;
@@ -6099,10 +6104,10 @@ index 7a2b3545a7f9..c3c684cbd17d 100644
60996104
{MEI_PCI_DEVICE(MEI_DEV_ID_LBG, MEI_ME_PCH12_CFG)},
61006105
diff --git a/include/linux/intel_ipts_if.h b/include/linux/intel_ipts_if.h
61016106
new file mode 100644
6102-
index 000000000000..f329bbfb8079
6107+
index 000000000000..bad44fb4f233
61036108
--- /dev/null
61046109
+++ b/include/linux/intel_ipts_if.h
6105-
@@ -0,0 +1,75 @@
6110+
@@ -0,0 +1,76 @@
61066111
+/*
61076112
+ *
61086113
+ * GFX interface to support Intel Precise Touch & Stylus
@@ -6165,6 +6170,7 @@ index 000000000000..f329bbfb8079
61656170
+} intel_ipts_callback_t;
61666171
+
61676172
+typedef struct intel_ipts_connect {
6173+
+ struct device *client; /* input : client device for PM setup */
61686174
+ intel_ipts_callback_t ipts_cb; /* input : callback addresses */
61696175
+ void *data; /* input : callback data */
61706176
+ u32 if_version; /* input : interface version */

‎patches/5.2/0006-hid.patch‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 6b9b606e885ed534940baeba0b64122895c53c3d Mon Sep 17 00:00:00 2001
1+
From 4f231b25dd91f0149b9d4be3190165daa7e5ec38 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:44 +0200
3+
Date: Fri, 26 Jul 2019 04:45:42 +0200
44
Subject: [PATCH 06/12] hid
55

66
---
@@ -11,10 +11,10 @@ Subject: [PATCH 06/12] hid
1111
4 files changed, 86 insertions(+), 6 deletions(-)
1212

1313
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
14-
index b1636ce22060..676175ffe613 100644
14+
index bfc584ada4eb..c54a2af1a266 100644
1515
--- a/drivers/hid/hid-ids.h
1616
+++ b/drivers/hid/hid-ids.h
17-
@@ -819,11 +819,22 @@
17+
@@ -821,11 +821,22 @@
1818
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1 0x0732
1919
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_600 0x0750
2020
#define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c
@@ -57,10 +57,10 @@ index 8b3a922bdad3..0290a16881e5 100644
5757
.driver_data = MS_PRESENTER },
5858
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x091B),
5959
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
60-
index 3a362f107188..1acf6c25dfb9 100644
60+
index 03448d3a29f2..09ca4b1f2797 100644
6161
--- a/drivers/hid/hid-multitouch.c
6262
+++ b/drivers/hid/hid-multitouch.c
63-
@@ -1987,6 +1987,63 @@ static const struct hid_device_id mt_devices[] = {
63+
@@ -1983,6 +1983,63 @@ static const struct hid_device_id mt_devices[] = {
6464
HID_USB_DEVICE(USB_VENDOR_ID_LG,
6565
USB_DEVICE_ID_LG_MELFAS_MT) },
6666

@@ -125,10 +125,10 @@ index 3a362f107188..1acf6c25dfb9 100644
125125
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
126126
MT_USB_DEVICE(USB_VENDOR_ID_ASUS,
127127
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
128-
index 74c0ad21b267..dfe97c2a8278 100644
128+
index 1549c7a2f04c..c17a3c8da927 100644
129129
--- a/drivers/hid/hid-quirks.c
130130
+++ b/drivers/hid/hid-quirks.c
131-
@@ -114,6 +114,17 @@ static const struct hid_device_id hid_quirks[] = {
131+
@@ -111,6 +111,17 @@ static const struct hid_device_id hid_quirks[] = {
132132
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2), HID_QUIRK_NO_INIT_REPORTS },
133133
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), HID_QUIRK_NO_INIT_REPORTS },
134134
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), HID_QUIRK_NO_INIT_REPORTS },

‎patches/5.2/0007-sdcard-reader.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From ce4d18ba4bd76b7146e77a3dd147bffc73ef210e Mon Sep 17 00:00:00 2001
1+
From 21a06ab8a4fc314c83b91d492d90a90ef3d191e6 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:11:54 +0200
3+
Date: Fri, 26 Jul 2019 04:45:55 +0200
44
Subject: [PATCH 07/12] sdcard-reader
55

66
---

‎patches/5.2/0008-wifi.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 95fbe06a2530048e1f2f75a60299f3a3828606cb Mon Sep 17 00:00:00 2001
1+
From 9635d33d102e805a329b53fa169cd2cb6cf26b4c Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:12:05 +0200
3+
Date: Fri, 26 Jul 2019 04:46:16 +0200
44
Subject: [PATCH 08/12] wifi
55

66
---

‎patches/5.2/0009-surface3-power.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 6e04e0f2688b530aa942bd4a0041b267ffc483b2 Mon Sep 17 00:00:00 2001
1+
From f8ecd1e208e1e35d600575f5ea289a5c99ee9826 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:12:17 +0200
3+
Date: Fri, 26 Jul 2019 04:46:48 +0200
44
Subject: [PATCH 09/12] surface3-power
55

66
---

‎patches/5.2/0010-mwlwifi.patch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 9b956e130606d5c0e5e22b2b56028a9c106f83ce Mon Sep 17 00:00:00 2001
1+
From 3a34928359985f56d92bc287a45b9d23bddcbb89 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
3-
Date: Fri, 26 Jul 2019 04:12:32 +0200
3+
Date: Fri, 26 Jul 2019 04:47:02 +0200
44
Subject: [PATCH 10/12] mwlwifi
55

66
---

0 commit comments

Comments
 (0)