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

Commit 638362f7 authored by Kyle Piefer's avatar Kyle Piefer Committed by Mohammed Mirza Mandayappurath Manzoor
Browse files

msm: kgsl: Disable ACD and LM on unsupported devices



Only some A640 devices support the ACD and LM power features.
Unset the feature flags for those features on the
unsupported devices.

Change-Id: I9a7e4bd2d90772a12a730e0ed2bc5610cc3a627f
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
Signed-off-by: default avatarMohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
parent 26f0ed3a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2876,6 +2876,14 @@ static void a6xx_efuse_speed_bin(struct adreno_device *adreno_dev)
	adreno_dev->speed_bin = (val & speed_bin[1]) >> speed_bin[2];
}

static void a6xx_efuse_power_features(struct adreno_device *adreno_dev)
{
	a6xx_efuse_speed_bin(adreno_dev);

	if (!adreno_dev->speed_bin)
		clear_bit(ADRENO_LM_CTRL, &adreno_dev->pwrctrl_flag);
}

static const struct {
	int (*check)(struct adreno_device *adreno_dev);
	void (*func)(struct adreno_device *adreno_dev);
@@ -2884,6 +2892,7 @@ static const struct {
	{ adreno_is_a612, a6xx_efuse_speed_bin },
	{ adreno_is_a610, a6xx_efuse_speed_bin },
	{ adreno_is_a610, a6xx_efuse_gaming_bin },
	{ adreno_is_a640, a6xx_efuse_power_features },
};

static void a6xx_check_features(struct adreno_device *adreno_dev)
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, 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
@@ -1278,6 +1278,7 @@ static int gmu_aop_mailbox_init(struct kgsl_device *device,
		return PTR_ERR(mailbox->channel);
	}

	if (adreno_dev->speed_bin)
		set_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag);
	return 0;
}