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

Commit d72dbaac authored by Harshdeep Dhatt's avatar Harshdeep Dhatt Committed by Mohammed Mirza Mandayappurath Manzoor
Browse files

msm: kgsl: Add the A6XX preemption buffers to snapshot



Dump a block of the preemption buffers of every ringbuffer that is dumped
in the snapshot. This helps in debugging preemption issues. Also dump A5XX
preemption buffers with every ringbuffer that is dumped.

Change-Id: Ib56e2fc0ef926853b36d70f54f3403b8feb02994
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: default avatarMohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
parent d8ccfa1e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1029,6 +1029,8 @@ struct adreno_gpudev {
	int (*perfcounter_update)(struct adreno_device *adreno_dev,
				struct adreno_perfcount_register *reg,
				bool update_reg);
	size_t (*snapshot_preemption)(struct kgsl_device *, u8 *,
				 size_t, void *);
};

/**
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2019, 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
@@ -3635,4 +3635,5 @@ struct adreno_gpudev adreno_a5xx_gpudev = {
	.preemption_schedule = a5xx_preemption_schedule,
	.enable_64bit = a5xx_enable_64bit,
	.clk_set_options = a5xx_clk_set_options,
	.snapshot_preemption = a5xx_snapshot_preemption,
};
+2 −1
Original line number Diff line number Diff line
@@ -237,5 +237,6 @@ unsigned int a5xx_preemption_pre_ibsubmit(


void a5xx_preempt_callback(struct adreno_device *adreno_dev, int bit);

size_t a5xx_snapshot_preemption(struct kgsl_device *device, u8 *buf,
		size_t remain, void *priv);
#endif
+3 −14
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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
@@ -739,7 +739,7 @@ static size_t a5xx_snapshot_registers(struct kgsl_device *device, u8 *buf,
}

/* Snapshot a preemption record buffer */
static size_t snapshot_preemption_record(struct kgsl_device *device, u8 *buf,
size_t a5xx_snapshot_preemption(struct kgsl_device *device, u8 *buf,
	size_t remain, void *priv)
{
	struct kgsl_memdesc *memdesc = priv;
@@ -865,8 +865,7 @@ void a5xx_snapshot(struct adreno_device *adreno_dev,
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
	struct adreno_snapshot_data *snap_data = gpudev->snapshot_data;
	unsigned int reg, i;
	struct adreno_ringbuffer *rb;
	unsigned int reg;
	struct registers regs;

	/* Disable Clock gating temporarily for the debug bus to work */
@@ -965,16 +964,6 @@ void a5xx_snapshot(struct adreno_device *adreno_dev,
	/* Debug bus */
	a5xx_snapshot_debugbus(device, snapshot);

	/* Preemption record */
	if (adreno_is_preemption_enabled(adreno_dev)) {
		FOR_EACH_RINGBUFFER(adreno_dev, rb, i) {
			kgsl_snapshot_add_section(device,
				KGSL_SNAPSHOT_SECTION_GPU_OBJECT_V2,
				snapshot, snapshot_preemption_record,
				&rb->preemption_desc);
		}
	}

}

static int _a5xx_crashdump_init_shader(struct a5xx_shader_block *block,
+1 −0
Original line number Diff line number Diff line
@@ -3230,4 +3230,5 @@ struct adreno_gpudev adreno_a6xx_gpudev = {
	.perfcounter_update = a6xx_perfcounter_update,
	.coresight = {&a6xx_coresight, &a6xx_coresight_cx},
	.clk_set_options = a6xx_clk_set_options,
	.snapshot_preemption = a6xx_snapshot_preemption,
};
Loading