summaryrefslogtreecommitdiff
path: root/hw/pxa2xx_lcd.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
commit0e1f5a0c495dd7a5c72c9321a29541bdde8f423a (patch)
tree374c5da7054c16f764a1cb2b5079d612cf417dac /hw/pxa2xx_lcd.c
parentcab3bee2d6f1d6eb6ad74006b8a63562cda9ba4d (diff)
downloadqemu-0e1f5a0c495dd7a5c72c9321a29541bdde8f423a.tar.gz
Introduce accessors for DisplayState (Stefano Stabellini)
Introducing some accessors: ds_get_linesize ds_get_bits_per_pixel ds_get_width ds_get_height ds_get_data 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@5789 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pxa2xx_lcd.c')
-rw-r--r--hw/pxa2xx_lcd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c
index 5e834fe76e..715b2f1a48 100644
--- a/hw/pxa2xx_lcd.c
+++ b/hw/pxa2xx_lcd.c
@@ -650,7 +650,7 @@ static void pxa2xx_palette_parse(struct pxa2xx_lcdc_s *s, int ch, int bpp)
}
break;
}
- switch (s->ds->depth) {
+ switch (ds_get_bits_per_pixel(s->ds)) {
case 8:
*dest = rgb_to_pixel8(r, g, b) | alpha;
break;
@@ -693,7 +693,7 @@ static void pxa2xx_lcdc_dma0_redraw_horiz(struct pxa2xx_lcdc_s *s,
else if (s->bpp > pxa_lcdc_8bpp)
src_width *= 2;
- dest = s->ds->data;
+ dest = ds_get_data(s->ds);
dest_width = s->xres * s->dest_width;
addr = (ram_addr_t) (fb - phys_ram_base);
@@ -750,7 +750,7 @@ static void pxa2xx_lcdc_dma0_redraw_vert(struct pxa2xx_lcdc_s *s,
src_width *= 2;
dest_width = s->yres * s->dest_width;
- dest = s->ds->data + dest_width * (s->xres - 1);
+ dest = ds_get_data(s->ds) + dest_width * (s->xres - 1);
addr = (ram_addr_t) (fb - phys_ram_base);
start = addr + s->yres * src_width;
@@ -1006,7 +1006,7 @@ struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq,
pxa2xx_invalidate_display,
pxa2xx_screen_dump, NULL, s);
- switch (s->ds->depth) {
+ switch (ds_get_bits_per_pixel(s->ds)) {
case 0:
s->dest_width = 0;
break;