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

Commit 65626235 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Only snapshot GMU on GMU boot failure"

parents 9f48bc4a b88b7081
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3091,6 +3091,7 @@ static const struct kgsl_functable adreno_functable = {
	.irq_handler = adreno_irq_handler,
	.drain = adreno_drain,
	/* Optional functions */
	.snapshot_gmu = adreno_snapshot_gmu,
	.drawctxt_create = adreno_drawctxt_create,
	.drawctxt_detach = adreno_drawctxt_detach,
	.drawctxt_destroy = adreno_drawctxt_destroy,
+4 −0
Original line number Diff line number Diff line
@@ -832,6 +832,7 @@ 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 *);
@@ -1006,6 +1007,9 @@ 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,
+1 −0
Original line number Diff line number Diff line
@@ -2915,6 +2915,7 @@ 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,
+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ 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
+11 −8
Original line number Diff line number Diff line
@@ -1471,10 +1471,18 @@ static void a6xx_snapshot_debugbus(struct kgsl_device *device,
	}
}

static void a6xx_snapshot_gmu(struct kgsl_device *device,
/*
 * a6xx_snapshot_gmu() - A6XX GMU snapshot function
 * @adreno_dev: Device being snapshotted
 * @snapshot: Pointer to the snapshot instance
 *
 * 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,
		struct kgsl_snapshot *snapshot)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);

	if (!kgsl_gmu_isenabled(device))
@@ -1571,16 +1579,11 @@ void a6xx_snapshot(struct adreno_device *adreno_dev,
	struct adreno_snapshot_data *snap_data = gpudev->snapshot_data;
	bool sptprac_on;

	/* GMU TCM data dumped through AHB */
	a6xx_snapshot_gmu(device, snapshot);

	sptprac_on = gpudev->sptprac_is_on(adreno_dev);

	/* Return if the GX is off */
	if (!gpudev->gx_is_on(adreno_dev)) {
		pr_err("GX is off. Only dumping GMU data in snapshot\n");
	if (!gpudev->gx_is_on(adreno_dev))
		return;
	}

	/* Dump the registers which get affected by crash dumper trigger */
	kgsl_snapshot_add_section(device, KGSL_SNAPSHOT_SECTION_REGS,
Loading