aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch
new file mode 100644
index 00000000..274d4a86
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1729-drm-amdkfd-gfx9-preempt-queues-after-VM_FAULT.patch
@@ -0,0 +1,80 @@
+From a127382cc2ba33bf442d30e18c32cadb387864b6 Mon Sep 17 00:00:00 2001
+From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
+Date: Fri, 30 Jun 2017 10:31:04 -0400
+Subject: [PATCH 1729/4131] drm/amdkfd: gfx9 preempt queues after VM_FAULT
+
+Context-save after a VM_FAULT is required for the debugger.
+
+Change-Id: I4a07448143c161f8ab48c41635cceaa4e13efb94
+Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 2 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
+ drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 2 +-
+ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
+index c60a71a..5d9a9d1 100644
+--- a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
++++ b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
+@@ -97,7 +97,7 @@ static void cik_event_interrupt_wq(struct kfd_dev *dev,
+
+ memset(&info, 0, sizeof(info));
+ dev->kfd2kgd->get_vm_fault_info(dev->kgd, &info);
+- kfd_process_vm_fault(dev->dqm, ihre->pasid);
++ kfd_process_vm_fault(dev->dqm, ihre->pasid, true);
+ if (!info.page_addr && !info.status)
+ return;
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+index f1b8eab..e70d122 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+@@ -1648,7 +1648,7 @@ void device_queue_manager_uninit(struct device_queue_manager *dqm)
+ }
+
+ int kfd_process_vm_fault(struct device_queue_manager *dqm,
+- unsigned int pasid)
++ unsigned int pasid, bool reset)
+ {
+ struct kfd_process_device *pdd;
+ struct kfd_process *p = kfd_lookup_process_by_pasid(pasid);
+@@ -1658,7 +1658,7 @@ int kfd_process_vm_fault(struct device_queue_manager *dqm,
+ return -EINVAL;
+ pdd = kfd_get_process_device_data(dqm->dev, p);
+ if (pdd)
+- ret = process_evict_queues(dqm, &pdd->qpd, true);
++ ret = process_evict_queues(dqm, &pdd->qpd, reset);
+ kfd_unref_process(p);
+
+ return ret;
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
+index b2c6b52..ccfc89a 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
+@@ -122,7 +122,7 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev,
+ info.prot_read = ring_id & 0x10;
+ info.prot_write = ring_id & 0x20;
+
+- kfd_process_vm_fault(dev->dqm, pasid);
++ kfd_process_vm_fault(dev->dqm, pasid, false);
+ kfd_signal_vm_fault_event(dev, pasid, &info);
+ }
+ }
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+index e682a3a..ade86c1 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+@@ -908,7 +908,7 @@ struct kernel_queue *kernel_queue_init(struct kfd_dev *dev,
+ enum kfd_queue_type type);
+ void kernel_queue_uninit(struct kernel_queue *kq);
+ int kfd_process_vm_fault(struct device_queue_manager *dqm,
+- unsigned int pasid);
++ unsigned int pasid, bool reset);
+
+ /* Process Queue Manager */
+ struct process_queue_node {
+--
+2.7.4
+