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

Commit 36f50523 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Dump both GMU and GPU state for GMU faults



GPU state especially command processor state is important
to debug GMU fault. If GPU is powered ON, dump both GMU
and GPU state for GMU faults to make sure all required
state needed for debug is captured.

Change-Id: I71b359cd944a12cb19c419bca0254fd2fa468328
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 387632bf
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3772,7 +3772,6 @@ static const struct kgsl_functable adreno_functable = {
	.device_private_create = adreno_device_private_create,
	.device_private_destroy = adreno_device_private_destroy,
	/* Optional functions */
	.snapshot_gmu = adreno_snapshot_gmu,
	.drawctxt_create = adreno_drawctxt_create,
	.drawctxt_detach = adreno_drawctxt_detach,
	.drawctxt_destroy = adreno_drawctxt_destroy,
+0 −4
Original line number Diff line number Diff line
@@ -941,7 +941,6 @@ struct adreno_gpudev {
	/* GPU specific function hooks */
	void (*irq_trace)(struct adreno_device *, unsigned int status);
	void (*snapshot)(struct adreno_device *, struct kgsl_snapshot *);
	void (*snapshot_gmu)(struct adreno_device *, struct kgsl_snapshot *);
	void (*platform_setup)(struct adreno_device *);
	void (*init)(struct adreno_device *);
	void (*remove)(struct adreno_device *);
@@ -1123,9 +1122,6 @@ void adreno_snapshot(struct kgsl_device *device,
		struct kgsl_snapshot *snapshot,
		struct kgsl_context *context);

void adreno_snapshot_gmu(struct kgsl_device *device,
		struct kgsl_snapshot *snapshot);

int adreno_reset(struct kgsl_device *device, int fault);

void adreno_fault_skipcmd_detached(struct adreno_device *adreno_dev,
+0 −1
Original line number Diff line number Diff line
@@ -3909,7 +3909,6 @@ struct adreno_gpudev adreno_a6xx_gpudev = {
	.reg_offsets = &a6xx_reg_offsets,
	.start = a6xx_start,
	.snapshot = a6xx_snapshot,
	.snapshot_gmu = a6xx_snapshot_gmu,
	.irq = &a6xx_irq,
	.snapshot_data = &a6xx_snapshot_data,
	.irq_trace = trace_kgsl_a5xx_irq_status,
+1 −4
Original line number Diff line number Diff line
/* Copyright (c) 2017, 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
@@ -129,8 +129,5 @@ void a6xx_preemption_context_destroy(struct kgsl_context *context);

void a6xx_snapshot(struct adreno_device *adreno_dev,
		struct kgsl_snapshot *snapshot);
void a6xx_snapshot_gmu(struct adreno_device *adreno_dev,
		struct kgsl_snapshot *snapshot);

void a6xx_crashdump_init(struct adreno_device *adreno_dev);
#endif
+10 −3
Original line number Diff line number Diff line
@@ -1456,7 +1456,7 @@ static void a6xx_snapshot_debugbus(struct kgsl_device *device,
 * This is where all of the A6XX GMU specific bits and pieces are grabbed
 * into the snapshot memory
 */
void a6xx_snapshot_gmu(struct adreno_device *adreno_dev,
static void a6xx_snapshot_gmu(struct adreno_device *adreno_dev,
		struct kgsl_snapshot *snapshot)
{
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
@@ -1479,8 +1479,6 @@ void a6xx_snapshot_gmu(struct adreno_device *adreno_dev,
				a6xx_gmu_gx_registers,
				ARRAY_SIZE(a6xx_gmu_gx_registers) / 2);
	}

	a6xx_snapshot_debugbus(device, snapshot);
}

/* a6xx_snapshot_sqe() - Dump SQE data in snapshot */
@@ -1571,6 +1569,15 @@ void a6xx_snapshot(struct adreno_device *adreno_dev,
	/* GMU TCM data dumped through AHB */
	a6xx_snapshot_gmu(adreno_dev, snapshot);

	/*
	 * Dump debugbus data here to capture it for both
	 * GMU and GPU snapshot. Debugbus data can be accessed
	 * even if the gx headswitch or sptprac is off. If gx
	 * headswitch is off, data for gx blocks will show as
	 * 0x5c00bd00.
	 */
	a6xx_snapshot_debugbus(device, snapshot);

	sptprac_on = gpudev->sptprac_is_on(adreno_dev);

	/* Return if the GX is off */
Loading