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

Commit f2a01c49 authored by Jordan Crouse's avatar Jordan Crouse Committed by Jeremy Gebben
Browse files

msm: kgsl: Read 64 bit GPU registers where applicable



RB_BASE and IB1_BASE GPU addresses are 64 bit values on 5XX targets.
Get into the habit of reading and treating the values as 64 bit
values so we can easily transition without hiccups.

Change-Id: Ic0dedbad0b12eedecf2dd9dfc412bfa181426c48
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 1edae0dd
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -921,7 +921,7 @@ static void __adreno_dispatcher_preempt_trig_state(
{
	struct adreno_dispatcher *dispatcher = &adreno_dev->dispatcher;
	struct kgsl_device *device = &(adreno_dev->dev);
	unsigned int rbbase;
	uint64_t rbbase;

	/*
	 * Hardware not yet idle means that preemption interrupt
@@ -944,7 +944,8 @@ static void __adreno_dispatcher_preempt_trig_state(
	 * be device went idle w/o encountering any preempt token or
	 * we already preempted w/o interrupt
	 */
	adreno_readreg(adreno_dev, ADRENO_REG_CP_RB_BASE, &rbbase);
	adreno_readreg64(adreno_dev, ADRENO_REG_CP_RB_BASE,
			ADRENO_REG_CP_RB_BASE_HI, &rbbase);
	 /* Did preemption occur, if so then change states and return */
	if (rbbase != adreno_dev->cur_rb->buffer_desc.gpuaddr) {
		unsigned int val;
@@ -2081,7 +2082,8 @@ static int dispatcher_do_fault(struct kgsl_device *device)
	struct adreno_dispatcher_cmdqueue *dispatch_q = NULL, *dispatch_q_temp;
	struct adreno_ringbuffer *rb;
	struct adreno_ringbuffer *hung_rb = NULL;
	unsigned int reg, base;
	unsigned int reg;
	uint64_t base;
	struct kgsl_cmdbatch *cmdbatch = NULL;
	int ret, i;
	int fault;
@@ -2121,7 +2123,8 @@ static int dispatcher_do_fault(struct kgsl_device *device)
	/* hang opcode */
	kgsl_cffdump_hang(device);

	adreno_readreg(adreno_dev, ADRENO_REG_CP_RB_BASE, &base);
	adreno_readreg64(adreno_dev, ADRENO_REG_CP_RB_BASE,
		ADRENO_REG_CP_RB_BASE_HI, &base);

	/*
	 * If the fault was due to a timeout then stop the CP to ensure we don't
@@ -2168,7 +2171,8 @@ static int dispatcher_do_fault(struct kgsl_device *device)
	/* Set pagefault if it occurred */
	kgsl_mmu_set_pagefault(&device->mmu);

	adreno_readreg(adreno_dev, ADRENO_REG_CP_IB1_BASE, &base);
	adreno_readreg64(adreno_dev, ADRENO_REG_CP_IB1_BASE,
		ADRENO_REG_CP_IB1_BASE_HI, &base);

	/*
	 * Dump the snapshot information if this is the first