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

Commit 793392fb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Add memory and periphery clock control for A540"

parents e18b1f64 1585c95a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2728,6 +2728,14 @@ static void adreno_pwrlevel_change_settings(struct kgsl_device *device,
					postlevel, post);
}

static void adreno_clk_set_options(struct kgsl_device *device, const char *name,
	struct clk *clk)
{
	if (ADRENO_GPU_DEVICE(ADRENO_DEVICE(device))->clk_set_options)
		ADRENO_GPU_DEVICE(ADRENO_DEVICE(device))->clk_set_options(
			ADRENO_DEVICE(device), name, clk);
}

static void adreno_iommu_sync(struct kgsl_device *device, bool sync)
{
	struct scm_desc desc = {0};
@@ -2827,6 +2835,7 @@ static const struct kgsl_functable adreno_functable = {
	.regulator_disable = adreno_regulator_disable,
	.pwrlevel_change_settings = adreno_pwrlevel_change_settings,
	.regulator_disable_poll = adreno_regulator_disable_poll,
	.clk_set_options = adreno_clk_set_options
};

static struct platform_driver adreno_platform_driver = {
+2 −0
Original line number Diff line number Diff line
@@ -766,6 +766,8 @@ struct adreno_gpudev {
	void (*preemption_schedule)(struct adreno_device *);
	void (*enable_64bit)(struct adreno_device *);
	void (*pre_reset)(struct adreno_device *);
	void (*clk_set_options)(struct adreno_device *,
				const char *, struct clk *);
};

/**
+17 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <soc/qcom/subsystem_restart.h>
#include <soc/qcom/scm.h>
#include <linux/pm_opp.h>
#include <linux/clk/msm-clk.h>

#include "adreno.h"
#include "a5xx_reg.h"
@@ -1627,6 +1628,21 @@ static void a5xx_pwrlevel_change_settings(struct adreno_device *adreno_dev,
	}
}

static void a5xx_clk_set_options(struct adreno_device *adreno_dev,
	const char *name, struct clk *clk)
{
	if (adreno_is_a540(adreno_dev)) {
		if (!strcmp(name, "mem_iface_clk"))
			clk_set_flags(clk, CLKFLAG_NORETAIN_PERIPH);
			clk_set_flags(clk, CLKFLAG_NORETAIN_MEM);
		if (!strcmp(name, "core_clk")) {
			clk_set_flags(clk, CLKFLAG_NORETAIN_PERIPH);
			clk_set_flags(clk, CLKFLAG_NORETAIN_MEM);
		}
	}
}


static void a5xx_enable_64bit(struct adreno_device *adreno_dev)
{
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
@@ -3516,4 +3532,5 @@ struct adreno_gpudev adreno_a5xx_gpudev = {
	.preemption_schedule = a5xx_preemption_schedule,
	.enable_64bit = a5xx_enable_64bit,
	.pre_reset =  a5xx_pre_reset,
	.clk_set_options = a5xx_clk_set_options,
};
+2 −0
Original line number Diff line number Diff line
@@ -165,6 +165,8 @@ struct kgsl_functable {
	void (*pwrlevel_change_settings)(struct kgsl_device *device,
		unsigned int prelevel, unsigned int postlevel, bool post);
	void (*regulator_disable_poll)(struct kgsl_device *device);
	void (*clk_set_options)(struct kgsl_device *device,
		const char *name, struct clk *clk);
};

struct kgsl_ioctl {
+4 −0
Original line number Diff line number Diff line
@@ -1655,6 +1655,10 @@ static int _get_clocks(struct kgsl_device *device)

			if (!strcmp(name, "isense_clk"))
				pwr->isense_clk_indx = i;

			if (device->ftbl->clk_set_options)
				device->ftbl->clk_set_options(device, name,
					pwr->grp_clks[i]);
			break;
		}
	}