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

Commit 855db97a authored by Tarun Karra's avatar Tarun Karra Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Fix power api's used in fault interrupt sysfs control



Sysfs control of fault interrupt is using incorrect GPU power
control api's. *_clk api should not be used by rest of the
GPU driver, use the correct api for consistency.

Change-Id: I32f161c1fbf60ffe9458a5f64a8f8efb0dc79311
Signed-off-by: default avatarTarun Karra <tkarra@codeaurora.org>
parent ffbfa10b
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -2320,7 +2320,6 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev,
	old_setting =
		(test_bit(ADRENO_DEVICE_HANG_INTR, &adreno_dev->priv) ? 1 : 0);
	if (new_setting != old_setting) {
		int clk_on = 0;
		if (new_setting)
			set_bit(ADRENO_DEVICE_HANG_INTR, &adreno_dev->priv);
		else
@@ -2329,15 +2328,9 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev,
		switch (device->state) {
		case KGSL_STATE_NAP:
		case KGSL_STATE_SLEEP:
			kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_ON,
					device->state);
			clk_on = 1;
			kgsl_pwrctrl_wake(device, 0);
		case KGSL_STATE_ACTIVE:
			adreno_dev->gpudev->irq_control(adreno_dev, 1);
			/* switch off clocks if we turned it on */
			if (clk_on)
				kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_OFF,
					device->state);
		/*
		 * For following states setting will be picked up on device
		 * start. Still need them in switch statement to differentiate
+2 −0
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ static struct clk_pair clks[KGSL_MAX_CLKS] = {
	},
};

static void kgsl_pwrctrl_clk(struct kgsl_device *device, int state,
					int requested_state);
static void kgsl_pwrctrl_axi(struct kgsl_device *device, int state);
static void kgsl_pwrctrl_pwrrail(struct kgsl_device *device, int state);

+0 −3
Original line number Diff line number Diff line
@@ -128,7 +128,6 @@ void kgsl_pwrctrl_uninit_sysfs(struct kgsl_device *device);
void kgsl_pwrctrl_enable(struct kgsl_device *device);
void kgsl_pwrctrl_disable(struct kgsl_device *device);
bool kgsl_pwrctrl_isenabled(struct kgsl_device *device);
bool kgsl_pwrrail_isenabled(struct kgsl_device *device);

static inline unsigned long kgsl_get_clkrate(struct clk *clk)
{
@@ -153,8 +152,6 @@ void kgsl_pwrctrl_request_state(struct kgsl_device *device, unsigned int state);
int __must_check kgsl_active_count_get(struct kgsl_device *device);
void kgsl_active_count_put(struct kgsl_device *device);
int kgsl_active_count_wait(struct kgsl_device *device, int count);
void kgsl_pwrctrl_clk(struct kgsl_device *device, int state,
				int requested_state);
int kgsl_pwrctrl_slumber(struct kgsl_device *device);
void kgsl_pwrctrl_busy_time(struct kgsl_device *device, u64 time, u64 busy);