cregit-Linux how code gets into the kernel

Release 4.18 drivers/gpu/drm/v3d/v3d_fence.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 queue) { struct v3d_fence *fence; fence = kzalloc(sizeof(*fence), GFP_KERNEL); if (!fence) return ERR_PTR(-ENOMEM); fence->dev = &v3d->drm; fence->queue = queue; fence->seqno = ++v3d->queue[queue].emit_seqno; dma_fence_init(&fence->base, &v3d_fence_ops, &v3d->job_lock, v3d->queue[queue].fence_context, fence->seqno); return &fence->base; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt110100.00%1100.00%
Total110100.00%1100.00%


static const char *v3d_fence_get_driver_name(struct dma_fence *fence) { return "v3d"; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt16100.00%1100.00%
Total16100.00%1100.00%


static const char *v3d_fence_get_timeline_name(struct dma_fence *fence) { struct v3d_fence *f = to_v3d_fence(fence); if (f->queue == V3D_BIN) return "v3d-bin"; else return "v3d-render"; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt38100.00%1100.00%
Total38100.00%1100.00%


static bool v3d_fence_enable_signaling(struct dma_fence *fence) { return true; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt14100.00%1100.00%
Total14100.00%1100.00%


static bool v3d_fence_signaled(struct dma_fence *fence) { struct v3d_fence *f = to_v3d_fence(fence); struct v3d_dev *v3d = to_v3d_dev(f->dev); return v3d->queue[f->queue].finished_seqno >= f->seqno; }

Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt49100.00%1100.00%
Total49100.00%1100.00%

const struct dma_fence_ops v3d_fence_ops = { .get_driver_name = v3d_fence_get_driver_name, .get_timeline_name = v3d_fence_get_timeline_name, .enable_signaling = v3d_fence_enable_signaling, .signaled = v3d_fence_signaled, .wait = dma_fence_default_wait, .release = dma_fence_free, };

Overall Contributors

PersonTokensPropCommitsCommitProp
Eric Anholt269100.00%1100.00%
Total269100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.