linux/drivers/gpu/drm/nouveau/nouveau_fence.c

/*
 * Copyright (C) 2007 Ben Skeggs.
 * All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/sched/signal.h>
#include <trace/events/dma_fence.h>

#include <nvif/if0020.h>

#include "nouveau_drv.h"
#include "nouveau_dma.h"
#include "nouveau_fence.h"

static const struct dma_fence_ops nouveau_fence_ops_uevent;
static const struct dma_fence_ops nouveau_fence_ops_legacy;

static inline struct nouveau_fence *
from_fence(struct dma_fence *fence)
{}

static inline struct nouveau_fence_chan *
nouveau_fctx(struct nouveau_fence *fence)
{}

static int
nouveau_fence_signal(struct nouveau_fence *fence)
{}

static struct nouveau_fence *
nouveau_local_fence(struct dma_fence *fence, struct nouveau_drm *drm)
{}

void
nouveau_fence_context_kill(struct nouveau_fence_chan *fctx, int error)
{}

void
nouveau_fence_context_del(struct nouveau_fence_chan *fctx)
{}

static void
nouveau_fence_context_put(struct kref *fence_ref)
{}

void
nouveau_fence_context_free(struct nouveau_fence_chan *fctx)
{}

static int
nouveau_fence_update(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
{}

static void
nouveau_fence_uevent_work(struct work_struct *work)
{}

static int
nouveau_fence_wait_uevent_handler(struct nvif_event *event, void *repv, u32 repc)
{}

void
nouveau_fence_context_new(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
{}

int
nouveau_fence_emit(struct nouveau_fence *fence)
{}

bool
nouveau_fence_done(struct nouveau_fence *fence)
{}

static long
nouveau_fence_wait_legacy(struct dma_fence *f, bool intr, long wait)
{}

static int
nouveau_fence_wait_busy(struct nouveau_fence *fence, bool intr)
{}

int
nouveau_fence_wait(struct nouveau_fence *fence, bool lazy, bool intr)
{}

int
nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan,
		   bool exclusive, bool intr)
{}

void
nouveau_fence_unref(struct nouveau_fence **pfence)
{}

int
nouveau_fence_create(struct nouveau_fence **pfence,
		     struct nouveau_channel *chan)
{}

int
nouveau_fence_new(struct nouveau_fence **pfence,
		  struct nouveau_channel *chan)
{}

static const char *nouveau_fence_get_get_driver_name(struct dma_fence *fence)
{}

static const char *nouveau_fence_get_timeline_name(struct dma_fence *f)
{}

/*
 * In an ideal world, read would not assume the channel context is still alive.
 * This function may be called from another device, running into free memory as a
 * result. The drm node should still be there, so we can derive the index from
 * the fence context.
 */
static bool nouveau_fence_is_signaled(struct dma_fence *f)
{}

static bool nouveau_fence_no_signaling(struct dma_fence *f)
{}

static void nouveau_fence_release(struct dma_fence *f)
{}

static const struct dma_fence_ops nouveau_fence_ops_legacy =;

static bool nouveau_fence_enable_signaling(struct dma_fence *f)
{}

static const struct dma_fence_ops nouveau_fence_ops_uevent =;