meta-digi-arm: add GPU frequency patch to external gpu driver
This commit adds the minimum GPU frequency patch to the community Vivante GPU driver repository. https://jira.digi.com/browse/DEL-1969 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
16b2740fd5
commit
545c92d8b4
|
|
@ -0,0 +1,70 @@
|
||||||
|
From: Javier Viguera <javier.viguera@digi.com>
|
||||||
|
Date: Tue, 10 Nov 2015 17:45:37 +0100
|
||||||
|
Subject: [PATCH] mxc: gpu: use recommended values for minimum GPU frequency
|
||||||
|
divisor
|
||||||
|
|
||||||
|
Freescale recommends the following default minimum GPU frequency divisors
|
||||||
|
depending on the CPU family:
|
||||||
|
- 3 for Dual/Quad
|
||||||
|
- 8 for DualLite/Solo
|
||||||
|
|
||||||
|
Adapted for the external Vivante GPU driver from commit a790ad3 in linux
|
||||||
|
git repository.
|
||||||
|
|
||||||
|
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||||
|
---
|
||||||
|
.../hal/os/linux/kernel/gc_hal_kernel_probe.c | 13 ++++++++++++-
|
||||||
|
.../platform/freescale/gc_hal_kernel_platform_imx6q14.c | 2 +-
|
||||||
|
2 files changed, 13 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/gc_hal_kernel_probe.c b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/gc_hal_kernel_probe.c
|
||||||
|
index 4a29f0e776e2..69a2d483b2cd 100644
|
||||||
|
--- a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/gc_hal_kernel_probe.c
|
||||||
|
+++ b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/gc_hal_kernel_probe.c
|
||||||
|
@@ -54,6 +54,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
#include <linux/device.h>
|
||||||
|
+#include <linux/of.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
|
#include "gc_hal_kernel_linux.h"
|
||||||
|
@@ -190,7 +191,7 @@ module_param(showArgs, int, 0644);
|
||||||
|
static int mmu = 1;
|
||||||
|
module_param(mmu, int, 0644);
|
||||||
|
|
||||||
|
-static int gpu3DMinClock = 1;
|
||||||
|
+static int gpu3DMinClock = 0;
|
||||||
|
|
||||||
|
static int contiguousRequested = 0;
|
||||||
|
|
||||||
|
@@ -1115,6 +1116,16 @@ static int __devinit gpu_probe(struct platform_device *pdev)
|
||||||
|
_UpdateModuleParam(&moduleParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* If undefined, set Freescale recommended value. Else use the min freq. */
|
||||||
|
+ if (gpu3DMinClock == 0) {
|
||||||
|
+ if (of_machine_is_compatible("fsl,imx6dl"))
|
||||||
|
+ gpu3DMinClock = 8;
|
||||||
|
+ else if (of_machine_is_compatible("fsl,imx6q"))
|
||||||
|
+ gpu3DMinClock = 3;
|
||||||
|
+ else
|
||||||
|
+ gpu3DMinClock = 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ret = drv_init();
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
diff --git a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
|
||||||
|
index a12579d44723..c2a54b7d072d 100644
|
||||||
|
--- a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
|
||||||
|
+++ b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c
|
||||||
|
@@ -103,7 +103,7 @@ extern int unregister_thermal_notifier(struct notifier_block *nb);
|
||||||
|
#define UNREG_THERMAL_NOTIFIER(a) unregister_thermal_notifier(a);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-static int initgpu3DMinClock = 1;
|
||||||
|
+static int initgpu3DMinClock = 0;
|
||||||
|
module_param(initgpu3DMinClock, int, 0644);
|
||||||
|
|
||||||
|
struct platform_device *pdevice;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (C) 2015 Digi International
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
|
||||||
|
|
||||||
|
SRC_URI += "file://0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch"
|
||||||
Loading…
Reference in New Issue