Commit 141154b6 authored by Alon Levy's avatar Alon Levy

partially replace outb with ioport_write

replace everywhere it is needed for xspice - places left out are ifdefed
out later based on the same define mentioned in qxl.h, XSPICE.
parent e59bb1a7
......@@ -336,4 +336,9 @@ void * qxl_allocnf (qxl_screen_t *qxl,
unsigned long size);
int qxl_garbage_collect (qxl_screen_t *qxl);
static inline void ioport_write(qxl_screen_t *qxl, int port, int val)
{
outb(qxl->io_base + port, val);
}
#endif // QXL_H
......@@ -130,7 +130,7 @@ qxl_usleep (int useconds)
int
qxl_handle_oom (qxl_screen_t *qxl)
{
outb (qxl->io_base + QXL_IO_NOTIFY_OOM, 0);
ioport_write(qxl, QXL_IO_NOTIFY_OOM, 0);
#if 0
ErrorF (".");
......@@ -168,7 +168,7 @@ qxl_allocnf (qxl_screen_t *qxl, unsigned long size)
ram_header->update_area.right = qxl->virtual_x;
ram_header->update_surface = 0; /* Only primary for now */
outb (qxl->io_base + QXL_IO_UPDATE_AREA, 0);
ioport_write(qxl, QXL_IO_UPDATE_AREA, 0);
#if 0
ErrorF ("eliminated memory (%d)\n", nth_oom++);
......@@ -342,7 +342,7 @@ qxl_reset (qxl_screen_t *qxl)
uint64_t high_bits;
struct QXLRam *ram_header;
outb(qxl->io_base + QXL_IO_RESET, 0);
ioport_write(qxl, QXL_IO_RESET, 0);
ram_header = (void *)((unsigned long)qxl->ram + (unsigned long)qxl->rom->ram_header_offset);
......@@ -370,7 +370,7 @@ qxl_reset (qxl_screen_t *qxl)
ram_header->mem_slot.mem_start = slot->start_phys_addr;
ram_header->mem_slot.mem_end = slot->end_phys_addr;
outb (qxl->io_base + QXL_IO_MEMSLOT_ADD, qxl->main_mem_slot);
ioport_write(qxl, QXL_IO_MEMSLOT_ADD, qxl->main_mem_slot);
slot->generation = qxl->rom->slot_generation;
......@@ -390,7 +390,7 @@ qxl_reset (qxl_screen_t *qxl)
ram_header->mem_slot.mem_start = slot->start_phys_addr;
ram_header->mem_slot.mem_end = slot->end_phys_addr;
outb (qxl->io_base + QXL_IO_MEMSLOT_ADD, qxl->vram_mem_slot);
ioport_write(qxl, QXL_IO_MEMSLOT_ADD, qxl->vram_mem_slot);
slot->generation = qxl->rom->slot_generation;
......
......@@ -88,8 +88,9 @@ qxl_ring_push (struct qxl_ring *ring,
mem_barrier();
if (header->prod == header->notify_on_prod)
outb (ring->qxl->io_base + ring->io_port_prod_notify, 0);
if (header->prod == header->notify_on_prod) {
ioport_write (ring->qxl, ring->io_port_prod_notify, 0);
}
}
Bool
......
......@@ -378,7 +378,7 @@ qxl_surface_cache_create_primary (surface_cache_t *cache,
create->type = QXL_SURF_TYPE_PRIMARY;
create->mem = physical_address (cache->qxl, cache->qxl->ram, cache->qxl->main_mem_slot);
outb (qxl->io_base + QXL_IO_CREATE_PRIMARY, 0);
ioport_write(qxl, QXL_IO_CREATE_PRIMARY, 0);
dev_addr = (uint8_t *)qxl->ram + mode->stride * (mode->y_res - 1);
......@@ -920,7 +920,7 @@ download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2)
ErrorF ("Issuing update command for %d\n", surface->id);
#endif
outb (surface->cache->qxl->io_base + QXL_IO_UPDATE_AREA, 0);
ioport_write(surface->cache->qxl, QXL_IO_UPDATE_AREA, 0);
pixman_image_composite (PIXMAN_OP_SRC,
surface->dev_image,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment