#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)
{ … }