linux/drivers/gpu/drm/qxl/qxl_release.c

/*
 * Copyright 2011 Red Hat, Inc.
 *
 * 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
 * on the rights to use, copy, modify, merge, publish, distribute, sub
 * license, 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 NON-INFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS 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/delay.h>

#include <trace/events/dma_fence.h>

#include "qxl_drv.h"
#include "qxl_object.h"

/*
 * drawable cmd cache - allocate a bunch of VRAM pages, suballocate
 * into 256 byte chunks for now - gives 16 cmds per page.
 *
 * use an ida to index into the chunks?
 */
/* manage releaseables */
/* stack them 16 high for now -drawable object is 191 */
#define RELEASE_SIZE
#define RELEASES_PER_BO
/* put an alloc/dealloc surface cmd into one bo and round up to 128 */
#define SURFACE_RELEASE_SIZE
#define SURFACE_RELEASES_PER_BO

static const int release_size_per_bo[] =;
static const int releases_per_bo[] =;

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

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

static long qxl_fence_wait(struct dma_fence *fence, bool intr,
			   signed long timeout)
{}

static const struct dma_fence_ops qxl_fence_ops =;

static int
qxl_release_alloc(struct qxl_device *qdev, int type,
		  struct qxl_release **ret)
{}

static void
qxl_release_free_list(struct qxl_release *release)
{}

void
qxl_release_free(struct qxl_device *qdev,
		 struct qxl_release *release)
{}

static int qxl_release_bo_alloc(struct qxl_device *qdev,
				struct qxl_bo **bo,
				u32 priority)
{}

int qxl_release_list_add(struct qxl_release *release, struct qxl_bo *bo)
{}

static int qxl_release_validate_bo(struct qxl_bo *bo)
{}

int qxl_release_reserve_list(struct qxl_release *release, bool no_intr)
{}

void qxl_release_backoff_reserve_list(struct qxl_release *release)
{}

int qxl_alloc_surface_release_reserved(struct qxl_device *qdev,
				       enum qxl_surface_cmd_type surface_cmd_type,
				       struct qxl_release *create_rel,
				       struct qxl_release **release)
{}

int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size,
				       int type, struct qxl_release **release,
				       struct qxl_bo **rbo)
{}

struct qxl_release *qxl_release_from_id_locked(struct qxl_device *qdev,
						   uint64_t id)
{}

union qxl_release_info *qxl_release_map(struct qxl_device *qdev,
					struct qxl_release *release)
{}

void qxl_release_unmap(struct qxl_device *qdev,
		       struct qxl_release *release,
		       union qxl_release_info *info)
{}

void qxl_release_fence_buffer_objects(struct qxl_release *release)
{}