msm: kgsl: Remove extra interrupts when setting MMU state

The interrupts added to the ringbuffer on PTFLUSH and TLBUPDATE
were causing a major increase in the number of interrupts from the GPU.
This was leading to increase in power and loss of performance. Add a check
to turn off IOMMU clocks when going to SLEEP.

Change-Id: I41617dd3b7b3f7d9622523f2a1407b912dbd989e
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This commit is contained in:
Shubhraprakash Das
2012-11-20 15:15:08 -07:00
committed by Stephen Boyd
parent 7681021ad9
commit d83ae276b4
3 changed files with 10 additions and 7 deletions

View File

@@ -385,13 +385,6 @@ static void adreno_iommu_setstate(struct kgsl_device *device,
*cmds++ = cp_type3_packet(CP_INVALIDATE_STATE, 1);
*cmds++ = 0x7fff;
sizedwords += 2;
/*
* add an interrupt at the end of commands so that the smmu
* disable clock off function will get called
*/
*cmds++ = cp_type3_packet(CP_INTERRUPT, 1);
*cmds++ = CP_INT_CNTL__RB_INT_MASK;
sizedwords += 2;
/* This returns the per context timestamp but we need to
* use the global timestamp for iommu clock disablement */
adreno_ringbuffer_issuecmds(device, adreno_ctx,

View File

@@ -25,6 +25,7 @@
#include "kgsl_mmu.h"
#include "kgsl_device.h"
#include "kgsl_sharedmem.h"
#include "adreno.h"
#define KGSL_MMU_ALIGN_SHIFT 13
#define KGSL_MMU_ALIGN_MASK (~((1 << KGSL_MMU_ALIGN_SHIFT) - 1))
@@ -553,6 +554,12 @@ void kgsl_setstate(struct kgsl_mmu *mmu, unsigned int context_id,
uint32_t flags)
{
struct kgsl_device *device = mmu->device;
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
if (!(flags & (KGSL_MMUFLAGS_TLBFLUSH | KGSL_MMUFLAGS_PTUPDATE))
&& !adreno_is_a2xx(adreno_dev))
return;
if (KGSL_MMU_TYPE_NONE == kgsl_mmu_type)
return;
else if (device->ftbl->setstate)

View File

@@ -1154,6 +1154,9 @@ _sleep(struct kgsl_device *device)
kgsl_pwrstate_to_str(device->state));
break;
}
kgsl_mmu_disable_clk_on_ts(&device->mmu, 0, false);
return 0;
}