rtpm_prio.h 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef __KERNEL_RTPM_PRIO__
  2. #define __KERNEL_RTPM_PRIO__
  3. /* since the monitor check code are removed, remove the definition here. */
  4. /*#define CONFIG_MT_RT_MONITOR*/
  5. #ifdef CONFIG_MT_RT_MONITOR
  6. #define MT_ALLOW_RT_PRIO_BIT 0x10000000
  7. #else
  8. #define MT_ALLOW_RT_PRIO_BIT 0x0
  9. #endif
  10. #define REG_RT_PRIO(x) ((x) | MT_ALLOW_RT_PRIO_BIT)
  11. /***********************************************************************
  12. * Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR)
  13. * have a sched_priority value in the range:
  14. * 1 (low) to 99 (high).
  15. ************************************************************************/
  16. /* ////////////////////////////////////////////////////////////////////// */
  17. /* DEFINE MM GROUP PRIORITY */
  18. #define RTPM_PRIO_MM_GROUP_BASE (10)
  19. #define RTPM_PRIO_MM_GROUP_A (RTPM_PRIO_MM_GROUP_BASE+0)
  20. #define RTPM_PRIO_MM_GROUP_B (RTPM_PRIO_MM_GROUP_BASE+10)
  21. #define RTPM_PRIO_MM_GROUP_C (RTPM_PRIO_MM_GROUP_BASE+20)
  22. #define RTPM_PRIO_MM_GROUP_D (RTPM_PRIO_MM_GROUP_BASE+30)
  23. #define RTPM_PRIO_MM_GROUP_E (RTPM_PRIO_MM_GROUP_BASE+40)
  24. #define RTPM_PRIO_MM_GROUP_F (RTPM_PRIO_MM_GROUP_BASE+50)
  25. #define RTPM_PRIO_MM_GROUP_G (RTPM_PRIO_MM_GROUP_BASE+60)
  26. #define RTPM_PRIO_MM_GROUP_H (RTPM_PRIO_MM_GROUP_BASE+70)
  27. #define RTPM_PRIO_MM_GROUP_I (RTPM_PRIO_MM_GROUP_BASE+80)
  28. /* ////////////////////////////////////////////////////////////////////// */
  29. /* DEFIN MTK RT PRIORITY */
  30. #define RTPM_PRIO_CPU_CALLBACK REG_RT_PRIO(98)
  31. #define RTPM_PRIO_SWLOCKUP REG_RT_PRIO(98)
  32. #define RTPM_PRIO_AED REG_RT_PRIO(28)
  33. #define RTPM_PRIO_WDT REG_RT_PRIO(99)
  34. #define RTPM_PRIO_TPD REG_RT_PRIO(4)
  35. #define RTPM_PRIO_KSDIOIRQ REG_RT_PRIO(1)
  36. #define RTPM_PRIO_MTLTE_SYS_SDIO_THREAD REG_RT_PRIO(96)
  37. #define RTPM_PRIO_AUDIO_PLAYBACK REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+5)
  38. #define RTPM_PRIO_VIDEO_PLAYBACK_THREAD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+5) /* TimeEventQueue */
  39. #define RTPM_PRIO_SCRN_UPDATE REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+4)
  40. #define RTPM_PRIO_AUDIO_COMMAND REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+2)
  41. #define RTPM_PRIO_AUDIO_CCCI_THREAD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+2)
  42. #define RTPM_PRIO_CAMERA_TOPBASE REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+1)
  43. #define RTPM_PRIO_CAMERA_PREVIEW REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+1)
  44. #define RTPM_PRIO_CAMERA_COMPRESS REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+0)
  45. #define RTPM_PRIO_MATV_AUDIOPLAYER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+0)
  46. #define RTPM_PRIO_FM_AUDIOPLAYER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+0)
  47. #define RTPM_PRIO_AUDIO_I2S REG_RT_PRIO(RTPM_PRIO_MM_GROUP_I+0)
  48. #define RTPM_PRIO_CAMERA_DISPLAY REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+9)
  49. #define RTPM_PRIO_CAMERA_SHUTTER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+9)
  50. #define RTPM_PRIO_CAMERA_RECORD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+9)
  51. #define RTPM_PRIO_FB_THREAD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+7)
  52. #define RTPM_PRIO_AUDIO_RECORD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+6)
  53. #define RTPM_PRIO_VSYNC_THREAD REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+5)
  54. #define RTPM_PRIO_SURFACEFLINGER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_H+4)
  55. #define RTPM_PRIO_VIDEO_YUV_BUFFER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+8)
  56. #define RTPM_PRIO_OMX_AUDIO REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+6)
  57. #define RTPM_PRIO_OMX_CMD_AUDIO REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+6)
  58. #define RTPM_PRIO_OMX_VIDEO_ENCODE REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+5)
  59. #define RTPM_PRIO_OMX_VIDEO REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+5)
  60. #define RTPM_PRIO_OMX_VIDEO_DECODE REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+4)
  61. #define RTPM_PRIO_VIDEO_BS_BUFFER REG_RT_PRIO(RTPM_PRIO_MM_GROUP_G+3)
  62. #define RTPM_PRIO_MIDI_FILE REG_RT_PRIO(RTPM_PRIO_MM_GROUP_C+0)
  63. #define RTPM_PRIO_AUDIOTRACK_THREAD REG_RT_PRIO(1)
  64. #define RTPM_PRIO_GPS_DRIVER REG_RT_PRIO(1)
  65. /* Total */
  66. #define RTPM_PRIO_NUM 30
  67. /* ////////////////////////////////////////////////////////////////////////////// */
  68. /* Removed */
  69. /* #define RTPM_PRIO_FB_THREAD REG_RT_PRIO(87) */
  70. /* #define RTPM_PRIO_SURFACE_OUT REG_RT_PRIO(80) */
  71. #endif