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

Commit 2b52426f 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: Fix XO shutdown issue"

parents 14d4683f bf92ce5e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2839,6 +2839,8 @@ static const struct kgsl_functable adreno_functable = {
	.clk_set_options = adreno_clk_set_options,
	.gpu_model = adreno_gpu_model,
	.stop_fault_timer = adreno_dispatcher_stop_fault_timer,
	.dispatcher_halt = adreno_dispatcher_halt,
	.dispatcher_unhalt = adreno_dispatcher_unhalt,
};

static struct platform_driver adreno_platform_driver = {
+11 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2816,6 +2816,16 @@ int adreno_dispatcher_init(struct adreno_device *adreno_dev)
	return ret;
}

void adreno_dispatcher_halt(struct kgsl_device *device)
{
	adreno_get_gpu_halt(ADRENO_DEVICE(device));
}

void adreno_dispatcher_unhalt(struct kgsl_device *device)
{
	adreno_put_gpu_halt(ADRENO_DEVICE(device));
}

/*
 * adreno_dispatcher_idle() - Wait for dispatcher to idle
 * @adreno_dev: Adreno device whose dispatcher needs to idle
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -103,6 +103,9 @@ enum adreno_dispatcher_flags {
};

void adreno_dispatcher_start(struct kgsl_device *device);
void adreno_dispatcher_halt(struct kgsl_device *device);
void adreno_dispatcher_unhalt(struct kgsl_device *device);

int adreno_dispatcher_init(struct adreno_device *adreno_dev);
void adreno_dispatcher_close(struct adreno_device *adreno_dev);
int adreno_dispatcher_idle(struct adreno_device *adreno_dev);
+3 −0
Original line number Diff line number Diff line
@@ -746,6 +746,8 @@ static int kgsl_suspend_device(struct kgsl_device *device, pm_message_t state)

	mutex_lock(&device->mutex);
	status = kgsl_pwrctrl_change_state(device, KGSL_STATE_SUSPEND);
	if (status == 0)
		device->ftbl->dispatcher_halt(device);
	mutex_unlock(&device->mutex);

	KGSL_PWR_WARN(device, "suspend end\n");
@@ -760,6 +762,7 @@ static int kgsl_resume_device(struct kgsl_device *device)
	KGSL_PWR_WARN(device, "resume start\n");
	mutex_lock(&device->mutex);
	if (device->state == KGSL_STATE_SUSPEND) {
		device->ftbl->dispatcher_unhalt(device);
		kgsl_pwrctrl_change_state(device, KGSL_STATE_SLUMBER);
	} else if (device->state != KGSL_STATE_INIT) {
		/*
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ struct kgsl_functable {
	void (*gpu_model)(struct kgsl_device *device, char *str,
		size_t bufsz);
	void (*stop_fault_timer)(struct kgsl_device *device);
	void (*dispatcher_halt)(struct kgsl_device *device);
	void (*dispatcher_unhalt)(struct kgsl_device *device);
};

struct kgsl_ioctl {
Loading