eb96ad5dffe525fe3ed8e21c03fd6c86b14fca57
[openwrt/staging/wigyori.git] /
1 From 0bb404fbd28594eaa21a180d175a64e85c94b01c Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Wed, 28 Nov 2018 15:09:26 -0800
4 Subject: [PATCH 564/782] drm/v3d: Drop the "dev" argument to lock/unlock of BO
5 reservations.
6
7 They were unused, as Dave Emett noticed in TFU review.
8
9 Signed-off-by: Eric Anholt <eric@anholt.net>
10 Cc: Dave Emett <david.emett@broadcom.com>
11 Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-2-eric@anholt.net
12 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 (cherry picked from commit e14a07fc4b961a75f6c275d6bd670ba54fbdae14)
14 ---
15 drivers/gpu/drm/v3d/v3d_gem.c | 20 +++++++++-----------
16 1 file changed, 9 insertions(+), 11 deletions(-)
17
18 --- a/drivers/gpu/drm/v3d/v3d_gem.c
19 +++ b/drivers/gpu/drm/v3d/v3d_gem.c
20 @@ -219,8 +219,7 @@ v3d_attach_object_fences(struct v3d_bo *
21 }
22
23 static void
24 -v3d_unlock_bo_reservations(struct drm_device *dev,
25 - struct v3d_bo **bos,
26 +v3d_unlock_bo_reservations(struct v3d_bo **bos,
27 int bo_count,
28 struct ww_acquire_ctx *acquire_ctx)
29 {
30 @@ -240,8 +239,7 @@ v3d_unlock_bo_reservations(struct drm_de
31 * to v3d, so we don't attach dma-buf fences to them.
32 */
33 static int
34 -v3d_lock_bo_reservations(struct drm_device *dev,
35 - struct v3d_bo **bos,
36 +v3d_lock_bo_reservations(struct v3d_bo **bos,
37 int bo_count,
38 struct ww_acquire_ctx *acquire_ctx)
39 {
40 @@ -298,7 +296,7 @@ retry:
41 for (i = 0; i < bo_count; i++) {
42 ret = reservation_object_reserve_shared(bos[i]->resv);
43 if (ret) {
44 - v3d_unlock_bo_reservations(dev, bos, bo_count,
45 + v3d_unlock_bo_reservations(bos, bo_count,
46 acquire_ctx);
47 return ret;
48 }
49 @@ -566,7 +564,7 @@ v3d_submit_cl_ioctl(struct drm_device *d
50 if (ret)
51 goto fail;
52
53 - ret = v3d_lock_bo_reservations(dev, exec->bo, exec->bo_count,
54 + ret = v3d_lock_bo_reservations(exec->bo, exec->bo_count,
55 &acquire_ctx);
56 if (ret)
57 goto fail;
58 @@ -604,7 +602,7 @@ v3d_submit_cl_ioctl(struct drm_device *d
59 v3d_attach_object_fences(exec->bo, exec->bo_count,
60 exec->render_done_fence);
61
62 - v3d_unlock_bo_reservations(dev, exec->bo, exec->bo_count, &acquire_ctx);
63 + v3d_unlock_bo_reservations(exec->bo, exec->bo_count, &acquire_ctx);
64
65 /* Update the return sync object for the */
66 sync_out = drm_syncobj_find(file_priv, args->out_sync);
67 @@ -620,7 +618,7 @@ v3d_submit_cl_ioctl(struct drm_device *d
68
69 fail_unreserve:
70 mutex_unlock(&v3d->sched_lock);
71 - v3d_unlock_bo_reservations(dev, exec->bo, exec->bo_count, &acquire_ctx);
72 + v3d_unlock_bo_reservations(exec->bo, exec->bo_count, &acquire_ctx);
73 fail:
74 v3d_exec_put(exec);
75
76 @@ -691,7 +689,7 @@ v3d_submit_tfu_ioctl(struct drm_device *
77 }
78 spin_unlock(&file_priv->table_lock);
79
80 - ret = v3d_lock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx);
81 + ret = v3d_lock_bo_reservations(job->bo, bo_count, &acquire_ctx);
82 if (ret)
83 goto fail;
84
85 @@ -710,7 +708,7 @@ v3d_submit_tfu_ioctl(struct drm_device *
86
87 v3d_attach_object_fences(job->bo, bo_count, sched_done_fence);
88
89 - v3d_unlock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx);
90 + v3d_unlock_bo_reservations(job->bo, bo_count, &acquire_ctx);
91
92 /* Update the return sync object */
93 sync_out = drm_syncobj_find(file_priv, args->out_sync);
94 @@ -726,7 +724,7 @@ v3d_submit_tfu_ioctl(struct drm_device *
95
96 fail_unreserve:
97 mutex_unlock(&v3d->sched_lock);
98 - v3d_unlock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx);
99 + v3d_unlock_bo_reservations(job->bo, bo_count, &acquire_ctx);
100 fail:
101 v3d_tfu_job_put(job);
102