Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/linux/mali_kernel_linux.c.orig 2017-06-10 04:23:03.000000000 +0200
- +++ DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/linux/mali_kernel_linux.c 2017-06-10 04:23:23.000000000 +0200
- @@ -138,6 +138,9 @@
- static int mali_miscdevice_register(struct platform_device *pdev);
- static void mali_miscdevice_unregister(void);
- +extern void enable_gpu_clk(void);
- +extern void disable_gpu_clk(void);
- +
- static int mali_open(struct inode *inode, struct file *filp);
- static int mali_release(struct inode *inode, struct file *filp);
- #ifdef HAVE_UNLOCKED_IOCTL
- @@ -158,7 +161,6 @@
- static int mali_driver_runtime_idle(struct device *dev);
- #endif
- -#if defined(MALI_FAKE_PLATFORM_DEVICE)
- #if defined(CONFIG_MALI_DT)
- extern int mali_platform_device_init(struct platform_device *device);
- extern int mali_platform_device_deinit(struct platform_device *device);
- @@ -166,7 +168,6 @@
- extern int mali_platform_device_register(void);
- extern int mali_platform_device_unregister(void);
- #endif
- -#endif
- /* Linux power management operations provided by the Mali device driver */
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29))
- @@ -375,7 +376,6 @@
- #endif
- /* Initialize module wide settings */
- -#ifdef MALI_FAKE_PLATFORM_DEVICE
- #ifndef CONFIG_MALI_DT
- MALI_DEBUG_PRINT(2, ("mali_module_init() registering device\n"));
- err = mali_platform_device_register();
- @@ -383,7 +383,6 @@
- return err;
- }
- #endif
- -#endif
- MALI_DEBUG_PRINT(2, ("mali_module_init() registering driver\n"));
- @@ -391,11 +390,9 @@
- if (0 != err) {
- MALI_DEBUG_PRINT(2, ("mali_module_init() Failed to register driver (%d)\n", err));
- -#ifdef MALI_FAKE_PLATFORM_DEVICE
- #ifndef CONFIG_MALI_DT
- mali_platform_device_unregister();
- #endif
- -#endif
- mali_platform_device = NULL;
- return err;
- }
- @@ -433,12 +430,10 @@
- platform_driver_unregister(&mali_platform_driver);
- -#if defined(MALI_FAKE_PLATFORM_DEVICE)
- #ifndef CONFIG_MALI_DT
- MALI_DEBUG_PRINT(2, ("mali_module_exit() unregistering device\n"));
- mali_platform_device_unregister();
- #endif
- -#endif
- /* Tracing the current frequency and voltage from rmmod*/
- _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE |
- @@ -555,11 +550,13 @@
- 0,
- 0,
- 0, 0, 0);
- + disable_gpu_clk();
- return 0;
- }
- static int mali_driver_resume_scheduler(struct device *dev)
- {
- + enable_gpu_clk();
- /* Tracing the frequency and voltage after mali is resumed */
- #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
- /* Just call mali_get_current_gpu_clk_item() once,to record current clk info.*/
- @@ -589,6 +586,7 @@
- 0,
- 0,
- 0, 0, 0);
- + disable_gpu_clk();
- return 0;
- } else {
- @@ -598,6 +596,7 @@
- static int mali_driver_runtime_resume(struct device *dev)
- {
- + enable_gpu_clk();
- /* Tracing the frequency and voltage after mali is resumed */
- #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS)
- /* Just call mali_get_current_gpu_clk_item() once,to record current clk info.*/
- --- DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/Kbuild.orig 2017-06-10 04:24:39.000000000 +0200
- +++ DX910-SW-99002-r5p0-01rel0/driver/src/devicedrv/mali/Kbuild 2017-06-10 04:26:11.000000000 +0200
- @@ -13,7 +13,7 @@
- # set up defaults if not defined by the user
- TIMESTAMP ?= default
- OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB ?= 16
- -USING_GPU_UTILIZATION ?= 0
- +USING_GPU_UTILIZATION ?= 1
- PROFILING_SKIP_PP_JOBS ?= 0
- PROFILING_SKIP_PP_AND_GP_JOBS ?= 0
- MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP ?= 0
- @@ -98,6 +98,7 @@
- # Source files which always are included in a build
- mali-y += \
- + linux/mali_platform.o \
- common/mali_kernel_core.o \
- linux/mali_kernel_linux.o \
- common/mali_session.o \
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement