smi_common.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef __SMI_COMMON_H__
  2. #define __SMI_COMMON_H__
  3. #include <aee.h>
  4. #define SMI_CLIENT_DISP 0
  5. #define SMI_CLIENT_WFD 1
  6. #define SMI_EVENT_DIRECT_LINK (0x1 << 0)
  7. #define SMI_EVENT_DECOUPLE (0x1 << 1)
  8. #define SMI_EVENT_OVL_CASCADE (0x1 << 2)
  9. #define SMI_EVENT_OVL1_EXTERNAL (0x1 << 3)
  10. #define SMIMSG(string, args...) pr_warn("[pid=%d]" string, current->tgid, ##args)
  11. #define SMIMSG2(string, args...) pr_debug(string, ##args)
  12. #define SMIMSG3(string, args...) SMIMSG(string, ##args)
  13. #define SMITMP(string, args...) pr_debug("[pid=%d]"string, current->tgid, ##args)
  14. #define SMIERR(string, args...) pr_debug("error: " string, ##args)
  15. #define smi_aee_print(string, args...)\
  16. do {\
  17. char smi_name[100];\
  18. snprintf(smi_name, 100, "[" SMI_LOG_TAG "]" string, ##args); \
  19. } while (0)
  20. /*
  21. #define SMIERR(string, args...)\
  22. do {\
  23. pr_debug("error: " string, ##args); \
  24. aee_kernel_warning(SMI_LOG_TAG, "error: "string, ##args); \
  25. } while (0)
  26. #define smi_aee_print(string, args...)\
  27. do {\
  28. char smi_name[100];\
  29. snprintf(smi_name, 100, "[" SMI_LOG_TAG "]" string, ##args); \
  30. aee_kernel_warning(smi_name, "["SMI_LOG_TAG"]error:"string, ##args); \
  31. } while (0)
  32. */
  33. /* Please use the function to instead gLarbBaseAddr to prevent the NULL pointer access error */
  34. /* when the corrosponding larb is not exist */
  35. /* extern unsigned int gLarbBaseAddr[SMI_LARB_NR]; */
  36. /*extern unsigned long get_larb_base_addr(int larb_id);*/
  37. extern char *smi_port_name[][21];
  38. /* for slow motion force 30 fps */
  39. extern int primary_display_force_set_vsync_fps(unsigned int fps);
  40. extern unsigned int primary_display_get_fps(void);
  41. extern void smi_dumpDebugMsg(void);
  42. extern void smi_client_status_change_notify(int module, int mode);
  43. extern void SMI_DBG_Init(void);
  44. void register_base_dump(void);
  45. #endif