~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/pxa2xx_lcd.c

  • Committer: aliguori
  • Date: 2009-01-16 19:04:14 UTC
  • Revision ID: git-v1:3023f3329d87a6203d03a0e9ccb948772940da96
graphical_console_init change (Stefano Stabellini)

Patch 5/7

This patch changes the graphical_console_init function to return an
allocated DisplayState instead of a QEMUConsole.

This patch contains just the graphical_console_init change and few other
modifications mainly in console.c and vl.c.
It was necessary to move the display frontends (e.g. sdl and vnc)
initialization after machine->init in vl.c.

This patch does *not* include any required changes to any device, these
changes come with the following patches.

Patch 6/7

This patch changes the QEMUMachine init functions not to take a
DisplayState as an argument because is not needed any more;

In few places the graphic hardware initialization function was called
only if DisplayState was not NULL, now they are always called.
Apart from these cases, the rest are all mechanical substitutions.

Patch 7/7

This patch updates the graphic device code to use the new
graphical_console_init function.

As for the previous patch, in few places graphical_console_init was called
only if DisplayState was not NULL, now it is always called.
Apart from these cases, the rest are all mechanical substitutions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
    int invalidated;
24
24
    DisplayState *ds;
25
 
    QEMUConsole *console;
26
25
    drawfn *line_fn[2];
27
26
    int dest_width;
28
27
    int xres, yres;
792
791
 
793
792
    if (width != s->xres || height != s->yres) {
794
793
        if (s->orientation)
795
 
            qemu_console_resize(s->console, height, width);
 
794
            qemu_console_resize(s->ds, height, width);
796
795
        else
797
 
            qemu_console_resize(s->console, width, height);
 
796
            qemu_console_resize(s->ds, width, height);
798
797
        s->invalidated = 1;
799
798
        s->xres = width;
800
799
        s->yres = height;
981
980
#define BITS 32
982
981
#include "pxa2xx_template.h"
983
982
 
984
 
struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq,
985
 
                DisplayState *ds)
 
983
struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq)
986
984
{
987
985
    int iomemtype;
988
986
    struct pxa2xx_lcdc_s *s;
990
988
    s = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s));
991
989
    s->invalidated = 1;
992
990
    s->irq = irq;
993
 
    s->ds = ds;
994
991
 
995
992
    pxa2xx_lcdc_orientation(s, graphic_rotate);
996
993
 
998
995
                    pxa2xx_lcdc_writefn, s);
999
996
    cpu_register_physical_memory(base, 0x00100000, iomemtype);
1000
997
 
1001
 
    s->console = graphic_console_init(ds, pxa2xx_update_display,
1002
 
                                      pxa2xx_invalidate_display,
1003
 
                                      pxa2xx_screen_dump, NULL, s);
 
998
    s->ds = graphic_console_init(pxa2xx_update_display,
 
999
                                 pxa2xx_invalidate_display,
 
1000
                                 pxa2xx_screen_dump, NULL, s);
1004
1001
 
1005
1002
    switch (ds_get_bits_per_pixel(s->ds)) {
1006
1003
    case 0: