forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/dma-buf/sw_sync.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Sync File validation framework
34 *
45 * Copyright (C) 2012 Google, Inc.
5
- *
6
- * This software is licensed under the terms of the GNU General Public
7
- * License version 2, as published by the Free Software Foundation, and
8
- * may be copied, distributed, and modified under those terms.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
156 */
167
178 #include <linux/file.h>
....@@ -160,7 +151,7 @@
160151 {
161152 struct sync_timeline *parent = dma_fence_parent(fence);
162153
163
- return !__dma_fence_is_later(fence->seqno, parent->value);
154
+ return !__dma_fence_is_later(fence->seqno, parent->value, fence->ops);
164155 }
165156
166157 static bool timeline_fence_enable_signaling(struct dma_fence *fence)
....@@ -171,7 +162,7 @@
171162 static void timeline_fence_value_str(struct dma_fence *fence,
172163 char *str, int size)
173164 {
174
- snprintf(str, size, "%d", fence->seqno);
165
+ snprintf(str, size, "%lld", fence->seqno);
175166 }
176167
177168 static void timeline_fence_timeline_value_str(struct dma_fence *fence,
....@@ -200,12 +191,9 @@
200191 * A sync implementation should call this any time one of it's fences
201192 * has signaled or has an error condition.
202193 */
203
-void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)
194
+static void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc)
204195 {
205196 struct sync_pt *pt, *next;
206
-
207
- if (WARN_ON(!obj))
208
- return;
209197
210198 trace_sync_timeline(obj);
211199
....@@ -233,7 +221,6 @@
233221
234222 spin_unlock_irq(&obj->lock);
235223 }
236
-EXPORT_SYMBOL(sync_timeline_signal);
237224
238225 /**
239226 * sync_pt_create() - creates a sync pt
....@@ -423,7 +410,7 @@
423410 .open = sw_sync_debugfs_open,
424411 .release = sw_sync_debugfs_release,
425412 .unlocked_ioctl = sw_sync_ioctl,
426
- .compat_ioctl = sw_sync_ioctl,
413
+ .compat_ioctl = compat_ptr_ioctl,
427414 };
428415
429416 static struct miscdevice sw_sync_dev = {