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

Commit 77191023 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 1c69fd6e ed1869fa
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;