1
2
3
4
5
6
7
8
9
10
11#ifndef BCM2835_FB_H
12#define BCM2835_FB_H
13
14#include "hw/sysbus.h"
15#include "exec/address-spaces.h"
16#include "ui/console.h"
17
18#define TYPE_BCM2835_FB "bcm2835-fb"
19#define BCM2835_FB(obj) OBJECT_CHECK(BCM2835FBState, (obj), TYPE_BCM2835_FB)
20
21typedef struct {
22
23 SysBusDevice busdev;
24
25
26 uint32_t vcram_base, vcram_size;
27 MemoryRegion *dma_mr;
28 AddressSpace dma_as;
29 MemoryRegion iomem;
30 MemoryRegionSection fbsection;
31 QemuConsole *con;
32 qemu_irq mbox_irq;
33
34 bool lock, invalidate, pending;
35 uint32_t xres, yres;
36 uint32_t xres_virtual, yres_virtual;
37 uint32_t xoffset, yoffset;
38 uint32_t bpp;
39 uint32_t base, pitch, size;
40 uint32_t pixo, alpha;
41} BCM2835FBState;
42
43void bcm2835_fb_reconfigure(BCM2835FBState *s, uint32_t *xres, uint32_t *yres,
44 uint32_t *xoffset, uint32_t *yoffset, uint32_t *bpp,
45 uint32_t *pixo, uint32_t *alpha);
46
47#endif
48