diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-21 11:52:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-21 11:52:36 -0400 |
commit | b6e78a6f21a85c84fa7e9248eac0fb04953426dd (patch) | |
tree | c148052033dff87bd5ab34e70664c5e241de6425 | |
parent | 20c29a97559c9a59991170d3d648884a9f6aacd3 (diff) | |
parent | 56eac98b8a0bbb72132340dbfedc912c68c4bd56 (diff) |
Merge tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"amdkfd, i915 and exynos fixes.
I've ended up on unplanned + planned leave this week, but there were
some fixes I decided to dequeue, some amdkfd bits missed the next pull
but they are pretty trivial, so I included them.
I'm not sure I'll see much else for rc2, lots of people are at XDC"
* tag 'drm-fixes-for-v4.14-rc2' of git://people.freedesktop.org/~airlied/linux:
drm/exynos/hdmi: Fix unsafe list iteration
drm: exynos: include linux/irq.h
drm/exynos: Fix suspend/resume support
drm/exynos: Fix locking in the suspend/resume paths
drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos()
drm/i915/cnp: set min brightness from VBT
Revert "drm/i915/bxt: Disable device ready before shutdown command"
drm/i915/bxt: set min brightness from VBT
drm/i915: Fix an error handling in 'intel_framebuffer_init()'
drm/i915/gvt: Fix incorrect PCI BARs reporting
drm/amdkfd: pass queue's mqd when destroying mqd
drm/amdkfd: remove memset before memcpy
uapi linux/kfd_ioctl.h: only use __u32 and __u64
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 36 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/gvt/cfg_space.c | 113 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dsi.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 4 | ||||
-rw-r--r-- | include/uapi/linux/kfd_ioctl.h | 172 |
14 files changed, 195 insertions, 195 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 681b639f5133..0649dd43e780 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | |||
@@ -183,7 +183,7 @@ static void uninitialize(struct kernel_queue *kq) | |||
183 | { | 183 | { |
184 | if (kq->queue->properties.type == KFD_QUEUE_TYPE_HIQ) | 184 | if (kq->queue->properties.type == KFD_QUEUE_TYPE_HIQ) |
185 | kq->mqd->destroy_mqd(kq->mqd, | 185 | kq->mqd->destroy_mqd(kq->mqd, |
186 | NULL, | 186 | kq->queue->mqd, |
187 | false, | 187 | false, |
188 | QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS, | 188 | QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS, |
189 | kq->queue->pipe, | 189 | kq->queue->pipe, |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index 1cae95e2b13a..03bec765b03d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | |||
@@ -143,7 +143,6 @@ int pqm_create_queue(struct process_queue_manager *pqm, | |||
143 | int num_queues = 0; | 143 | int num_queues = 0; |
144 | struct queue *cur; | 144 | struct queue *cur; |
145 | 145 | ||
146 | memset(&q_properties, 0, sizeof(struct queue_properties)); | ||
147 | memcpy(&q_properties, properties, sizeof(struct queue_properties)); | 146 | memcpy(&q_properties, properties, sizeof(struct queue_properties)); |
148 | q = NULL; | 147 | q = NULL; |
149 | kq = NULL; | 148 | kq = NULL; |
diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 730b8d9db187..6be5b53c3b27 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/component.h> | 15 | #include <linux/component.h> |
16 | #include <linux/iopoll.h> | 16 | #include <linux/iopoll.h> |
17 | #include <linux/irq.h> | ||
17 | #include <linux/mfd/syscon.h> | 18 | #include <linux/mfd/syscon.h> |
18 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
19 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index b1f7299600f0..e651a58c18cf 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -168,23 +168,19 @@ static struct drm_driver exynos_drm_driver = { | |||
168 | static int exynos_drm_suspend(struct device *dev) | 168 | static int exynos_drm_suspend(struct device *dev) |
169 | { | 169 | { |
170 | struct drm_device *drm_dev = dev_get_drvdata(dev); | 170 | struct drm_device *drm_dev = dev_get_drvdata(dev); |
171 | struct drm_connector *connector; | 171 | struct exynos_drm_private *private = drm_dev->dev_private; |
172 | struct drm_connector_list_iter conn_iter; | ||
173 | 172 | ||
174 | if (pm_runtime_suspended(dev) || !drm_dev) | 173 | if (pm_runtime_suspended(dev) || !drm_dev) |
175 | return 0; | 174 | return 0; |
176 | 175 | ||
177 | drm_connector_list_iter_begin(drm_dev, &conn_iter); | 176 | drm_kms_helper_poll_disable(drm_dev); |
178 | drm_for_each_connector_iter(connector, &conn_iter) { | 177 | exynos_drm_fbdev_suspend(drm_dev); |
179 | int old_dpms = connector->dpms; | 178 | private->suspend_state = drm_atomic_helper_suspend(drm_dev); |
180 | 179 | if (IS_ERR(private->suspend_state)) { | |
181 | if (connector->funcs->dpms) | 180 | exynos_drm_fbdev_resume(drm_dev); |
182 | connector->funcs->dpms(connector, DRM_MODE_DPMS_OFF); | 181 | drm_kms_helper_poll_enable(drm_dev); |
183 | 182 | return PTR_ERR(private->suspend_state); | |
184 | /* Set the old mode back to the connector for resume */ | ||
185 | connector->dpms = old_dpms; | ||
186 | } | 183 | } |
187 | drm_connector_list_iter_end(&conn_iter); | ||
188 | 184 | ||
189 | return 0; | 185 | return 0; |
190 | } | 186 | } |
@@ -192,22 +188,14 @@ static int exynos_drm_suspend(struct device *dev) | |||
192 | static int exynos_drm_resume(struct device *dev) | 188 | static int exynos_drm_resume(struct device *dev) |
193 | { | 189 | { |
194 | struct drm_device *drm_dev = dev_get_drvdata(dev); | 190 | struct drm_device *drm_dev = dev_get_drvdata(dev); |
195 | struct drm_connector *connector; | 191 | struct exynos_drm_private *private = drm_dev->dev_private; |
196 | struct drm_connector_list_iter conn_iter; | ||
197 | 192 | ||
198 | if (pm_runtime_suspended(dev) || !drm_dev) | 193 | if (pm_runtime_suspended(dev) || !drm_dev) |
199 | return 0; | 194 | return 0; |
200 | 195 | ||
201 | drm_connector_list_iter_begin(drm_dev, &conn_iter); | 196 | drm_atomic_helper_resume(drm_dev, private->suspend_state); |
202 | drm_for_each_connector_iter(connector, &conn_iter) { | 197 | exynos_drm_fbdev_resume(drm_dev); |
203 | if (connector->funcs->dpms) { | 198 | drm_kms_helper_poll_enable(drm_dev); |
204 | int dpms = connector->dpms; | ||
205 | |||
206 | connector->dpms = DRM_MODE_DPMS_OFF; | ||
207 | connector->funcs->dpms(connector, dpms); | ||
208 | } | ||
209 | } | ||
210 | drm_connector_list_iter_end(&conn_iter); | ||
211 | 199 | ||
212 | return 0; | 200 | return 0; |
213 | } | 201 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index cf131c2aa23e..f8bae4cb4823 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
@@ -202,6 +202,7 @@ struct drm_exynos_file_private { | |||
202 | */ | 202 | */ |
203 | struct exynos_drm_private { | 203 | struct exynos_drm_private { |
204 | struct drm_fb_helper *fb_helper; | 204 | struct drm_fb_helper *fb_helper; |
205 | struct drm_atomic_state *suspend_state; | ||
205 | 206 | ||
206 | struct device *dma_dev; | 207 | struct device *dma_dev; |
207 | void *mapping; | 208 | void *mapping; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index c3a068409b48..dfb66ecf417b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <drm/drm_crtc_helper.h> | 18 | #include <drm/drm_crtc_helper.h> |
19 | #include <drm/exynos_drm.h> | 19 | #include <drm/exynos_drm.h> |
20 | 20 | ||
21 | #include <linux/console.h> | ||
22 | |||
21 | #include "exynos_drm_drv.h" | 23 | #include "exynos_drm_drv.h" |
22 | #include "exynos_drm_fb.h" | 24 | #include "exynos_drm_fb.h" |
23 | #include "exynos_drm_fbdev.h" | 25 | #include "exynos_drm_fbdev.h" |
@@ -285,3 +287,21 @@ void exynos_drm_output_poll_changed(struct drm_device *dev) | |||
285 | 287 | ||
286 | drm_fb_helper_hotplug_event(fb_helper); | 288 | drm_fb_helper_hotplug_event(fb_helper); |
287 | } | 289 | } |
290 | |||
291 | void exynos_drm_fbdev_suspend(struct drm_device *dev) | ||
292 | { | ||
293 | struct exynos_drm_private *private = dev->dev_private; | ||
294 | |||
295 | console_lock(); | ||
296 | drm_fb_helper_set_suspend(private->fb_helper, 1); | ||
297 | console_unlock(); | ||
298 | } | ||
299 | |||
300 | void exynos_drm_fbdev_resume(struct drm_device *dev) | ||
301 | { | ||
302 | struct exynos_drm_private *private = dev->dev_private; | ||
303 | |||
304 | console_lock(); | ||
305 | drm_fb_helper_set_suspend(private->fb_helper, 0); | ||
306 | console_unlock(); | ||
307 | } | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h index 330eef87f718..645d1bb7f665 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h | |||
@@ -21,6 +21,8 @@ int exynos_drm_fbdev_init(struct drm_device *dev); | |||
21 | void exynos_drm_fbdev_fini(struct drm_device *dev); | 21 | void exynos_drm_fbdev_fini(struct drm_device *dev); |
22 | void exynos_drm_fbdev_restore_mode(struct drm_device *dev); | 22 | void exynos_drm_fbdev_restore_mode(struct drm_device *dev); |
23 | void exynos_drm_output_poll_changed(struct drm_device *dev); | 23 | void exynos_drm_output_poll_changed(struct drm_device *dev); |
24 | void exynos_drm_fbdev_suspend(struct drm_device *drm); | ||
25 | void exynos_drm_fbdev_resume(struct drm_device *drm); | ||
24 | 26 | ||
25 | #else | 27 | #else |
26 | 28 | ||
@@ -39,6 +41,14 @@ static inline void exynos_drm_fbdev_restore_mode(struct drm_device *dev) | |||
39 | 41 | ||
40 | #define exynos_drm_output_poll_changed (NULL) | 42 | #define exynos_drm_output_poll_changed (NULL) |
41 | 43 | ||
44 | static inline void exynos_drm_fbdev_suspend(struct drm_device *drm) | ||
45 | { | ||
46 | } | ||
47 | |||
48 | static inline void exynos_drm_fbdev_resume(struct drm_device *drm) | ||
49 | { | ||
50 | } | ||
51 | |||
42 | #endif | 52 | #endif |
43 | 53 | ||
44 | #endif | 54 | #endif |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 214fa5e51963..0109ff40b1db 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -944,22 +944,27 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder, | |||
944 | struct drm_device *dev = encoder->dev; | 944 | struct drm_device *dev = encoder->dev; |
945 | struct drm_connector *connector; | 945 | struct drm_connector *connector; |
946 | struct drm_display_mode *m; | 946 | struct drm_display_mode *m; |
947 | struct drm_connector_list_iter conn_iter; | ||
947 | int mode_ok; | 948 | int mode_ok; |
948 | 949 | ||
949 | drm_mode_set_crtcinfo(adjusted_mode, 0); | 950 | drm_mode_set_crtcinfo(adjusted_mode, 0); |
950 | 951 | ||
951 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | 952 | drm_connector_list_iter_begin(dev, &conn_iter); |
953 | drm_for_each_connector_iter(connector, &conn_iter) { | ||
952 | if (connector->encoder == encoder) | 954 | if (connector->encoder == encoder) |
953 | break; | 955 | break; |
954 | } | 956 | } |
957 | if (connector) | ||
958 | drm_connector_get(connector); | ||
959 | drm_connector_list_iter_end(&conn_iter); | ||
955 | 960 | ||
956 | if (connector->encoder != encoder) | 961 | if (!connector) |
957 | return true; | 962 | return true; |
958 | 963 | ||
959 | mode_ok = hdmi_mode_valid(connector, adjusted_mode); | 964 | mode_ok = hdmi_mode_valid(connector, adjusted_mode); |
960 | 965 | ||
961 | if (mode_ok == MODE_OK) | 966 | if (mode_ok == MODE_OK) |
962 | return true; | 967 | goto cleanup; |
963 | 968 | ||
964 | /* | 969 | /* |
965 | * Find the most suitable mode and copy it to adjusted_mode. | 970 | * Find the most suitable mode and copy it to adjusted_mode. |
@@ -979,6 +984,9 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder, | |||
979 | } | 984 | } |
980 | } | 985 | } |
981 | 986 | ||
987 | cleanup: | ||
988 | drm_connector_put(connector); | ||
989 | |||
982 | return true; | 990 | return true; |
983 | } | 991 | } |
984 | 992 | ||
diff --git a/drivers/gpu/drm/i915/gvt/cfg_space.c b/drivers/gpu/drm/i915/gvt/cfg_space.c index 40af17ec6312..ff3154fe6588 100644 --- a/drivers/gpu/drm/i915/gvt/cfg_space.c +++ b/drivers/gpu/drm/i915/gvt/cfg_space.c | |||
@@ -197,78 +197,65 @@ static int emulate_pci_command_write(struct intel_vgpu *vgpu, | |||
197 | static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset, | 197 | static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset, |
198 | void *p_data, unsigned int bytes) | 198 | void *p_data, unsigned int bytes) |
199 | { | 199 | { |
200 | unsigned int bar_index = | ||
201 | (rounddown(offset, 8) % PCI_BASE_ADDRESS_0) / 8; | ||
202 | u32 new = *(u32 *)(p_data); | 200 | u32 new = *(u32 *)(p_data); |
203 | bool lo = IS_ALIGNED(offset, 8); | 201 | bool lo = IS_ALIGNED(offset, 8); |
204 | u64 size; | 202 | u64 size; |
205 | int ret = 0; | 203 | int ret = 0; |
206 | bool mmio_enabled = | 204 | bool mmio_enabled = |
207 | vgpu_cfg_space(vgpu)[PCI_COMMAND] & PCI_COMMAND_MEMORY; | 205 | vgpu_cfg_space(vgpu)[PCI_COMMAND] & PCI_COMMAND_MEMORY; |
206 | struct intel_vgpu_pci_bar *bars = vgpu->cfg_space.bar; | ||
208 | 207 | ||
209 | if (WARN_ON(bar_index >= INTEL_GVT_PCI_BAR_MAX)) | 208 | /* |
210 | return -EINVAL; | 209 | * Power-up software can determine how much address |
211 | 210 | * space the device requires by writing a value of | |
211 | * all 1's to the register and then reading the value | ||
212 | * back. The device will return 0's in all don't-care | ||
213 | * address bits. | ||
214 | */ | ||
212 | if (new == 0xffffffff) { | 215 | if (new == 0xffffffff) { |
213 | /* | 216 | switch (offset) { |
214 | * Power-up software can determine how much address | 217 | case PCI_BASE_ADDRESS_0: |
215 | * space the device requires by writing a value of | 218 | case PCI_BASE_ADDRESS_1: |
216 | * all 1's to the register and then reading the value | 219 | size = ~(bars[INTEL_GVT_PCI_BAR_GTTMMIO].size -1); |
217 | * back. The device will return 0's in all don't-care | 220 | intel_vgpu_write_pci_bar(vgpu, offset, |
218 | * address bits. | 221 | size >> (lo ? 0 : 32), lo); |
219 | */ | 222 | /* |
220 | size = vgpu->cfg_space.bar[bar_index].size; | 223 | * Untrap the BAR, since guest hasn't configured a |
221 | if (lo) { | 224 | * valid GPA |
222 | new = rounddown(new, size); | ||
223 | } else { | ||
224 | u32 val = vgpu_cfg_space(vgpu)[rounddown(offset, 8)]; | ||
225 | /* for 32bit mode bar it returns all-0 in upper 32 | ||
226 | * bit, for 64bit mode bar it will calculate the | ||
227 | * size with lower 32bit and return the corresponding | ||
228 | * value | ||
229 | */ | 225 | */ |
230 | if (val & PCI_BASE_ADDRESS_MEM_TYPE_64) | ||
231 | new &= (~(size-1)) >> 32; | ||
232 | else | ||
233 | new = 0; | ||
234 | } | ||
235 | /* | ||
236 | * Unmapp & untrap the BAR, since guest hasn't configured a | ||
237 | * valid GPA | ||
238 | */ | ||
239 | switch (bar_index) { | ||
240 | case INTEL_GVT_PCI_BAR_GTTMMIO: | ||
241 | ret = trap_gttmmio(vgpu, false); | 226 | ret = trap_gttmmio(vgpu, false); |
242 | break; | 227 | break; |
243 | case INTEL_GVT_PCI_BAR_APERTURE: | 228 | case PCI_BASE_ADDRESS_2: |
229 | case PCI_BASE_ADDRESS_3: | ||
230 | size = ~(bars[INTEL_GVT_PCI_BAR_APERTURE].size -1); | ||
231 | intel_vgpu_write_pci_bar(vgpu, offset, | ||
232 | size >> (lo ? 0 : 32), lo); | ||
244 | ret = map_aperture(vgpu, false); | 233 | ret = map_aperture(vgpu, false); |
245 | break; | 234 | break; |
235 | default: | ||
236 | /* Unimplemented BARs */ | ||
237 | intel_vgpu_write_pci_bar(vgpu, offset, 0x0, false); | ||
246 | } | 238 | } |
247 | intel_vgpu_write_pci_bar(vgpu, offset, new, lo); | ||
248 | } else { | 239 | } else { |
249 | /* | 240 | switch (offset) { |
250 | * Unmapp & untrap the old BAR first, since guest has | 241 | case PCI_BASE_ADDRESS_0: |
251 | * re-configured the BAR | 242 | case PCI_BASE_ADDRESS_1: |
252 | */ | 243 | /* |
253 | switch (bar_index) { | 244 | * Untrap the old BAR first, since guest has |
254 | case INTEL_GVT_PCI_BAR_GTTMMIO: | 245 | * re-configured the BAR |
255 | ret = trap_gttmmio(vgpu, false); | 246 | */ |
247 | trap_gttmmio(vgpu, false); | ||
248 | intel_vgpu_write_pci_bar(vgpu, offset, new, lo); | ||
249 | ret = trap_gttmmio(vgpu, mmio_enabled); | ||
256 | break; | 250 | break; |
257 | case INTEL_GVT_PCI_BAR_APERTURE: | 251 | case PCI_BASE_ADDRESS_2: |
258 | ret = map_aperture(vgpu, false); | 252 | case PCI_BASE_ADDRESS_3: |
253 | map_aperture(vgpu, false); | ||
254 | intel_vgpu_write_pci_bar(vgpu, offset, new, lo); | ||
255 | ret = map_aperture(vgpu, mmio_enabled); | ||
259 | break; | 256 | break; |
260 | } | 257 | default: |
261 | intel_vgpu_write_pci_bar(vgpu, offset, new, lo); | 258 | intel_vgpu_write_pci_bar(vgpu, offset, new, lo); |
262 | /* Track the new BAR */ | ||
263 | if (mmio_enabled) { | ||
264 | switch (bar_index) { | ||
265 | case INTEL_GVT_PCI_BAR_GTTMMIO: | ||
266 | ret = trap_gttmmio(vgpu, true); | ||
267 | break; | ||
268 | case INTEL_GVT_PCI_BAR_APERTURE: | ||
269 | ret = map_aperture(vgpu, true); | ||
270 | break; | ||
271 | } | ||
272 | } | 259 | } |
273 | } | 260 | } |
274 | return ret; | 261 | return ret; |
@@ -299,10 +286,7 @@ int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset, | |||
299 | } | 286 | } |
300 | 287 | ||
301 | switch (rounddown(offset, 4)) { | 288 | switch (rounddown(offset, 4)) { |
302 | case PCI_BASE_ADDRESS_0: | 289 | case PCI_BASE_ADDRESS_0 ... PCI_BASE_ADDRESS_5: |
303 | case PCI_BASE_ADDRESS_1: | ||
304 | case PCI_BASE_ADDRESS_2: | ||
305 | case PCI_BASE_ADDRESS_3: | ||
306 | if (WARN_ON(!IS_ALIGNED(offset, 4))) | 290 | if (WARN_ON(!IS_ALIGNED(offset, 4))) |
307 | return -EINVAL; | 291 | return -EINVAL; |
308 | return emulate_pci_bar_write(vgpu, offset, p_data, bytes); | 292 | return emulate_pci_bar_write(vgpu, offset, p_data, bytes); |
@@ -344,7 +328,6 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, | |||
344 | struct intel_gvt *gvt = vgpu->gvt; | 328 | struct intel_gvt *gvt = vgpu->gvt; |
345 | const struct intel_gvt_device_info *info = &gvt->device_info; | 329 | const struct intel_gvt_device_info *info = &gvt->device_info; |
346 | u16 *gmch_ctl; | 330 | u16 *gmch_ctl; |
347 | int i; | ||
348 | 331 | ||
349 | memcpy(vgpu_cfg_space(vgpu), gvt->firmware.cfg_space, | 332 | memcpy(vgpu_cfg_space(vgpu), gvt->firmware.cfg_space, |
350 | info->cfg_space_size); | 333 | info->cfg_space_size); |
@@ -371,13 +354,13 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, | |||
371 | */ | 354 | */ |
372 | memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_1, 0, 4); | 355 | memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_1, 0, 4); |
373 | memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_3, 0, 4); | 356 | memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_3, 0, 4); |
357 | memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_4, 0, 8); | ||
374 | memset(vgpu_cfg_space(vgpu) + INTEL_GVT_PCI_OPREGION, 0, 4); | 358 | memset(vgpu_cfg_space(vgpu) + INTEL_GVT_PCI_OPREGION, 0, 4); |
375 | 359 | ||
376 | for (i = 0; i < INTEL_GVT_MAX_BAR_NUM; i++) { | 360 | vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_GTTMMIO].size = |
377 | vgpu->cfg_space.bar[i].size = pci_resource_len( | 361 | pci_resource_len(gvt->dev_priv->drm.pdev, 0); |
378 | gvt->dev_priv->drm.pdev, i * 2); | 362 | vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE].size = |
379 | vgpu->cfg_space.bar[i].tracked = false; | 363 | pci_resource_len(gvt->dev_priv->drm.pdev, 2); |
380 | } | ||
381 | } | 364 | } |
382 | 365 | ||
383 | /** | 366 | /** |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index e21ce9c18b6e..b63893eeca73 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -839,7 +839,6 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, | |||
839 | pipe); | 839 | pipe); |
840 | int position; | 840 | int position; |
841 | int vbl_start, vbl_end, hsync_start, htotal, vtotal; | 841 | int vbl_start, vbl_end, hsync_start, htotal, vtotal; |
842 | bool in_vbl = true; | ||
843 | unsigned long irqflags; | 842 | unsigned long irqflags; |
844 | 843 | ||
845 | if (WARN_ON(!mode->crtc_clock)) { | 844 | if (WARN_ON(!mode->crtc_clock)) { |
@@ -922,8 +921,6 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, | |||
922 | 921 | ||
923 | spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); | 922 | spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); |
924 | 923 | ||
925 | in_vbl = position >= vbl_start && position < vbl_end; | ||
926 | |||
927 | /* | 924 | /* |
928 | * While in vblank, position will be negative | 925 | * While in vblank, position will be negative |
929 | * counting up towards 0 at vbl_end. And outside | 926 | * counting up towards 0 at vbl_end. And outside |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f17275519484..00cd17c76fdc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -14030,7 +14030,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, | |||
14030 | 14030 | ||
14031 | if (mode_cmd->handles[i] != mode_cmd->handles[0]) { | 14031 | if (mode_cmd->handles[i] != mode_cmd->handles[0]) { |
14032 | DRM_DEBUG_KMS("bad plane %d handle\n", i); | 14032 | DRM_DEBUG_KMS("bad plane %d handle\n", i); |
14033 | return -EINVAL; | 14033 | goto err; |
14034 | } | 14034 | } |
14035 | 14035 | ||
14036 | stride_alignment = intel_fb_stride_alignment(fb, i); | 14036 | stride_alignment = intel_fb_stride_alignment(fb, i); |
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index f0c11aec5ea5..7442891762be 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c | |||
@@ -892,8 +892,6 @@ static void intel_dsi_disable(struct intel_encoder *encoder, | |||
892 | struct intel_crtc_state *old_crtc_state, | 892 | struct intel_crtc_state *old_crtc_state, |
893 | struct drm_connector_state *old_conn_state) | 893 | struct drm_connector_state *old_conn_state) |
894 | { | 894 | { |
895 | struct drm_device *dev = encoder->base.dev; | ||
896 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
897 | struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); | 895 | struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); |
898 | enum port port; | 896 | enum port port; |
899 | 897 | ||
@@ -903,15 +901,6 @@ static void intel_dsi_disable(struct intel_encoder *encoder, | |||
903 | intel_panel_disable_backlight(old_conn_state); | 901 | intel_panel_disable_backlight(old_conn_state); |
904 | 902 | ||
905 | /* | 903 | /* |
906 | * Disable Device ready before the port shutdown in order | ||
907 | * to avoid split screen | ||
908 | */ | ||
909 | if (IS_BROXTON(dev_priv)) { | ||
910 | for_each_dsi_port(port, intel_dsi->ports) | ||
911 | I915_WRITE(MIPI_DEVICE_READY(port), 0); | ||
912 | } | ||
913 | |||
914 | /* | ||
915 | * According to the spec we should send SHUTDOWN before | 904 | * According to the spec we should send SHUTDOWN before |
916 | * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs, but field testing | 905 | * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs, but field testing |
917 | * has shown that the v3 sequence works for v2 VBTs too | 906 | * has shown that the v3 sequence works for v2 VBTs too |
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index a17b1de7d7e0..3b1c5d783ee7 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c | |||
@@ -1699,6 +1699,8 @@ bxt_setup_backlight(struct intel_connector *connector, enum pipe unused) | |||
1699 | if (!panel->backlight.max) | 1699 | if (!panel->backlight.max) |
1700 | return -ENODEV; | 1700 | return -ENODEV; |
1701 | 1701 | ||
1702 | panel->backlight.min = get_backlight_min_vbt(connector); | ||
1703 | |||
1702 | val = bxt_get_backlight(connector); | 1704 | val = bxt_get_backlight(connector); |
1703 | val = intel_panel_compute_brightness(connector, val); | 1705 | val = intel_panel_compute_brightness(connector, val); |
1704 | panel->backlight.level = clamp(val, panel->backlight.min, | 1706 | panel->backlight.level = clamp(val, panel->backlight.min, |
@@ -1735,6 +1737,8 @@ cnp_setup_backlight(struct intel_connector *connector, enum pipe unused) | |||
1735 | if (!panel->backlight.max) | 1737 | if (!panel->backlight.max) |
1736 | return -ENODEV; | 1738 | return -ENODEV; |
1737 | 1739 | ||
1740 | panel->backlight.min = get_backlight_min_vbt(connector); | ||
1741 | |||
1738 | val = bxt_get_backlight(connector); | 1742 | val = bxt_get_backlight(connector); |
1739 | val = intel_panel_compute_brightness(connector, val); | 1743 | val = intel_panel_compute_brightness(connector, val); |
1740 | panel->backlight.level = clamp(val, panel->backlight.min, | 1744 | panel->backlight.level = clamp(val, panel->backlight.min, |
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index 7b4567bacfc2..26283fefdf5f 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h | |||
@@ -23,15 +23,15 @@ | |||
23 | #ifndef KFD_IOCTL_H_INCLUDED | 23 | #ifndef KFD_IOCTL_H_INCLUDED |
24 | #define KFD_IOCTL_H_INCLUDED | 24 | #define KFD_IOCTL_H_INCLUDED |
25 | 25 | ||
26 | #include <linux/types.h> | 26 | #include <drm/drm.h> |
27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
28 | 28 | ||
29 | #define KFD_IOCTL_MAJOR_VERSION 1 | 29 | #define KFD_IOCTL_MAJOR_VERSION 1 |
30 | #define KFD_IOCTL_MINOR_VERSION 1 | 30 | #define KFD_IOCTL_MINOR_VERSION 1 |
31 | 31 | ||
32 | struct kfd_ioctl_get_version_args { | 32 | struct kfd_ioctl_get_version_args { |
33 | uint32_t major_version; /* from KFD */ | 33 | __u32 major_version; /* from KFD */ |
34 | uint32_t minor_version; /* from KFD */ | 34 | __u32 minor_version; /* from KFD */ |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* For kfd_ioctl_create_queue_args.queue_type. */ | 37 | /* For kfd_ioctl_create_queue_args.queue_type. */ |
@@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args { | |||
43 | #define KFD_MAX_QUEUE_PRIORITY 15 | 43 | #define KFD_MAX_QUEUE_PRIORITY 15 |
44 | 44 | ||
45 | struct kfd_ioctl_create_queue_args { | 45 | struct kfd_ioctl_create_queue_args { |
46 | uint64_t ring_base_address; /* to KFD */ | 46 | __u64 ring_base_address; /* to KFD */ |
47 | uint64_t write_pointer_address; /* from KFD */ | 47 | __u64 write_pointer_address; /* from KFD */ |
48 | uint64_t read_pointer_address; /* from KFD */ | 48 | __u64 read_pointer_address; /* from KFD */ |
49 | uint64_t doorbell_offset; /* from KFD */ | 49 | __u64 doorbell_offset; /* from KFD */ |
50 | 50 | ||
51 | uint32_t ring_size; /* to KFD */ | 51 | __u32 ring_size; /* to KFD */ |
52 | uint32_t gpu_id; /* to KFD */ | 52 | __u32 gpu_id; /* to KFD */ |
53 | uint32_t queue_type; /* to KFD */ | 53 | __u32 queue_type; /* to KFD */ |
54 | uint32_t queue_percentage; /* to KFD */ | 54 | __u32 queue_percentage; /* to KFD */ |
55 | uint32_t queue_priority; /* to KFD */ | 55 | __u32 queue_priority; /* to KFD */ |
56 | uint32_t queue_id; /* from KFD */ | 56 | __u32 queue_id; /* from KFD */ |
57 | 57 | ||
58 | uint64_t eop_buffer_address; /* to KFD */ | 58 | __u64 eop_buffer_address; /* to KFD */ |
59 | uint64_t eop_buffer_size; /* to KFD */ | 59 | __u64 eop_buffer_size; /* to KFD */ |
60 | uint64_t ctx_save_restore_address; /* to KFD */ | 60 | __u64 ctx_save_restore_address; /* to KFD */ |
61 | uint64_t ctx_save_restore_size; /* to KFD */ | 61 | __u64 ctx_save_restore_size; /* to KFD */ |
62 | }; | 62 | }; |
63 | 63 | ||
64 | struct kfd_ioctl_destroy_queue_args { | 64 | struct kfd_ioctl_destroy_queue_args { |
65 | uint32_t queue_id; /* to KFD */ | 65 | __u32 queue_id; /* to KFD */ |
66 | uint32_t pad; | 66 | __u32 pad; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct kfd_ioctl_update_queue_args { | 69 | struct kfd_ioctl_update_queue_args { |
70 | uint64_t ring_base_address; /* to KFD */ | 70 | __u64 ring_base_address; /* to KFD */ |
71 | 71 | ||
72 | uint32_t queue_id; /* to KFD */ | 72 | __u32 queue_id; /* to KFD */ |
73 | uint32_t ring_size; /* to KFD */ | 73 | __u32 ring_size; /* to KFD */ |
74 | uint32_t queue_percentage; /* to KFD */ | 74 | __u32 queue_percentage; /* to KFD */ |
75 | uint32_t queue_priority; /* to KFD */ | 75 | __u32 queue_priority; /* to KFD */ |
76 | }; | 76 | }; |
77 | 77 | ||
78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ | 78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
@@ -80,13 +80,13 @@ struct kfd_ioctl_update_queue_args { | |||
80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | 80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
81 | 81 | ||
82 | struct kfd_ioctl_set_memory_policy_args { | 82 | struct kfd_ioctl_set_memory_policy_args { |
83 | uint64_t alternate_aperture_base; /* to KFD */ | 83 | __u64 alternate_aperture_base; /* to KFD */ |
84 | uint64_t alternate_aperture_size; /* to KFD */ | 84 | __u64 alternate_aperture_size; /* to KFD */ |
85 | 85 | ||
86 | uint32_t gpu_id; /* to KFD */ | 86 | __u32 gpu_id; /* to KFD */ |
87 | uint32_t default_policy; /* to KFD */ | 87 | __u32 default_policy; /* to KFD */ |
88 | uint32_t alternate_policy; /* to KFD */ | 88 | __u32 alternate_policy; /* to KFD */ |
89 | uint32_t pad; | 89 | __u32 pad; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | /* | 92 | /* |
@@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args { | |||
97 | */ | 97 | */ |
98 | 98 | ||
99 | struct kfd_ioctl_get_clock_counters_args { | 99 | struct kfd_ioctl_get_clock_counters_args { |
100 | uint64_t gpu_clock_counter; /* from KFD */ | 100 | __u64 gpu_clock_counter; /* from KFD */ |
101 | uint64_t cpu_clock_counter; /* from KFD */ | 101 | __u64 cpu_clock_counter; /* from KFD */ |
102 | uint64_t system_clock_counter; /* from KFD */ | 102 | __u64 system_clock_counter; /* from KFD */ |
103 | uint64_t system_clock_freq; /* from KFD */ | 103 | __u64 system_clock_freq; /* from KFD */ |
104 | 104 | ||
105 | uint32_t gpu_id; /* to KFD */ | 105 | __u32 gpu_id; /* to KFD */ |
106 | uint32_t pad; | 106 | __u32 pad; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | #define NUM_OF_SUPPORTED_GPUS 7 | 109 | #define NUM_OF_SUPPORTED_GPUS 7 |
110 | 110 | ||
111 | struct kfd_process_device_apertures { | 111 | struct kfd_process_device_apertures { |
112 | uint64_t lds_base; /* from KFD */ | 112 | __u64 lds_base; /* from KFD */ |
113 | uint64_t lds_limit; /* from KFD */ | 113 | __u64 lds_limit; /* from KFD */ |
114 | uint64_t scratch_base; /* from KFD */ | 114 | __u64 scratch_base; /* from KFD */ |
115 | uint64_t scratch_limit; /* from KFD */ | 115 | __u64 scratch_limit; /* from KFD */ |
116 | uint64_t gpuvm_base; /* from KFD */ | 116 | __u64 gpuvm_base; /* from KFD */ |
117 | uint64_t gpuvm_limit; /* from KFD */ | 117 | __u64 gpuvm_limit; /* from KFD */ |
118 | uint32_t gpu_id; /* from KFD */ | 118 | __u32 gpu_id; /* from KFD */ |
119 | uint32_t pad; | 119 | __u32 pad; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | struct kfd_ioctl_get_process_apertures_args { | 122 | struct kfd_ioctl_get_process_apertures_args { |
@@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args { | |||
124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ | 124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ |
125 | 125 | ||
126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ | 126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ |
127 | uint32_t num_of_nodes; | 127 | __u32 num_of_nodes; |
128 | uint32_t pad; | 128 | __u32 pad; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | #define MAX_ALLOWED_NUM_POINTS 100 | 131 | #define MAX_ALLOWED_NUM_POINTS 100 |
@@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args { | |||
133 | #define MAX_ALLOWED_WAC_BUFF_SIZE 128 | 133 | #define MAX_ALLOWED_WAC_BUFF_SIZE 128 |
134 | 134 | ||
135 | struct kfd_ioctl_dbg_register_args { | 135 | struct kfd_ioctl_dbg_register_args { |
136 | uint32_t gpu_id; /* to KFD */ | 136 | __u32 gpu_id; /* to KFD */ |
137 | uint32_t pad; | 137 | __u32 pad; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct kfd_ioctl_dbg_unregister_args { | 140 | struct kfd_ioctl_dbg_unregister_args { |
141 | uint32_t gpu_id; /* to KFD */ | 141 | __u32 gpu_id; /* to KFD */ |
142 | uint32_t pad; | 142 | __u32 pad; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | struct kfd_ioctl_dbg_address_watch_args { | 145 | struct kfd_ioctl_dbg_address_watch_args { |
146 | uint64_t content_ptr; /* a pointer to the actual content */ | 146 | __u64 content_ptr; /* a pointer to the actual content */ |
147 | uint32_t gpu_id; /* to KFD */ | 147 | __u32 gpu_id; /* to KFD */ |
148 | uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | 148 | __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ |
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct kfd_ioctl_dbg_wave_control_args { | 151 | struct kfd_ioctl_dbg_wave_control_args { |
152 | uint64_t content_ptr; /* a pointer to the actual content */ | 152 | __u64 content_ptr; /* a pointer to the actual content */ |
153 | uint32_t gpu_id; /* to KFD */ | 153 | __u32 gpu_id; /* to KFD */ |
154 | uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | 154 | __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ |
155 | }; | 155 | }; |
156 | 156 | ||
157 | /* Matching HSA_EVENTTYPE */ | 157 | /* Matching HSA_EVENTTYPE */ |
@@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args { | |||
172 | #define KFD_SIGNAL_EVENT_LIMIT 256 | 172 | #define KFD_SIGNAL_EVENT_LIMIT 256 |
173 | 173 | ||
174 | struct kfd_ioctl_create_event_args { | 174 | struct kfd_ioctl_create_event_args { |
175 | uint64_t event_page_offset; /* from KFD */ | 175 | __u64 event_page_offset; /* from KFD */ |
176 | uint32_t event_trigger_data; /* from KFD - signal events only */ | 176 | __u32 event_trigger_data; /* from KFD - signal events only */ |
177 | uint32_t event_type; /* to KFD */ | 177 | __u32 event_type; /* to KFD */ |
178 | uint32_t auto_reset; /* to KFD */ | 178 | __u32 auto_reset; /* to KFD */ |
179 | uint32_t node_id; /* to KFD - only valid for certain | 179 | __u32 node_id; /* to KFD - only valid for certain |
180 | event types */ | 180 | event types */ |
181 | uint32_t event_id; /* from KFD */ | 181 | __u32 event_id; /* from KFD */ |
182 | uint32_t event_slot_index; /* from KFD */ | 182 | __u32 event_slot_index; /* from KFD */ |
183 | }; | 183 | }; |
184 | 184 | ||
185 | struct kfd_ioctl_destroy_event_args { | 185 | struct kfd_ioctl_destroy_event_args { |
186 | uint32_t event_id; /* to KFD */ | 186 | __u32 event_id; /* to KFD */ |
187 | uint32_t pad; | 187 | __u32 pad; |
188 | }; | 188 | }; |
189 | 189 | ||
190 | struct kfd_ioctl_set_event_args { | 190 | struct kfd_ioctl_set_event_args { |
191 | uint32_t event_id; /* to KFD */ | 191 | __u32 event_id; /* to KFD */ |
192 | uint32_t pad; | 192 | __u32 pad; |
193 | }; | 193 | }; |
194 | 194 | ||
195 | struct kfd_ioctl_reset_event_args { | 195 | struct kfd_ioctl_reset_event_args { |
196 | uint32_t event_id; /* to KFD */ | 196 | __u32 event_id; /* to KFD */ |
197 | uint32_t pad; | 197 | __u32 pad; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | struct kfd_memory_exception_failure { | 200 | struct kfd_memory_exception_failure { |
201 | uint32_t NotPresent; /* Page not present or supervisor privilege */ | 201 | __u32 NotPresent; /* Page not present or supervisor privilege */ |
202 | uint32_t ReadOnly; /* Write access to a read-only page */ | 202 | __u32 ReadOnly; /* Write access to a read-only page */ |
203 | uint32_t NoExecute; /* Execute access to a page marked NX */ | 203 | __u32 NoExecute; /* Execute access to a page marked NX */ |
204 | uint32_t pad; | 204 | __u32 pad; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | /* memory exception data*/ | 207 | /* memory exception data*/ |
208 | struct kfd_hsa_memory_exception_data { | 208 | struct kfd_hsa_memory_exception_data { |
209 | struct kfd_memory_exception_failure failure; | 209 | struct kfd_memory_exception_failure failure; |
210 | uint64_t va; | 210 | __u64 va; |
211 | uint32_t gpu_id; | 211 | __u32 gpu_id; |
212 | uint32_t pad; | 212 | __u32 pad; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | /* Event data*/ | 215 | /* Event data*/ |
@@ -217,19 +217,19 @@ struct kfd_event_data { | |||
217 | union { | 217 | union { |
218 | struct kfd_hsa_memory_exception_data memory_exception_data; | 218 | struct kfd_hsa_memory_exception_data memory_exception_data; |
219 | }; /* From KFD */ | 219 | }; /* From KFD */ |
220 | uint64_t kfd_event_data_ext; /* pointer to an extension structure | 220 | __u64 kfd_event_data_ext; /* pointer to an extension structure |
221 | for future exception types */ | 221 | for future exception types */ |
222 | uint32_t event_id; /* to KFD */ | 222 | __u32 event_id; /* to KFD */ |
223 | uint32_t pad; | 223 | __u32 pad; |
224 | }; | 224 | }; |
225 | 225 | ||
226 | struct kfd_ioctl_wait_events_args { | 226 | struct kfd_ioctl_wait_events_args { |
227 | uint64_t events_ptr; /* pointed to struct | 227 | __u64 events_ptr; /* pointed to struct |
228 | kfd_event_data array, to KFD */ | 228 | kfd_event_data array, to KFD */ |
229 | uint32_t num_events; /* to KFD */ | 229 | __u32 num_events; /* to KFD */ |
230 | uint32_t wait_for_all; /* to KFD */ | 230 | __u32 wait_for_all; /* to KFD */ |
231 | uint32_t timeout; /* to KFD */ | 231 | __u32 timeout; /* to KFD */ |
232 | uint32_t wait_result; /* from KFD */ | 232 | __u32 wait_result; /* from KFD */ |
233 | }; | 233 | }; |
234 | 234 | ||
235 | struct kfd_ioctl_set_scratch_backing_va_args { | 235 | struct kfd_ioctl_set_scratch_backing_va_args { |