Commit e531761d authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Merge remote-tracking branch 'kraxel/pixman.v8' into staging

# By Gerd Hoffmann (18) and others
# Via Blue Swirl (1) and Gerd Hoffmann (1)
* kraxel/pixman.v8: (37 commits)
  console: remove ds_get_* helper functions
  console: zap color_table
  console: stop using DisplayState in gfx hardware emulation
  console: zap displaystate from dcl callbacks
  cocoa: stop using DisplayState
  spice: stop using DisplayState
  sdl: stop using DisplayState
  vnc: stop using DisplayState
  gtk: stop using DisplayState
  console: add surface_*() getters
  console: rework DisplaySurface handling [dcl/ui side]
  console: rework DisplaySurface handling [vga emu side]
  sdl: drop dead code
  qxl: better vga init in enter_vga_mode
  qxl: zap qxl0 global
  spice: zap sdpy global
  console: kill DisplayState->opaque
  console: fix displaychangelisteners interface
  s390: Fix cpu refactoring fallout.
  target-mips: fix rndrashift_short_acc and code for EXTR_ instructions
  ...
parents b1999e87 1562e531
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ CONFIG_PL110=y
CONFIG_PL181=y
CONFIG_PL190=y
CONFIG_PL310=y
CONFIG_PL330=y
CONFIG_CADENCE=y
CONFIG_XGMAC=y

+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ common-obj-$(CONFIG_PL110) += pl110.o
common-obj-$(CONFIG_PL181) += pl181.o
common-obj-$(CONFIG_PL190) += pl190.o
common-obj-$(CONFIG_PL310) += arm_l2x0.o
common-obj-$(CONFIG_PL330) += pl330.o
common-obj-$(CONFIG_VERSATILE_PCI) += versatile_pci.o
common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
common-obj-$(CONFIG_CADENCE) += cadence_uart.o
+11 −9
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ typedef struct musicpal_lcd_state {
    uint32_t irqctrl;
    uint32_t page;
    uint32_t page_off;
    DisplayState *ds;
    QemuConsole *con;
    uint8_t video_ram[128*64/8];
} musicpal_lcd_state;

@@ -483,7 +483,8 @@ static inline void glue(set_lcd_pixel, depth) \
        (musicpal_lcd_state *s, int x, int y, type col) \
{ \
    int dx, dy; \
    type *pixel = &((type *) ds_get_data(s->ds))[(y * 128 * 3 + x) * 3]; \
    DisplaySurface *surface = qemu_console_surface(s->con); \
    type *pixel = &((type *) surface_data(surface))[(y * 128 * 3 + x) * 3]; \
\
    for (dy = 0; dy < 3; dy++, pixel += 127 * 3) \
        for (dx = 0; dx < 3; dx++, pixel++) \
@@ -496,9 +497,10 @@ SET_LCD_PIXEL(32, uint32_t)
static void lcd_refresh(void *opaque)
{
    musicpal_lcd_state *s = opaque;
    DisplaySurface *surface = qemu_console_surface(s->con);
    int x, y, col;

    switch (ds_get_bits_per_pixel(s->ds)) {
    switch (surface_bits_per_pixel(surface)) {
    case 0:
        return;
#define LCD_REFRESH(depth, func) \
@@ -518,14 +520,14 @@ static void lcd_refresh(void *opaque)
        break;
    LCD_REFRESH(8, rgb_to_pixel8)
    LCD_REFRESH(16, rgb_to_pixel16)
    LCD_REFRESH(32, (is_surface_bgr(s->ds->surface) ?
    LCD_REFRESH(32, (is_surface_bgr(surface) ?
                     rgb_to_pixel32bgr : rgb_to_pixel32))
    default:
        hw_error("unsupported colour depth %i\n",
                  ds_get_bits_per_pixel(s->ds));
                 surface_bits_per_pixel(surface));
    }

    dpy_gfx_update(s->ds, 0, 0, 128*3, 64*3);
    dpy_gfx_update(s->con, 0, 0, 128*3, 64*3);
}

static void lcd_invalidate(void *opaque)
@@ -609,9 +611,9 @@ static int musicpal_lcd_init(SysBusDevice *dev)
                          "musicpal-lcd", MP_LCD_SIZE);
    sysbus_init_mmio(dev, &s->iomem);

    s->ds = graphic_console_init(lcd_refresh, lcd_invalidate,
    s->con = graphic_console_init(lcd_refresh, lcd_invalidate,
                                  NULL, NULL, s);
    qemu_console_resize(s->ds, 128*3, 64*3);
    qemu_console_resize(s->con, 128*3, 64*3);

    qdev_init_gpio_in(&dev->qdev, musicpal_lcd_gpio_brigthness_in, 3);

+0 −7
Original line number Diff line number Diff line
@@ -1290,7 +1290,6 @@ static void n8x0_init(QEMUMachineInitArgs *args,
    MemoryRegion *sysmem = get_system_memory();
    struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));
    int sdram_size = binfo->ram_size;
    DisplayState *ds;

    s->mpu = omap2420_mpu_init(sysmem, sdram_size, args->cpu_model);

@@ -1370,12 +1369,6 @@ static void n8x0_init(QEMUMachineInitArgs *args,
        n800_setup_nolo_tags(nolo_tags);
        cpu_physical_memory_write(OMAP2_SRAM_BASE, nolo_tags, 0x10000);
    }
    /* FIXME: We shouldn't really be doing this here.  The LCD controller
       will set the size once configured, so this just sets an initial
       size until the guest activates the display.  */
    ds = get_displaystate();
    ds->surface = qemu_resize_displaysurface(ds, 800, 480);
    dpy_gfx_resize(ds);
}

static struct arm_boot_info n800_binfo = {
+0 −7
Original line number Diff line number Diff line
@@ -205,7 +205,6 @@ static void palmte_init(QEMUMachineInitArgs *args)
    static uint32_t cs2val = 0x0000e1a0;
    static uint32_t cs3val = 0xe1a0e1a0;
    int rom_size, rom_loaded = 0;
    DisplayState *ds = get_displaystate();
    MemoryRegion *flash = g_new(MemoryRegion, 1);
    MemoryRegion *cs = g_new(MemoryRegion, 4);

@@ -268,12 +267,6 @@ static void palmte_init(QEMUMachineInitArgs *args)
        palmte_binfo.initrd_filename = initrd_filename;
        arm_load_kernel(mpu->cpu, &palmte_binfo);
    }

    /* FIXME: We shouldn't really be doing this here.  The LCD controller
       will set the size once configured, so this just sets an initial
       size until the guest activates the display.  */
    ds->surface = qemu_resize_displaysurface(ds, 320, 320);
    dpy_gfx_resize(ds);
}

static QEMUMachine palmte_machine = {
Loading