Commit 3657800a authored by Alon Levy's avatar Alon Levy Committed by Søren Sandmann Pedersen

s/qxl_ram_header/QXLRam/

parent b25d9a5c
......@@ -63,28 +63,6 @@ struct qxl_ring_header {
uint32_t notify_on_cons;
};
#define QXL_LOG_BUF_SIZE 4096
struct qxl_ram_header {
uint32_t magic;
uint32_t int_pending;
uint32_t int_mask;
unsigned char log_buf[QXL_LOG_BUF_SIZE];
struct qxl_ring_header cmd_ring_hdr;
struct QXLCommand cmd_ring[32];
struct qxl_ring_header cursor_ring_hdr;
struct QXLCommand cursor_ring[32];
struct qxl_ring_header release_ring_hdr;
uint64_t release_ring[8];
struct QXLRect update_area;
/* appended for qxl-2 */
uint32_t update_surface;
uint64_t mem_slot_start;
uint64_t mem_slot_end;
struct QXLSurfaceCreate create_surface;
uint64_t flags;
};
#pragma pack(pop)
typedef struct surface_cache_t surface_cache_t;
......@@ -311,10 +289,10 @@ static inline void set_surface (PixmapPtr pixmap, qxl_surface_t *surface)
dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, surface);
}
static inline struct qxl_ram_header *
static inline struct QXLRam *
get_ram_header (qxl_screen_t *qxl)
{
return (struct qxl_ram_header *)
return (struct QXLRam *)
((uint8_t *)qxl->ram + qxl->rom->ram_header_offset);
}
......
......@@ -156,7 +156,7 @@ qxl_allocnf (qxl_screen_t *qxl, unsigned long size)
while (!(result = qxl_alloc (qxl->mem, size)))
{
struct qxl_ram_header *ram_header = (void *)(
struct QXLRam *ram_header = (void *)(
(unsigned long)qxl->ram + qxl->rom->ram_header_offset);
/* Rather than go out of memory, we simply tell the
......@@ -340,7 +340,7 @@ qxl_reset (qxl_screen_t *qxl)
{
qxl_memslot_t *slot;
uint64_t high_bits;
struct qxl_ram_header *ram_header;
struct QXLRam *ram_header;
outb(qxl->io_base + QXL_IO_RESET, 0);
......@@ -367,8 +367,8 @@ qxl_reset (qxl_screen_t *qxl)
slot->start_virt_addr = (uint64_t)(uintptr_t)qxl->ram;
slot->end_virt_addr = slot->start_virt_addr + (unsigned long)qxl->rom->num_pages * getpagesize();
ram_header->mem_slot_start = slot->start_phys_addr;
ram_header->mem_slot_end = slot->end_phys_addr;
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);
......@@ -387,8 +387,8 @@ qxl_reset (qxl_screen_t *qxl)
slot->start_virt_addr = (uint64_t)(uintptr_t)qxl->vram;
slot->end_virt_addr = (uint64_t)(uintptr_t)qxl->vram + (uint64_t)qxl->vram_size;
ram_header->mem_slot_start = slot->start_phys_addr;
ram_header->mem_slot_end = slot->end_phys_addr;
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);
......@@ -826,7 +826,7 @@ qxl_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
qxl_screen_t *qxl = pScrn->driverPrivate;
struct qxl_ram_header *ram_header;
struct QXLRam *ram_header;
VisualPtr visual;
CHECK_POINT();
......@@ -903,13 +903,13 @@ qxl_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
qxl->io_pages = (void *)((unsigned long)qxl->ram);
qxl->io_pages_physical = (void *)((unsigned long)qxl->ram_physical);
qxl->command_ring = qxl_ring_create (&(ram_header->cmd_ring_hdr),
qxl->command_ring = qxl_ring_create (&(ram_header->cmd_ring),
sizeof (struct QXLCommand),
32, qxl->io_base + QXL_IO_NOTIFY_CMD);
qxl->cursor_ring = qxl_ring_create (&(ram_header->cursor_ring_hdr),
qxl->cursor_ring = qxl_ring_create (&(ram_header->cursor_ring),
sizeof (struct QXLCommand),
32, qxl->io_base + QXL_IO_NOTIFY_CURSOR);
qxl->release_ring = qxl_ring_create (&(ram_header->release_ring_hdr),
qxl->release_ring = qxl_ring_create (&(ram_header->release_ring),
sizeof (uint64_t),
8, 0);
......@@ -1027,7 +1027,7 @@ qxl_check_device(ScrnInfoPtr pScrn, qxl_screen_t *qxl)
{
int scrnIndex = pScrn->scrnIndex;
struct QXLRom *rom = qxl->rom;
struct qxl_ram_header *ram_header = (void *)((unsigned long)qxl->ram + rom->ram_header_offset);
struct QXLRam *ram_header = (void *)((unsigned long)qxl->ram + rom->ram_header_offset);
CHECK_POINT();
......
......@@ -343,7 +343,7 @@ qxl_surface_t *
qxl_surface_cache_create_primary (surface_cache_t *cache,
struct QXLMode *mode)
{
struct qxl_ram_header *ram_header =
struct QXLRam *ram_header =
(void *)((unsigned long)cache->qxl->ram + cache->qxl->rom->ram_header_offset);
struct QXLSurfaceCreate *create = &(ram_header->create_surface);
pixman_format_code_t format;
......@@ -904,7 +904,7 @@ qxl_surface_flush (qxl_surface_t *surface)
static void
download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2)
{
struct qxl_ram_header *ram_header = get_ram_header (surface->cache->qxl);
struct QXLRam *ram_header = get_ram_header (surface->cache->qxl);
ram_header->update_area.top = y1;
ram_header->update_area.bottom = y2;
......
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