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

Commit c642eb7b authored by Rajesh Kemisetti's avatar Rajesh Kemisetti
Browse files

msm: kgsl: Update GBIF GX and CX block details for snapshot



GBIF GX and CX blocks use same ID while collecting the debugbus
details from HW but to parse them properly we need unique value.

Hence use unique values for GBIF GX and CX blocks while storing
the data to snapshot dump.

Also update the GMU GX blockID for A615 GPU while reading
the data from HW.

Change-Id: I45cea1497e529f33ebef4ceb8997a66fc9c13453
Signed-off-by: default avatarRajesh Kemisetti <rajeshk@codeaurora.org>
parent 8cf0b1c9
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-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
@@ -376,6 +376,7 @@ enum a6xx_debugbus_id {
	A6XX_DBGBUS_CX           = 0x17,
	A6XX_DBGBUS_GMU_GX       = 0x18,
	A6XX_DBGBUS_TPFCHE       = 0x19,
	A6XX_DBGBUS_GBIF_GX      = 0x1a,
	A6XX_DBGBUS_GPC          = 0x1d,
	A6XX_DBGBUS_LARC         = 0x1e,
	A6XX_DBGBUS_HLSQ_SPTP    = 0x1f,
@@ -1161,11 +1162,14 @@ static size_t a6xx_snapshot_dbgc_debugbus_block(struct kgsl_device *device,
	}

	header->id = block->block_id;
	if ((block->block_id == A6XX_DBGBUS_VBIF) &&
		adreno_has_gbif(adreno_dev))
		header->id = A6XX_DBGBUS_GBIF_GX;
	header->count = dwords * 2;

	block_id = block->block_id;
	/* GMU_GX data is read using the GMU_CX block id on A630 */
	if (adreno_is_a630(adreno_dev) &&
	if ((adreno_is_a630(adreno_dev) || adreno_is_a615(adreno_dev)) &&
		(block_id == A6XX_DBGBUS_GMU_GX))
		block_id = A6XX_DBGBUS_GMU_CX;

@@ -1428,6 +1432,7 @@ static void a6xx_snapshot_debugbus(struct kgsl_device *device,
				KGSL_SNAPSHOT_SECTION_DEBUGBUS,
				snapshot, a6xx_snapshot_cx_dbgc_debugbus_block,
				(void *) &a6xx_cx_dbgc_debugbus_blocks[i]);
		}
		/*
		 * Get debugbus for GBIF CX part if GPU has GBIF block
		 * GBIF uses exactly same ID as of VBIF so use
@@ -1441,7 +1446,6 @@ static void a6xx_snapshot_debugbus(struct kgsl_device *device,
				(void *) &a6xx_vbif_debugbus_blocks);
	}
}
}

/*
 * a6xx_snapshot_gmu() - A6XX GMU snapshot function