Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f52dae4

Browse files
committed
IPTS: Do not call intel_ipts_cleanup on suspend
Revert a3a3ed3: "updating 4.19 patches to fix touch and suspend". Calling intel_ipts_cleanup during suspend causes destroy_doorbell to fail. Furthermore, removing intel_ipts_cleanup from suspend does not seem to cause any issues on the Surface Book 1 and 2, and the introduction of the device link in the previous commit may have fixed some of the edge-cases/race conditions that may have made this call necessary in the past. If any issue arises from this, we will deal with it later in a more subtle way. See jakeday/linux-surface#544 for an exhaustive discussion on this.
1 parent cf887d8 commit f52dae4

File tree

8 files changed

+17
-49
lines changed

8 files changed

+17
-49
lines changed

patches/5.2/0005-ipts.patch

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

66
---
77
drivers/gpu/drm/i915/Makefile | 3 +
8-
drivers/gpu/drm/i915/i915_drv.c | 13 +
8+
drivers/gpu/drm/i915/i915_drv.c | 7 +
99
drivers/gpu/drm/i915/i915_drv.h | 3 +
1010
drivers/gpu/drm/i915/i915_gem_context.c | 12 +
1111
drivers/gpu/drm/i915/i915_irq.c | 7 +-
@@ -15,8 +15,8 @@ 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 | 661 ++++++++++++
19-
drivers/gpu/drm/i915/intel_ipts.h | 36 +
18+
drivers/gpu/drm/i915/intel_ipts.c | 651 ++++++++++++
19+
drivers/gpu/drm/i915/intel_ipts.h | 34 +
2020
drivers/gpu/drm/i915/intel_lrc.c | 15 +-
2121
drivers/gpu/drm/i915/intel_lrc.h | 6 +
2222
drivers/gpu/drm/i915/intel_panel.c | 7 +
@@ -45,7 +45,7 @@ Subject: [PATCH 05/12] ipts
4545
drivers/misc/mei/hw-me-regs.h | 1 +
4646
drivers/misc/mei/pci-me.c | 1 +
4747
include/linux/intel_ipts_if.h | 76 ++
48-
41 files changed, 5584 insertions(+), 25 deletions(-)
48+
41 files changed, 5566 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
@@ -84,7 +84,7 @@ index fbcb0904f4a8..1a273956b41c 100644
8484
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
8585
i915-$(CONFIG_DRM_I915_SELFTEST) += \
8686
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
87-
index 1ad88e6d7c04..f3a175bfe499 100644
87+
index 1ad88e6d7c04..b50823fd30fb 100644
8888
--- a/drivers/gpu/drm/i915/i915_drv.c
8989
+++ b/drivers/gpu/drm/i915/i915_drv.c
9090
@@ -63,6 +63,7 @@
@@ -115,26 +115,6 @@ index 1ad88e6d7c04..f3a175bfe499 100644
115115
i915_driver_unregister(dev_priv);
116116

