aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1611-drm-amdkfd-Fix-error-messages-about-updating-wrong-V.patch
blob: 7cbdb8eb8b037837f08b4058893120794a9c8221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 59ddbe2697c7c38e652ee7ae06aa79fbbf398107 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Tue, 28 Feb 2017 15:15:41 -0500
Subject: [PATCH 1611/4131] drm/amdkfd: Fix error messages about updating wrong
 VMID

Don't try to set the page table base for a QPD that doesn't have a
valid VMID. A VMID is only assigned as long as queues exist. So check
if the queue list is empty first.

Change-Id: Ie9e5dcc8547030c08d78dac8d41315321bea74ce
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 d1edbfc..bb7fdc3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -583,7 +583,8 @@ int process_restore_queues(struct device_queue_manager *dqm,
 	qpd->page_table_base = pd_base;
 	pr_debug("Updated PD address to 0x%08x in %s\n", pd_base, __func__);
 
-	if (dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS) {
+	if (dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS &&
+	    !list_empty(&qpd->queues_list)) {
 		dqm->dev->kfd2kgd->set_vm_context_page_table_base(
 				dqm->dev->kgd,
 				qpd->vmid,
-- 
2.7.4