aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0219-drm-amdgpu-cleanup-amdgpu_cs_parser-structure.patch
blob: 791c2584cbab1e8c5c25dad8f21b7f348894693c (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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 72838599f8c5280d4540f4f85f55248a0c31b89f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
Date: Tue, 15 Dec 2015 14:41:33 +0100
Subject: [PATCH 0219/1110] drm/amdgpu: cleanup amdgpu_cs_parser structure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Remove unused user_ptr field, group fields by usage.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h    | 24 ++++++++++++------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |  1 -
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 35d5221..8676505 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1214,28 +1214,28 @@ struct amdgpu_cs_chunk {
 	uint32_t		chunk_id;
 	uint32_t		length_dw;
 	uint32_t		*kdata;
-	void __user		*user_ptr;
 };
 
 struct amdgpu_cs_parser {
 	struct amdgpu_device	*adev;
 	struct drm_file		*filp;
 	struct amdgpu_ctx	*ctx;
-	struct amdgpu_bo_list *bo_list;
+	
 	/* chunks */
 	unsigned		nchunks;
 	struct amdgpu_cs_chunk	*chunks;
-	/* relocations */
-        struct amdgpu_bo_list_entry     vm_pd;
-	struct list_head	validated;
-	struct fence		*fence;
-        uint64_t                bytes_moved_threshold;
-        uint64_t                bytes_moved;
-
-	struct amdgpu_ib	*ibs;
+        /* indirect buffers */
 	uint32_t		num_ibs;
-
-	struct ww_acquire_ctx	ticket;
+	struct amdgpu_ib	*ibs;
+ 
+       /* buffer objects */
+         struct ww_acquire_ctx           ticket;
+         struct amdgpu_bo_list           *bo_list;
+         struct amdgpu_bo_list_entry     vm_pd;
+         struct list_head                validated;
+         struct fence                    *fence;
+         uint64_t                        bytes_moved_threshold;
+         uint64_t                        bytes_moved;
 
 	/* user fence */
 	struct amdgpu_user_fence	uf;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index c4b4290..f94469d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -217,7 +217,6 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
 
 		size = p->chunks[i].length_dw;
 		cdata = (void __user *)(unsigned long)user_chunk.chunk_data;
-		p->chunks[i].user_ptr = cdata;
 
 		p->chunks[i].kdata = drm_malloc_ab(size, sizeof(uint32_t));
 		if (p->chunks[i].kdata == NULL) {
-- 
2.7.4