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

Commit 08e9a90a authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Add ADRENO_ECP feature support



Allocate ECP buffers and inform the GMU if ECP is enabled.

Change-Id: Ibdd0467189575bbe46782dc721248543060f681a
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent c1ada1a1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
 */
#ifndef __ADRENO_H
#define __ADRENO_H
@@ -122,6 +122,8 @@
 * for droop mitigation
 */
#define ADRENO_ACD BIT(17)
/* ECP enabled GMU */
#define ADRENO_ECP BIT(18)

/*
 * Adreno GPU quirks - control bits for various workarounds
+10 −0
Original line number Diff line number Diff line
@@ -466,6 +466,16 @@ static int gmu_memory_probe(struct kgsl_device *device,
		goto err_ret;
	}

	if (ADRENO_FEATURE(adreno_dev, ADRENO_ECP)) {
		/* Allocation to account for future MEM_ALLOC buffers */
		md = allocate_gmu_kmem(gmu, GMU_NONCACHED_KERNEL, SZ_32K,
				(IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV));
		if (IS_ERR(md)) {
			ret = PTR_ERR(md);
			goto err_ret;
		}
	}

	return 0;
err_ret:
	gmu_memory_close(gmu);
+7 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#include "kgsl_device.h"
@@ -734,9 +734,12 @@ int hfi_start(struct kgsl_device *device,
	 * send H2F_MSG_CORE_FW_START and features for A640 devices
	 */
	if (HFI_VER_MAJOR(&gmu->hfi) >= 2) {
		result = hfi_send_feature_ctrl(gmu, HFI_FEATURE_ECP, 0, 0);
		if (ADRENO_FEATURE(adreno_dev, ADRENO_ECP)) {
			result = hfi_send_feature_ctrl(gmu,
					HFI_FEATURE_ECP, 1, 0);
			if (result)
				return result;
		}

		result = hfi_send_acd_feature_ctrl(gmu, adreno_dev);
		if (result)