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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
From a374a1ae04d12cbfb2f715be2928bef814afcf66 Mon Sep 17 00:00:00 2001
From: Yong Zhao <yong.zhao@amd.com>
Date: Tue, 20 Sep 2016 15:00:12 -0400
Subject: [PATCH 1195/4131] drm/amdkfd: Cosmetic changes for easier debugging
Change-Id: I5012034a58d9fa8637ea5f11a3bc651979162e4e
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 134b1de..c3e54d9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -1292,6 +1292,7 @@ static int kfd_ioctl_alloc_memory_of_gpu_new(struct file *filep,
int idr_handle;
long err;
uint64_t offset;
+ uint32_t alloc_flags = 0;
if (args->size == 0)
return -EINVAL;
@@ -1312,11 +1313,13 @@ static int kfd_ioctl_alloc_memory_of_gpu_new(struct file *filep,
offset = kfd_get_process_doorbells(dev, p);
} else
offset = args->mmap_offset;
+
+ alloc_flags = kfd_convert_user_mem_alloction_flags(dev, args->flags);
+
err = dev->kfd2kgd->alloc_memory_of_gpu(
dev->kgd, args->va_addr, args->size,
pdd->vm, (struct kgd_mem **) &mem, &offset,
- NULL, pdd,
- kfd_convert_user_mem_alloction_flags(dev, args->flags));
+ NULL, pdd, alloc_flags);
if (err != 0)
return err;
@@ -2012,8 +2015,8 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
} else
goto err_i1;
- dev_dbg(kfd_device, "ioctl cmd 0x%x (#0x%x), arg 0x%lx\n",
- cmd, nr, arg);
+ dev_dbg(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx\n",
+ nr, arg);
process = kfd_get_process(current);
if (IS_ERR(process)) {
@@ -2068,7 +2071,8 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
kfree(kdata);
if (retcode)
- dev_dbg(kfd_device, "ret = %d\n", retcode);
+ dev_dbg(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx, failed %d\n",
+ nr, arg, retcode);
return retcode;
}
--
2.7.4
|