Skip to content

Commit

Permalink
Merge branch 'qxl-next' of git://people.freedesktop.org/~airlied/linu…
Browse files Browse the repository at this point in the history
…x into drm-next

Adds 3 features that UMS had to the KMS driver.
dynamic resizing - resizing remote-viewer makes guest resize
multiple crtcs - remote-viewer can access > 1 crtc.
suspend/resume/hibernate: guests can do suspend/resume/hibernate now.

* 'qxl-next' of git://people.freedesktop.org/~airlied/linux:
  qxl: use drm helper hotplug support
  qxl: add suspend/resume/hibernate support.
  qxl: add fb and ttm entry points for use by suspend/resume.
  qxl: add ring prep code for s/r
  qxl: prepare memslot code for suspend/resume
  qxl: split monitors_config object creation out.
  drm/qxl: set time on drawables from userspace
  drm/qxl: add support for > 1 output
  drm/qxl: make dynamic resizing work properly.
  • Loading branch information
Dave Airlie committed Jul 5, 2013
2 parents 69163ea + 5ff91e4 commit 7c6ca30
Show file tree
Hide file tree
Showing 8 changed files with 326 additions and 128 deletions.
17 changes: 11 additions & 6 deletions drivers/gpu/drm/qxl/qxl_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
Expand All @@ -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);
Expand Down Expand Up @@ -375,17 +380,17 @@ void qxl_io_destroy_primary(struct qxl_device *qdev)
wait_for_io_cmd(qdev, 0, QXL_IO_DESTROY_PRIMARY_ASYNC);
}

void qxl_io_create_primary(struct qxl_device *qdev, unsigned width,
unsigned height, unsigned offset, struct qxl_bo *bo)
void qxl_io_create_primary(struct qxl_device *qdev,
unsigned offset, struct qxl_bo *bo)
{
struct qxl_surface_create *create;

QXL_INFO(qdev, "%s: qdev %p, ram_header %p\n", __func__, qdev,
qdev->ram_header);
create = &qdev->ram_header->create_surface;
create->format = bo->surf.format;
create->width = width;
create->height = height;
create->width = bo->surf.width;
create->height = bo->surf.height;
create->stride = bo->surf.stride;
create->mem = qxl_bo_physical_address(qdev, bo, offset);

Expand Down
Loading

0 comments on commit 7c6ca30

Please sign in to comment.