73 lines
2.6 KiB
Diff
73 lines
2.6 KiB
Diff
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
|
Date: Thu, 10 Jan 2019 17:57:54 +0000
|
|
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>
|
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
|
---
|
|
.../src/hal/os/linux/kernel/gc_hal_kernel_driver.c | 14 +++++++++++++-
|
|
.../src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c | 2 +-
|
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/hal/os/linux/kernel/gc_hal_kernel_driver.c b/src/hal/os/linux/kernel/gc_hal_kernel_driver.c
|
|
index 615939827730..7c9939c65836 100644
|
|
--- a/src/hal/os/linux/kernel/gc_hal_kernel_driver.c
|
|
+++ b/src/hal/os/linux/kernel/gc_hal_kernel_driver.c
|
|
@@ -54,6 +54,7 @@
|
|
|
|
|
|
#include <linux/device.h>
|
|
+#include <linux/of.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/miscdevice.h>
|
|
#include <linux/uaccess.h>
|
|
@@ -214,7 +215,7 @@ static uint type = 0;
|
|
module_param(type, uint, 0664);
|
|
MODULE_PARM_DESC(type, "0 - Char Driver (Default), 1 - Misc Driver");
|
|
|
|
-static int gpu3DMinClock = 1;
|
|
+static int gpu3DMinClock = 0;
|
|
|
|
static int contiguousRequested = 0;
|
|
|
|
@@ -986,6 +987,17 @@ static int gpu_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
_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") ||
|
|
+ of_machine_is_compatible("fsl,imx6qp"))
|
|
+ gpu3DMinClock = 3;
|
|
+ else
|
|
+ gpu3DMinClock = 1;
|
|
+ }
|
|
+
|
|
ret = drv_init();
|
|
|
|
if (!ret)
|
|
diff --git a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
|
|
index 62624d69b4a4..4d1b1961838d 100644
|
|
--- a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
|
|
+++ b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
|
|
@@ -124,7 +124,7 @@ extern int unregister_thermal_notifier(struct notifier_block *nb);
|
|
# define gcdFSL_CONTIGUOUS_SIZE (4 << 20)
|
|
#endif
|
|
|
|
-static int initgpu3DMinClock = 1;
|
|
+static int initgpu3DMinClock = 0;
|
|
module_param(initgpu3DMinClock, int, 0644);
|
|
|
|
struct platform_device *pdevice;
|