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

Commit ed1869fa authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Dump ringbuffer in snapshot when GX GDSC is off



Allow ringbuffer dump in snapshot when GX is off, as it is
not having any dependency with the GX GDSC sate.

Change-Id: I73f55ae983647189617264973446413a9cc38b04
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 54ada83a
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -276,19 +276,15 @@ static void snapshot_rb_ibs(struct kgsl_device *device,
		struct kgsl_snapshot *snapshot)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	unsigned int rptr, *rbptr;
	unsigned int *rbptr, rptr = adreno_get_rptr(rb);
	int index, i;
	int parse_ibs = 0, ib_parse_start;

	/* Get the current read pointers for the RB */
	adreno_readreg(adreno_dev, ADRENO_REG_CP_RB_RPTR, &rptr);

	/*
	 * Figure out the window of ringbuffer data to dump.  First we need to
	 * find where the last processed IB ws submitted.  Start walking back
	 * from the rptr
	 */

	index = rptr;
	rbptr = rb->buffer_desc.hostptr;

@@ -848,19 +844,19 @@ void adreno_snapshot(struct kgsl_device *device, struct kgsl_snapshot *snapshot,
	if (gpudev->snapshot)
		gpudev->snapshot(adreno_dev, snapshot);

	/* Dumping these buffers is useless if the GX is not on */
	if (!gmu_core_dev_gx_is_on(device))
		return;

	setup_fault_process(device, snapshot,
			context ? context->proc_priv : NULL);

	if (gmu_core_dev_gx_is_on(device)) {
		adreno_readreg64(adreno_dev, ADRENO_REG_CP_IB1_BASE,
				ADRENO_REG_CP_IB1_BASE_HI, &snapshot->ib1base);
	adreno_readreg(adreno_dev, ADRENO_REG_CP_IB1_BUFSZ, &snapshot->ib1size);
		adreno_readreg(adreno_dev, ADRENO_REG_CP_IB1_BUFSZ,
				&snapshot->ib1size);
		adreno_readreg64(adreno_dev, ADRENO_REG_CP_IB2_BASE,
				ADRENO_REG_CP_IB2_BASE_HI, &snapshot->ib2base);
	adreno_readreg(adreno_dev, ADRENO_REG_CP_IB2_BUFSZ, &snapshot->ib2size);
		adreno_readreg(adreno_dev, ADRENO_REG_CP_IB2_BUFSZ,
				&snapshot->ib2size);
	}

	snapshot->ib1dumped = false;
	snapshot->ib2dumped = false;