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 int (*stop)(struct framebuffer *fb); 12 }; 13 14 #define FB_MAX_TARGETS 2 15 16 struct framebuffer { 17 struct list_head node; 18 19 u32 width; 20 u32 height; 21 u8 depth; 22 char *mem; 23 u64 mem_addr; 24 u64 mem_size; 25 struct kvm *kvm; 26 27 unsigned long nr_targets; 28 struct fb_target_operations *targets[FB_MAX_TARGETS]; 29 }; 30 31 struct framebuffer *fb__register(struct framebuffer *fb); 32 int fb__attach(struct framebuffer *fb, struct fb_target_operations *ops); 33 int fb__init(struct kvm *kvm); 34 int fb__exit(struct kvm *kvm); 35 36 #endif /* KVM__FRAMEBUFFER_H */ 37