1 #ifndef KVM__FRAMEBUFFER_H 2 #define KVM__FRAMEBUFFER_H 3 4 #include <linux/types.h> 5 #include <linux/list.h> 6 7 struct framebuffer; 8 9 struct fb_target_operations { 10 int (*start)(struct framebuffer *fb); 11 }; 12 13 #define FB_MAX_TARGETS 2 14 15 struct framebuffer { 16 struct list_head node; 17 18 u32 width; 19 u32 height; 20 u8 depth; 21 char *mem; 22 u64 mem_addr; 23 24 unsigned long nr_targets; 25 struct fb_target_operations *targets[FB_MAX_TARGETS]; 26 }; 27 28 struct framebuffer *fb__register(struct framebuffer *fb); 29 int fb__attach(struct framebuffer *fb, struct fb_target_operations *ops); 30 int fb__start(void); 31 void fb__stop(void); 32 33 #endif /* KVM__FRAMEBUFFER_H */ 34