Skip to contentSkip to conversation

drm/amdkfd: rename fence_wait_timeout

PATCH In review Oded Gabbay 2 participants 6 messages Mar 5, 2015 – Mar 6, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/amdkfd: rename fence_wait_timeout

fence_wait_timeout() is an exported kernel symbol, so we should rename our local function to something different.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -2
index b3589d0..b508bae 100644
@@ -891,7 +891,7 @@ out:
 	return retval;
 }
 
-static int fence_wait_timeout(unsigned int *fence_addr,
+static int amdkfd_fence_wait_timeout(unsigned int *fence_addr,
 				unsigned int fence_value,
 				unsigned long timeout)
 {
@@ -947,7 +947,7 @@ static int destroy_queues_cpsch(struct device_queue_manager *dqm, bool lock)
 	pm_send_query_status(&dqm->packets, dqm->fence_gpu_addr,
 				KFD_FENCE_COMPLETED);
 	/* should be timed out */
-	fence_wait_timeout(dqm->fence_addr, KFD_FENCE_COMPLETED,
+	amdkfd_fence_wait_timeout(dqm->fence_addr, KFD_FENCE_COMPLETED,
 				QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS);
 	pm_release_ib(&dqm->packets);
 	dqm->active_runlist = false;
Signature · 6 lines
2.1.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/3 drm/amdkfd: Remove unused field from struct qcm_process_device

---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +0 -2
index 5a44f2f..b7bd7af 100644
@@ -378,8 +378,6 @@ struct qcm_process_device {
 	/* The Device Queue Manager that owns this data */
 	struct device_queue_manager *dqm;
 	struct process_queue_manager *pqm;
-	/* Device Queue Manager lock */
-	struct mutex *lock;
 	/* Queues list */
 	struct list_head queues_list;
 	struct list_head priv_queue_list;
Signature · 6 lines
2.1.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] drm/amdkfd: Remove unused field from struct qcm_process_device

Quoted 2 lines · Oded Gabbay
Quoted 20 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +0 -3
index 5a44f2f..b7bd7af 100644
@@ -378,8 +378,6 @@ struct qcm_process_device {
        /* The Device Queue Manager that owns this data */
        struct device_queue_manager *dqm;
        struct process_queue_manager *pqm;
-       /* Device Queue Manager lock */
-       struct mutex *lock;
        /* Queues list */
        struct list_head queues_list;
        struct list_head priv_queue_list;
--

2.1.0

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

PATCH 3/3 drm/amdkfd: add debug prints for process teardown

In reply to Oded Gabbay
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_process.c +6 -0
index a369c14..945d622 100644
@@ -162,10 +162,16 @@ static void kfd_process_wq_release(struct work_struct *work)
 
 	p = my_work->p;
 
+	pr_debug("Releasing process (pasid %d) in workqueue\n",
+			p->pasid);
+
 	mutex_lock(&p->mutex);
 
 	list_for_each_entry_safe(pdd, temp, &p->per_device_data,
 							per_device_list) {
+		pr_debug("Releasing pdd (topology id %d) for process (pasid %d) in workqueue\n",
+				pdd->dev->id, p->pasid);
+
 		amd_iommu_unbind_pasid(pdd->dev->pdev, p->pasid);
 		list_del(&pdd->per_device_list);
 
Signature · 6 lines
2.1.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] drm/amdkfd: add debug prints for process teardown

Quoted 1 line · Oded Gabbay
Quoted 28 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_process.c +6 -1
index a369c14..945d622 100644
@@ -162,10 +162,16 @@ static void kfd_process_wq_release(struct work_struct *work)
 
        p = my_work->p;
 
+       pr_debug("Releasing process (pasid %d) in workqueue\n",
+                       p->pasid);
+
        mutex_lock(&p->mutex);
 
        list_for_each_entry_safe(pdd, temp, &p->per_device_data,
                                                        per_device_list) {
+               pr_debug("Releasing pdd (topology id %d) for process (pasid %d) in workqueue\n",
+                               pdd->dev->id, p->pasid);
+
                amd_iommu_unbind_pasid(pdd->dev->pdev, p->pasid);
                list_del(&pdd->per_device_list);
 
--

2.1.0

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on v1 1/3
#5 lore raw
In reply to Oded Gabbay
Quoted 4 lines · Oded Gabbay

fence_wait_timeout() is an exported kernel symbol, so we should rename our local function to something different.

Quoted 29 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -3
index b3589d0..b508bae 100644
@@ -891,7 +891,7 @@ out:
        return retval;
 }
 
-static int fence_wait_timeout(unsigned int *fence_addr,
+static int amdkfd_fence_wait_timeout(unsigned int *fence_addr,
                                unsigned int fence_value,
                                unsigned long timeout)
 {
@@ -947,7 +947,7 @@ static int destroy_queues_cpsch(struct device_queue_manager *dqm, bool lock)
        pm_send_query_status(&dqm->packets, dqm->fence_gpu_addr,
                                KFD_FENCE_COMPLETED);
        /* should be timed out */
-       fence_wait_timeout(dqm->fence_addr, KFD_FENCE_COMPLETED,
+       amdkfd_fence_wait_timeout(dqm->fence_addr, KFD_FENCE_COMPLETED,
                                QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS);
        pm_release_ib(&dqm->packets);
        dqm->active_runlist = false;
--

2.1.0

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel