| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2013-2016 Red Hat |
|---|
| 3 | 4 | * Author: Rob Clark <robdclark@gmail.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 7 | | - * the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 15 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 16 | 5 | */ |
|---|
| 17 | 6 | |
|---|
| 18 | 7 | #include <linux/dma-fence.h> |
|---|
| .. | .. |
|---|
| 31 | 20 | return ERR_PTR(-ENOMEM); |
|---|
| 32 | 21 | |
|---|
| 33 | 22 | fctx->dev = dev; |
|---|
| 34 | | - strncpy(fctx->name, name, sizeof(fctx->name)); |
|---|
| 23 | + strscpy(fctx->name, name, sizeof(fctx->name)); |
|---|
| 35 | 24 | fctx->context = dma_fence_context_alloc(1); |
|---|
| 36 | 25 | init_waitqueue_head(&fctx->event); |
|---|
| 37 | 26 | spin_lock_init(&fctx->spinlock); |
|---|
| .. | .. |
|---|
| 119 | 108 | return f->fctx->name; |
|---|
| 120 | 109 | } |
|---|
| 121 | 110 | |
|---|
| 122 | | -static bool msm_fence_enable_signaling(struct dma_fence *fence) |
|---|
| 123 | | -{ |
|---|
| 124 | | - return true; |
|---|
| 125 | | -} |
|---|
| 126 | | - |
|---|
| 127 | 111 | static bool msm_fence_signaled(struct dma_fence *fence) |
|---|
| 128 | 112 | { |
|---|
| 129 | 113 | struct msm_fence *f = to_msm_fence(fence); |
|---|
| .. | .. |
|---|
| 133 | 117 | static const struct dma_fence_ops msm_fence_ops = { |
|---|
| 134 | 118 | .get_driver_name = msm_fence_get_driver_name, |
|---|
| 135 | 119 | .get_timeline_name = msm_fence_get_timeline_name, |
|---|
| 136 | | - .enable_signaling = msm_fence_enable_signaling, |
|---|
| 137 | 120 | .signaled = msm_fence_signaled, |
|---|
| 138 | | - .wait = dma_fence_default_wait, |
|---|
| 139 | | - .release = dma_fence_free, |
|---|
| 140 | 121 | }; |
|---|
| 141 | 122 | |
|---|
| 142 | 123 | struct dma_fence * |
|---|