Guest User

Untitled

a guest
Jun 22nd, 2017
269
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/linux/mali_kernel_linux.c.orig 2017-06-10 04:23:03.000000000 +0200
  2. +++ DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/linux/mali_kernel_linux.c 2017-06-10 04:23:23.000000000 +0200
  3. @@ -138,6 +138,9 @@
  4. static int mali_miscdevice_register(struct platform_device *pdev);
  5. static void mali_miscdevice_unregister(void);
  6.  
  7. +extern void enable_gpu_clk(void);
  8. +extern void disable_gpu_clk(void);
  9. +
  10. static int mali_open(struct inode *inode, struct file *filp);
  11. static int mali_release(struct inode *inode, struct file *filp);
  12. #ifdef HAVE_UNLOCKED_IOCTL
  13. @@ -158,7 +161,6 @@
  14. static int mali_driver_runtime_idle(struct device *dev);
  15. #endif
  16.  
  17. -#if defined(MALI_FAKE_PLATFORM_DEVICE)
  18. #if defined(CONFIG_MALI_DT)
  19. extern int mali_platform_device_init(struct platform_device *device);
  20. extern int mali_platform_device_deinit(struct platform_device *device);
  21. @@ -166,7 +168,6 @@
  22. extern int mali_platform_device_register(void);
  23. extern int mali_platform_device_unregister(void);
  24. #endif
  25. -#endif
  26.  
  27. /* Linux power management operations provided by the Mali device driver */
  28. #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29))
  29. @@ -375,7 +376,6 @@
  30. #endif
  31.  
  32. /* Initialize module wide settings */
  33. -#ifdef MALI_FAKE_PLATFORM_DEVICE
  34. #ifndef CONFIG_MALI_DT
  35. MALI_DEBUG_PRINT(2, ("mali_module_init() registering device\n"));
  36. err = mali_platform_device_register();
  37. @@ -383,7 +383,6 @@
  38. return err;
  39. }
  40. #endif
  41. -#endif
  42.  
  43. MALI_DEBUG_PRINT(2, ("mali_module_init() registering driver\n"));
  44.  
  45. @@ -391,11 +390,9 @@
  46.  
  47. if (0 != err) {
  48. MALI_DEBUG_PRINT(2, ("mali_module_init() Failed to register driver (%d)\n", err));
  49. -#ifdef MALI_FAKE_PLATFORM_DEVICE
  50. #ifndef CONFIG_MALI_DT
  51. mali_platform_device_unregister();
  52. #endif
  53. -#endif
  54. mali_platform_device = NULL;
  55. return err;
  56. }
  57. @@ -433,12 +430,10 @@
  58.  
  59. platform_driver_unregister(&mali_platform_driver);
  60.  
  61. -#if defined(MALI_FAKE_PLATFORM_DEVICE)
  62. #ifndef CONFIG_MALI_DT
  63. MALI_DEBUG_PRINT(2, ("mali_module_exit() unregistering device\n"));
  64. mali_platform_device_unregister();
  65. #endif
  66. -#endif
  67.  
  68. /* Tracing the current frequency and voltage from rmmod*/
  69. _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE |
  70. @@ -555,11 +550,13 @@
  71. 0,
  72. 0,
  73. 0, 0, 0);
  74. + disable_gpu_clk();
  75. return 0;
  76. }
  77.  
  78. static int mali_driver_resume_scheduler(struct device *dev)
  79. {
  80. + enable_gpu_clk();
  81. /* Tracing the frequency and voltage after mali is resumed */
  82. #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
  83. /* Just call mali_get_current_gpu_clk_item() once,to record current clk info.*/
  84. @@ -589,6 +586,7 @@
  85. 0,
  86. 0,
  87. 0, 0, 0);
  88. + disable_gpu_clk();
  89.  
  90. return 0;
  91. } else {
  92. @@ -598,6 +596,7 @@
  93.  
  94. static int mali_driver_runtime_resume(struct device *dev)
  95. {
  96. + enable_gpu_clk();
  97. /* Tracing the frequency and voltage after mali is resumed */
  98. #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
  99. /* Just call mali_get_current_gpu_clk_item() once,to record current clk info.*/
  100. --- DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/Kbuild.orig 2017-06-10 04:24:39.000000000 +0200
  101. +++ DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/Kbuild 2017-06-10 04:26:11.000000000 +0200
  102. @@ -13,7 +13,7 @@
  103. # set up defaults if not defined by the user
  104. TIMESTAMP ?= default
  105. OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB ?= 16
  106. -USING_GPU_UTILIZATION ?= 0
  107. +USING_GPU_UTILIZATION ?= 1
  108. PROFILING_SKIP_PP_JOBS ?= 0
  109. PROFILING_SKIP_PP_AND_GP_JOBS ?= 0
  110. MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP ?= 0
  111. @@ -98,6 +98,7 @@
  112.  
  113. # Source files which always are included in a build
  114. mali-y += \
  115. + linux/mali_platform.o \
  116. common/mali_kernel_core.o \
  117. linux/mali_kernel_linux.o \
  118. common/mali_session.o \
RAW Paste Data