1 |
commit: cad5407b6e30efaf8a467c509b29ba5fb67f0cc8 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 31 13:32:29 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 13:32:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cad5407b |
7 |
|
8 |
Revert fix from upstream for DRM/i915 thanks to Luigi 'Comio' Mantellini |
9 |
|
10 |
Bug: https://bugs.gentoo.org/866023 |
11 |
|
12 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
13 |
|
14 |
0000_README | 4 ++ |
15 |
2700_revert-drm-i915-dma-resv-obj-fix.patch | 107 ++++++++++++++++++++++++++++ |
16 |
2 files changed, 111 insertions(+) |
17 |
|
18 |
diff --git a/0000_README b/0000_README |
19 |
index 309b3933..4172ad7c 100644 |
20 |
--- a/0000_README |
21 |
+++ b/0000_README |
22 |
@@ -83,6 +83,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch |
23 |
From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@××××××××.org/raw |
24 |
Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 |
25 |
|
26 |
+Patch: 2700_revert-drm-i915-dma-resv-obj-fix.patch |
27 |
+From: https://bugs.gentoo.org/866023 |
28 |
+Desc: Revert Revert for drm i915 thanks to Luigi 'Comio' Mantellini |
29 |
+ |
30 |
Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch |
31 |
From: https://bugs.gentoo.org/710790 |
32 |
Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino |
33 |
|
34 |
diff --git a/2700_revert-drm-i915-dma-resv-obj-fix.patch b/2700_revert-drm-i915-dma-resv-obj-fix.patch |
35 |
new file mode 100644 |
36 |
index 00000000..a9fcaf4a |
37 |
--- /dev/null |
38 |
+++ b/2700_revert-drm-i915-dma-resv-obj-fix.patch |
39 |
@@ -0,0 +1,107 @@ |
40 |
+From d481c481ca7813d688ffcb1c5418b48f83d945c1 Mon Sep 17 00:00:00 2001 |
41 |
+From: Luigi 'Comio' Mantellini <luigi.mantellini@×××××.com> |
42 |
+Date: Sun, 28 Aug 2022 09:17:35 +0200 |
43 |
+Subject: [PATCH] Revert "drm/i915: Individualize fences before adding to |
44 |
+ dma_resv obj" |
45 |
+ |
46 |
+This reverts commit 842d9346b2fdda4d2fb8ccb5b87faef1ac01ab51. |
47 |
+--- |
48 |
+ .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +- |
49 |
+ drivers/gpu/drm/i915/i915_vma.c | 48 ++++++++----------- |
50 |
+ 2 files changed, 21 insertions(+), 30 deletions(-) |
51 |
+ |
52 |
+diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c |
53 |
+index 30fe847c6664..c326bd2b444f 100644 |
54 |
+--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c |
55 |
++++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c |
56 |
+@@ -999,8 +999,7 @@ static int eb_validate_vmas(struct i915_execbuffer *eb) |
57 |
+ } |
58 |
+ } |
59 |
+ |
60 |
+- /* Reserve enough slots to accommodate composite fences */ |
61 |
+- err = dma_resv_reserve_fences(vma->obj->base.resv, eb->num_batches); |
62 |
++ err = dma_resv_reserve_fences(vma->obj->base.resv, 1); |
63 |
+ if (err) |
64 |
+ return err; |
65 |
+ |
66 |
+diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c |
67 |
+index 16460b169ed2..e71826f0e4b1 100644 |
68 |
+--- a/drivers/gpu/drm/i915/i915_vma.c |
69 |
++++ b/drivers/gpu/drm/i915/i915_vma.c |
70 |
+@@ -23,7 +23,6 @@ |
71 |
+ */ |
72 |
+ |
73 |
+ #include <linux/sched/mm.h> |
74 |
+-#include <linux/dma-fence-array.h> |
75 |
+ #include <drm/drm_gem.h> |
76 |
+ |
77 |
+ #include "display/intel_frontbuffer.h" |
78 |
+@@ -1839,21 +1838,6 @@ int _i915_vma_move_to_active(struct i915_vma *vma, |
79 |
+ if (unlikely(err)) |
80 |
+ return err; |
81 |
+ |
82 |
+- /* |
83 |
+- * Reserve fences slot early to prevent an allocation after preparing |
84 |
+- * the workload and associating fences with dma_resv. |
85 |
+- */ |
86 |
+- if (fence && !(flags & __EXEC_OBJECT_NO_RESERVE)) { |
87 |
+- struct dma_fence *curr; |
88 |
+- int idx; |
89 |
+- |
90 |
+- dma_fence_array_for_each(curr, idx, fence) |
91 |
+- ; |
92 |
+- err = dma_resv_reserve_fences(vma->obj->base.resv, idx); |
93 |
+- if (unlikely(err)) |
94 |
+- return err; |
95 |
+- } |
96 |
+- |
97 |
+ if (flags & EXEC_OBJECT_WRITE) { |
98 |
+ struct intel_frontbuffer *front; |
99 |
+ |
100 |
+@@ -1863,23 +1847,31 @@ int _i915_vma_move_to_active(struct i915_vma *vma, |
101 |
+ i915_active_add_request(&front->write, rq); |
102 |
+ intel_frontbuffer_put(front); |
103 |
+ } |
104 |
+- } |
105 |
+ |
106 |
+- if (fence) { |
107 |
+- struct dma_fence *curr; |
108 |
+- enum dma_resv_usage usage; |
109 |
+- int idx; |
110 |
++ if (!(flags & __EXEC_OBJECT_NO_RESERVE)) { |
111 |
++ err = dma_resv_reserve_fences(vma->obj->base.resv, 1); |
112 |
++ if (unlikely(err)) |
113 |
++ return err; |
114 |
++ } |
115 |
+ |
116 |
+- obj->read_domains = 0; |
117 |
+- if (flags & EXEC_OBJECT_WRITE) { |
118 |
+- usage = DMA_RESV_USAGE_WRITE; |
119 |
++ if (fence) { |
120 |
++ dma_resv_add_fence(vma->obj->base.resv, fence, |
121 |
++ DMA_RESV_USAGE_WRITE); |
122 |
+ obj->write_domain = I915_GEM_DOMAIN_RENDER; |
123 |
+- } else { |
124 |
+- usage = DMA_RESV_USAGE_READ; |
125 |
++ obj->read_domains = 0; |
126 |
++ } |
127 |
++ } else { |
128 |
++ if (!(flags & __EXEC_OBJECT_NO_RESERVE)) { |
129 |
++ err = dma_resv_reserve_fences(vma->obj->base.resv, 1); |
130 |
++ if (unlikely(err)) |
131 |
++ return err; |
132 |
+ } |
133 |
+ |
134 |
+- dma_fence_array_for_each(curr, idx, fence) |
135 |
+- dma_resv_add_fence(vma->obj->base.resv, curr, usage); |
136 |
++ if (fence) { |
137 |
++ dma_resv_add_fence(vma->obj->base.resv, fence, |
138 |
++ DMA_RESV_USAGE_READ); |
139 |
++ obj->write_domain = 0; |
140 |
++ } |
141 |
+ } |
142 |
+ |
143 |
+ if (flags & EXEC_OBJECT_NEEDS_FENCE && vma->fence) |
144 |
+-- |
145 |
+2.37.2 |
146 |
+ |