X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fpxa2xx_lcd.c;h=2c10963897588b5ab3ab8cd7d2769941f03b5278;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=232effdb13b1c2b3346f9c84f845860bd5af9794;hpb=aa941b944500bf77f0bdbfa0a7112b4e89670ff1;p=qemu diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c index 232effd..2c10963 100644 --- a/hw/pxa2xx_lcd.c +++ b/hw/pxa2xx_lcd.c @@ -8,6 +8,7 @@ */ #include "vl.h" +#include "pixel_ops.h" typedef void (*drawfn)(uint32_t *, uint8_t *, const uint8_t *, int, int); @@ -575,36 +576,6 @@ static CPUWriteMemoryFunc *pxa2xx_lcdc_writefn[] = { pxa2xx_lcdc_write }; -static inline -uint32_t rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b) -{ - return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); -} - -static inline -uint32_t rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b) -{ - return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); -} - -static inline -uint32_t rgb_to_pixel16(unsigned int r, unsigned int g, unsigned b) -{ - return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); -} - -static inline -uint32_t rgb_to_pixel24(unsigned int r, unsigned int g, unsigned b) -{ - return (r << 16) | (g << 8) | b; -} - -static inline -uint32_t rgb_to_pixel32(unsigned int r, unsigned int g, unsigned b) -{ - return (r << 16) | (g << 8) | b; -} - /* Load new palette for a given DMA channel, convert to internal format */ static void pxa2xx_palette_parse(struct pxa2xx_lcdc_s *s, int ch, int bpp) { @@ -1026,7 +997,7 @@ struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq, iomemtype = cpu_register_io_memory(0, pxa2xx_lcdc_readfn, pxa2xx_lcdc_writefn, s); - cpu_register_physical_memory(base, 0x000fffff, iomemtype); + cpu_register_physical_memory(base, 0x00100000, iomemtype); graphic_console_init(ds, pxa2xx_update_display, pxa2xx_invalidate_display, pxa2xx_screen_dump, s);