Skip to contentSkip to conversation

DSPBRIDGE: Improve flush_all() performance

PATCH New Omar Ramirez Luna 1 participant 1 message Dec 17, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DSPBRIDGE: Improve flush_all() performance

From: Ameya Palande <[email protected]>

This patch improves performance of flush_all operation by:

1. Instead of checking IVA state by reading a register, use pDevContext->dwBrdState variable.

2. Only call WakeDSP() when IVA is in OFF state.

Ported from:
http://gitorious.org/tidspbridge/mainline/commit/f0cc4ab4e4c40043a423f178a970ad9c8ab8fa06

---
 drivers/dsp/bridge/wmd/tiomap3430.c |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
drivers/dsp/bridge/wmd/tiomap3430.c +4 -14
index b7447e1..7138396 100644
@@ -275,21 +275,11 @@ static inline void tlb_flush_all(const void __iomem *base)
 
 static inline void flush_all(struct WMD_DEV_CONTEXT *pDevContext)
 {
-	struct CFG_HOSTRES resources;
-	u32 temp = 0;
-
-	CFG_GetHostResources((struct CFG_DEVNODE *)DRV_GetFirstDevExtension(),
-				&resources);
-	HW_PWRST_IVA2RegGet(resources.dwPrmBase, &temp);
-
-	if ((temp & HW_PWR_STATE_ON) == HW_PWR_STATE_OFF ||
-	    (temp & HW_PWR_STATE_ON) == HW_PWR_STATE_RET) {
-		CLK_Enable(SERVICESCLK_iva2_ck);
+	if (pDevContext->dwBrdState == BRD_DSP_HIBERNATION ||
+				pDevContext->dwBrdState == BRD_HIBERNATION)
 		WakeDSP(pDevContext, NULL);
-		tlb_flush_all(pDevContext->dwDSPMmuBase);
-		CLK_Disable(SERVICESCLK_iva2_ck);
-	} else
-		tlb_flush_all(pDevContext->dwDSPMmuBase);
+
+	tlb_flush_all(pDevContext->dwDSPMmuBase);
 }
 
 static void bad_page_dump(u32 pa, struct page *pg)
Signature · 1 line
1.6.2.4