From f2fd15a331fd3b5b63f0dc6f492651330adcedf9 Mon Sep 17 00:00:00 2001 From: Guillaume Denneulin Date: Thu, 20 Dec 2012 17:53:29 +0100 Subject: PFW: Add resync mechanism if a subsystem needs resync BZ: 76267 In the case of a hw subsystems reset, it's possible that its parameter managed by the PFW may not be aligned with the PFW blackboard. A re-synchronization mechanism is implemented to ensure that the subsystem is re-synchronized on the next configurations application. Change-Id: I032150955d25a7020cf494e69456897b4c157916 Signed-off-by: Guillaume Denneulin Reviewed-on: http://android.intel.com:8080/83015 Reviewed-by: Rocard, KevinX Reviewed-by: Centelles, Sylvain Tested-by: Dixon, CharlesX Reviewed-by: cactus Tested-by: cactus --- parameter/ConfigurableDomains.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'parameter/ConfigurableDomains.cpp') diff --git a/parameter/ConfigurableDomains.cpp b/parameter/ConfigurableDomains.cpp index a1bfb3c..fcfeb4d 100644 --- a/parameter/ConfigurableDomains.cpp +++ b/parameter/ConfigurableDomains.cpp @@ -61,17 +61,13 @@ void CConfigurableDomains::validate(const CParameterBlackboard* pMainBlackboard) } // Configuration application if required -void CConfigurableDomains::apply(CParameterBlackboard* pParameterBlackboard, bool bForce) const +void CConfigurableDomains::apply(CParameterBlackboard* pParameterBlackboard, CSyncerSet& syncerSet, bool bForce) const { - CAutoLog autoLog(this, "Applying configurations"); - // Syncer set - CSyncerSet syncerSet; - - // Delegate to domains + /// Delegate to domains - // Start with sequence unaware domains + // Start with domains that can be synchronized all at once (with passed syncer set) uint32_t uiChild; uint32_t uiNbConfigurableDomains = getNbChildren(); @@ -79,23 +75,19 @@ void CConfigurableDomains::apply(CParameterBlackboard* pParameterBlackboard, boo const CConfigurableDomain* pChildConfigurableDomain = static_cast(getChild(uiChild)); - if (!pChildConfigurableDomain->getSequenceAwareness()) { - // Apply sequence unaware domain - pChildConfigurableDomain->apply(pParameterBlackboard, syncerSet, bForce); - } + // Apply and collect syncers when relevant + pChildConfigurableDomain->apply(pParameterBlackboard, &syncerSet, bForce); } - // Synchronize sequence unaware domains + // Synchronize those collected syncers syncerSet.sync(*pParameterBlackboard, false, NULL); - // Then deal with sequence aware domains + // Then deal with domains that need to synchronize along apply for (uiChild = 0; uiChild < uiNbConfigurableDomains; uiChild++) { const CConfigurableDomain* pChildConfigurableDomain = static_cast(getChild(uiChild)); - if (pChildConfigurableDomain->getSequenceAwareness()) { - // Apply sequence aware domain - pChildConfigurableDomain->apply(pParameterBlackboard, syncerSet, bForce); - } + // Apply and synchronize when relevant + pChildConfigurableDomain->apply(pParameterBlackboard, NULL, bForce); } } -- cgit v1.1