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

/*
 * Copyright 2013 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
 * 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 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 HOLDER(S) OR AUTHOR(S) 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.
 *
 * Authors: Dave Airlie
 *          Alon Levy
 */

/* QXL cmd/ring handling */

#include <linux/delay.h>

#include <drm/drm_util.h>

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

static int qxl_reap_surface_id(struct qxl_device *qdev, int max_to_reap);

struct ring {};

struct qxl_ring {};

void qxl_ring_free(struct qxl_ring *ring)
{}

struct qxl_ring *
qxl_ring_create(struct qxl_ring_header *header,
		int element_size,
		int n_elements,
		int prod_notify,
		wait_queue_head_t *push_event)
{}

static int qxl_check_header(struct qxl_ring *ring)
{}

int qxl_check_idle(struct qxl_ring *ring)
{}

int qxl_ring_push(struct qxl_ring *ring,
		  const void *new_elt, bool interruptible)
{}

static bool qxl_ring_pop(struct qxl_ring *ring,
			 void *element)
{}

int
qxl_push_command_ring_release(struct qxl_device *qdev, struct qxl_release *release,
			      uint32_t type, bool interruptible)
{}

int
qxl_push_cursor_ring_release(struct qxl_device *qdev, struct qxl_release *release,
			     uint32_t type, bool interruptible)
{}

bool qxl_queue_garbage_collect(struct qxl_device *qdev, bool flush)
{}

int qxl_garbage_collect(struct qxl_device *qdev)
{}

int qxl_alloc_bo_reserved(struct qxl_device *qdev,
			  struct qxl_release *release,
			  unsigned long size,
			  struct qxl_bo **_bo)
{}

static int wait_for_io_cmd_user(struct qxl_device *qdev, uint8_t val, long port, bool intr)
{}

static void wait_for_io_cmd(struct qxl_device *qdev, uint8_t val, long port)
{}

int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf,
			const struct qxl_rect *area)
{}

void qxl_io_notify_oom(struct qxl_device *qdev)
{}

void qxl_io_flush_release(struct qxl_device *qdev)
{}

void qxl_io_flush_surfaces(struct qxl_device *qdev)
{}

void qxl_io_destroy_primary(struct qxl_device *qdev)
{}

void qxl_io_create_primary(struct qxl_device *qdev, struct qxl_bo *bo)
{}

void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id)
{}

void qxl_io_reset(struct qxl_device *qdev)
{}

void qxl_io_monitors_config(struct qxl_device *qdev)
{}

int qxl_surface_id_alloc(struct qxl_device *qdev,
		      struct qxl_bo *surf)
{}

void qxl_surface_id_dealloc(struct qxl_device *qdev,
			    uint32_t surface_id)
{}

int qxl_hw_surface_alloc(struct qxl_device *qdev,
			 struct qxl_bo *surf)
{}

int qxl_hw_surface_dealloc(struct qxl_device *qdev,
			   struct qxl_bo *surf)
{}

static int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf)
{}

static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
{}

void qxl_surface_evict(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
{}

static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stall)
{}

static int qxl_reap_surface_id(struct qxl_device *qdev, int max_to_reap)
{}