diff options
author | Dave Airlie <airlied@redhat.com> | 2013-07-04 14:58:45 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-07-05 10:44:17 +1000 |
commit | 1e209117dbe00d3d87db1c5266f177eaa60451c8 (patch) | |
tree | 4e7e856989cf2c2c0b17bd6717c9be68024e5cc2 /drivers/gpu/drm/qxl | |
parent | c9fdda2a2b7a8875db3eebd89e428aa760afb897 (diff) | |
download | kernel-common-1e209117dbe00d3d87db1c5266f177eaa60451c8.tar.gz kernel-common-1e209117dbe00d3d87db1c5266f177eaa60451c8.tar.bz2 kernel-common-1e209117dbe00d3d87db1c5266f177eaa60451c8.zip |
qxl: add ring prep code for s/r
This prepare the ring code for s/r additions, the release ring will need
reinitialising.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_cmd.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_drv.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 92cf1afd60e5..93c2f2cceb51 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -49,6 +49,11 @@ void qxl_ring_free(struct qxl_ring *ring) kfree(ring); } +void qxl_ring_init_hdr(struct qxl_ring *ring) +{ + ring->ring->header.notify_on_prod = ring->n_elements; +} + struct qxl_ring * qxl_ring_create(struct qxl_ring_header *header, int element_size, @@ -69,7 +74,7 @@ qxl_ring_create(struct qxl_ring_header *header, ring->prod_notify = prod_notify; ring->push_event = push_event; if (set_prod_notify) - header->notify_on_prod = ring->n_elements; + qxl_ring_init_hdr(ring); spin_lock_init(&ring->lock); return ring; } @@ -87,7 +92,7 @@ static int qxl_check_header(struct qxl_ring *ring) return ret; } -static int qxl_check_idle(struct qxl_ring *ring) +int qxl_check_idle(struct qxl_ring *ring) { int ret; struct qxl_ring_header *header = &(ring->ring->header); diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 056330e5fecf..aec9f1f9c814 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -340,6 +340,8 @@ struct qxl_ring *qxl_ring_create(struct qxl_ring_header *header, bool set_prod_notify, wait_queue_head_t *push_event); void qxl_ring_free(struct qxl_ring *ring); +void qxl_ring_init_hdr(struct qxl_ring *ring); +int qxl_check_idle(struct qxl_ring *ring); static inline void * qxl_fb_virtual_address(struct qxl_device *qdev, unsigned long physical) |