mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 23:34:00 -04:00
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/* Copyright (C) 2017-2018 Broadcom */
|
|
|
|
#include "v3d_drv.h"
|
|
|
|
struct dma_fence *v3d_fence_create(struct v3d_dev *v3d, enum v3d_queue q)
|
|
{
|
|
struct v3d_queue_state *queue = &v3d->queue[q];
|
|
struct v3d_fence *fence;
|
|
|
|
fence = kzalloc_obj(*fence);
|
|
if (!fence)
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
fence->dev = &v3d->drm;
|
|
fence->queue = q;
|
|
fence->seqno = ++queue->emit_seqno;
|
|
dma_fence_init(&fence->base, &v3d_fence_ops, &queue->fence_lock,
|
|
queue->fence_context, fence->seqno);
|
|
|
|
return &fence->base;
|
|
}
|
|
|
|
static const char *v3d_fence_get_driver_name(struct dma_fence *fence)
|
|
{
|
|
return "v3d";
|
|
}
|
|
|
|
static const char *v3d_fence_get_timeline_name(struct dma_fence *fence)
|
|
{
|
|
struct v3d_fence *f = to_v3d_fence(fence);
|
|
|
|
switch (f->queue) {
|
|
case V3D_BIN:
|
|
return "v3d-bin";
|
|
case V3D_RENDER:
|
|
return "v3d-render";
|
|
case V3D_TFU:
|
|
return "v3d-tfu";
|
|
case V3D_CSD:
|
|
return "v3d-csd";
|
|
default:
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
const struct dma_fence_ops v3d_fence_ops = {
|
|
.get_driver_name = v3d_fence_get_driver_name,
|
|
.get_timeline_name = v3d_fence_get_timeline_name,
|
|
};
|