Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b07f9b02 authored by Abhilash Kumar's avatar Abhilash Kumar Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Add commandline option to boot with no GMU



Add a module parameter to disable GMU during boot. This module
parameter allows GMU to be disabled with the commandline option
set during bootup time.

Change-Id: Ie1ca293cd24bf065e17369dfa25390d859ce9994
Signed-off-by: default avatarAbhilash Kumar <krabhi@codeaurora.org>
parent 1a60f3f6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
 * GNU General Public License for more details.
 *
 */
#include <linux/module.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/iommu.h>
@@ -25,6 +26,13 @@
#include "a6xx_reg.h"
#include "adreno.h"

#undef MODULE_PARAM_PREFIX
#define MODULE_PARAM_PREFIX "kgsl_gmu."

static bool nogmu;
module_param(nogmu, bool, 0444);
MODULE_PARM_DESC(nogmu, "Disable the GMU");

#define GMU_CONTEXT_USER		0
#define GMU_CONTEXT_KERNEL		1
#define GMU_KERNEL_ENTRIES		8
@@ -109,9 +117,9 @@ bool kgsl_gmu_isenabled(struct kgsl_device *device)
	struct gmu_device *gmu = &device->gmu;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (gmu->pdev && ADRENO_FEATURE(adreno_dev, ADRENO_GPMU))
	if (!nogmu && gmu->pdev &&
		ADRENO_FEATURE(adreno_dev, ADRENO_GPMU))
		return true;

	return false;
}