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

Commit e19c64e3 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Disable adreno coresight for A650



Disable GPU coresight until it is ready to be enabled.

Change-Id: I1305996bf1dd2ea2b6c9c982d10e729c2a58f36c
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 9d2c3982
Loading
Loading
Loading
Loading
+14 −2
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/platform_device.h>
#include <linux/platform_device.h>
@@ -317,7 +317,7 @@ static int adreno_coresight_enable(struct coresight_device *csdev,
}
}


/**
/**
 * adreno_coresight_start() - Reprogram coresight registers after power collapse
 * adreno_coresight_stop() - Reprogram coresight registers after power collapse
 * @adreno_dev: Pointer to the adreno device structure
 * @adreno_dev: Pointer to the adreno device structure
 *
 *
 * Cache the current coresight register values so they can be restored after
 * Cache the current coresight register values so they can be restored after
@@ -327,6 +327,9 @@ void adreno_coresight_stop(struct adreno_device *adreno_dev)
{
{
	int i, adreno_dev_flag = -EINVAL;
	int i, adreno_dev_flag = -EINVAL;


	if (adreno_is_a650(adreno_dev))
		return;

	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
		if (i == GPU_CORESIGHT_GX)
		if (i == GPU_CORESIGHT_GX)
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
@@ -350,6 +353,9 @@ void adreno_coresight_start(struct adreno_device *adreno_dev)
{
{
	int i, adreno_dev_flag = -EINVAL;
	int i, adreno_dev_flag = -EINVAL;


	if (adreno_is_a650(adreno_dev))
		return;

	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
		if (i == GPU_CORESIGHT_GX)
		if (i == GPU_CORESIGHT_GX)
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
@@ -391,6 +397,9 @@ void adreno_coresight_remove(struct adreno_device *adreno_dev)
{
{
	int i, adreno_dev_flag = -EINVAL;
	int i, adreno_dev_flag = -EINVAL;


	if (adreno_is_a650(adreno_dev))
		return;

	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
	for (i = 0; i < GPU_CORESIGHT_MAX; ++i) {
		if (i == GPU_CORESIGHT_GX)
		if (i == GPU_CORESIGHT_GX)
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
			adreno_dev_flag = ADRENO_DEVICE_CORESIGHT;
@@ -415,6 +424,9 @@ int adreno_coresight_init(struct adreno_device *adreno_dev)
	int i = 0;
	int i = 0;
	struct device_node *node, *child;
	struct device_node *node, *child;


	if (adreno_is_a650(adreno_dev))
		return 0;

	node = of_find_compatible_node(device->pdev->dev.of_node,
	node = of_find_compatible_node(device->pdev->dev.of_node,
					NULL, "qcom,gpu-coresight");
					NULL, "qcom,gpu-coresight");