117117
/*
118-
@@ -2050,6 +2057,9 @@ static int i915_drm_suspend(struct drm_device *dev)
119-
struct pci_dev *pdev = dev_priv->drm.pdev;
120-
pci_power_t opregion_target_state;
121-
122-
+ if (INTEL_GEN(dev_priv) >= 9 && i915_modparams.enable_guc && i915_modparams.enable_ipts)
123-
+ intel_ipts_suspend(dev);
124-
+
125-
disable_rpm_wakeref_asserts(dev_priv);
126-
127-
/* We do a lot of poking in a lot of registers, make sure they work
128-
@@ -2246,6 +2256,9 @@ static int i915_drm_resume(struct drm_device *dev)
129-
130-
enable_rpm_wakeref_asserts(dev_priv);
131-
132-
+ if (INTEL_GEN(dev_priv) >= 9 && i915_modparams.enable_guc && i915_modparams.enable_ipts)
133-
+ intel_ipts_resume(dev);
134-
+
135-
return 0;
136-
}
137-
138118
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
139119
index 066fd2a12851..2a872d8725b5 100644
140120
--- a/drivers/gpu/drm/i915/i915_drv.h
@@ -418,10 +398,10 @@ index aa5e6749c925..c9e5c14e7f67 100644
418398
#endif
419399
diff --git a/drivers/gpu/drm/i915/intel_ipts.c b/drivers/gpu/drm/i915/intel_ipts.c
420400
new file mode 100644
421-
index 000000000000..5d9145ac221c
401+
index 000000000000..3d3c353986f7
422402
--- /dev/null
423403
+++ b/drivers/gpu/drm/i915/intel_ipts.c
424-
@@ -0,0 +1,661 @@
404+
@@ -0,0 +1,651 @@
425405
+/*
426406
+ * Copyright 2016 Intel Corporation
427407
+ *
@@ -1073,22 +1053,12 @@ index 000000000000..5d9145ac221c
10731053
+ cancel_delayed_work(&intel_ipts.reacquire_db_work);
10741054
+ }
10751055
+}
1076-
+
1077-
+int intel_ipts_resume(struct drm_device *dev)
1078-
+{
1079-
+ return intel_ipts_init(dev);
1080-
+}
1081-
+
1082-
+void intel_ipts_suspend(struct drm_device *dev)
1083-
+{
1084-
+ intel_ipts_cleanup(dev);
1085-
+}
10861056
diff --git a/drivers/gpu/drm/i915/intel_ipts.h b/drivers/gpu/drm/i915/intel_ipts.h
10871057
new file mode 100644
1088-
index 000000000000..45d7d1273adf
1058+
index 000000000000..a6965d102417
10891059
--- /dev/null
10901060
+++ b/drivers/gpu/drm/i915/intel_ipts.h
1091-
@@ -0,0 +1,36 @@
1061+
@@ -0,0 +1,34 @@
10921062
+/*
10931063
+ * Copyright © 2016 Intel Corporation
10941064
+ *
@@ -1119,8 +1089,6 @@ index 000000000000..45d7d1273adf
11191089
+
11201090
+int intel_ipts_init(struct drm_device *dev);
11211091
+void intel_ipts_cleanup(struct drm_device *dev);
1122-
+int intel_ipts_resume(struct drm_device *dev);
1123-
+void intel_ipts_suspend(struct drm_device *dev);
11241092
+int intel_ipts_notify_backlight_status(bool backlight_on);
11251093
+int intel_ipts_notify_complete(void);
11261094
+

patches/5.2/0006-hid.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 4f231b25dd91f0149b9d4be3190165daa7e5ec38 Mon Sep 17 00:00:00 2001
1+
From 22b73627861a495e2eadc105b6f4c97d7eea5356 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:45:42 +0200
44
Subject: [PATCH 06/12] hid

patches/5.2/0007-sdcard-reader.patch

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

patches/5.2/0008-wifi.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 9635d33d102e805a329b53fa169cd2cb6cf26b4c Mon Sep 17 00:00:00 2001
1+
From bf71437cc35f685cca2d8e4bde29f85815cc5a14 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:46:16 +0200
44
Subject: [PATCH 08/12] wifi

patches/5.2/0009-surface3-power.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f8ecd1e208e1e35d600575f5ea289a5c99ee9826 Mon Sep 17 00:00:00 2001
1+
From dd6ade6ff8b50bdb53c2c4433e47e7eb4928e57d Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:46:48 +0200
44
Subject: [PATCH 09/12] surface3-power

patches/5.2/0010-mwlwifi.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 3a34928359985f56d92bc287a45b9d23bddcbb89 Mon Sep 17 00:00:00 2001
1+
From 7f9b63420584b1d54d6289639a5ffac2e67e3e5c Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:47:02 +0200
44
Subject: [PATCH 10/12] mwlwifi

patches/5.2/0011-surface-lte.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 08d01827a8424ef7cd9e0292a710a35c79fe032c Mon Sep 17 00:00:00 2001
1+
From 89effd44e6f7059c8cde5a89d693a5ecbc07a235 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:47:13 +0200
44
Subject: [PATCH 11/12] surface-lte

patches/5.2/0012-surfacebook2-dgpu.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From d46ce195e6cd1ecfbb833fe678523451a5591ff6 Mon Sep 17 00:00:00 2001
1+
From f50a04775fc653b5108520817ade7870753b6af6 Mon Sep 17 00:00:00 2001
22
From: Maximilian Luz <[email protected]>
33
Date: Fri, 26 Jul 2019 04:47:27 +0200
44
Subject: [PATCH 12/12] surfacebook2-dgpu

0 commit comments

Comments
 (0)