vm.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef _VM_INCLUDE__
  2. #define _VM_INCLUDE__
  3. #include <linux/interrupt.h>
  4. #include <mach/am_regs.h>
  5. #include <linux/amports/canvas.h>
  6. #include <linux/fb.h>
  7. #include <linux/list.h>
  8. #include <asm/uaccess.h>
  9. #include <linux/sysfs.h>
  10. #include <linux/spinlock.h>
  11. #include <linux/kthread.h>
  12. /**************************************************************
  13. ** **
  14. ** macro define **
  15. ** **
  16. ***************************************************************/
  17. #define VM_IOC_MAGIC 'P'
  18. #define VM_IOC_2OSD0 _IOW(VM_IOC_MAGIC, 0x00, unsigned int)
  19. #define VM_IOC_ENABLE_PP _IOW(VM_IOC_MAGIC,0X01,unsigned int)
  20. #define VM_IOC_CONFIG_FRAME _IOW(VM_IOC_MAGIC,0X02,unsigned int)
  21. typedef struct display_frame_s{
  22. int frame_top;
  23. int frame_left;
  24. int frame_width;
  25. int frame_height;
  26. int content_top;
  27. int content_left;
  28. int content_width;
  29. int content_height;
  30. }display_frame_t;
  31. extern int get_vm_status(void);
  32. extern void set_vm_status(int flag);
  33. /* for vm device op. */
  34. extern int init_vm_device(void);
  35. extern int uninit_vm_device(void);
  36. /* for vm device class op. */
  37. extern struct class* init_vm_cls(void);
  38. /* for thread of vm. */
  39. extern int start_vpp_task(void);
  40. extern void stop_vpp_task(void);
  41. /* for vm private member. */
  42. extern void set_vm_buf_info(char* start,unsigned int size);
  43. extern void get_vm_buf_info(const char** start,unsigned int* size,char** vaddr) ;
  44. /* vm buffer op. */
  45. extern int vm_buffer_init(void);
  46. extern void vm_local_init(void) ;
  47. static DEFINE_MUTEX(vm_mutex);
  48. #endif /* _VM_INCLUDE__ */