summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMiguel Vadillo <vadillo@ti.com>2011-04-07 08:43:47 +0100
committerAndy Green <andy.green@linaro.org>2011-04-07 08:43:47 +0100
commite632ca0e6da88d9631da0e94e7f26dceb1d913e6 (patch)
treeb777f6e29cfb6b3653d5f0534d979c61d4521ede /drivers
parentb42bf255de0d39877782f3a410f032385cedfb65 (diff)
syslink: ipu_pm: fix ret in idle path after recovery
After recovery the mechanism to release all the resources and constraints was not taking in to consideration the IPU that is created behind the scenes to handle the sys and app constraints and as a consequence all the constraints attached to it were not released leading to not hit retention in idle path. That IPU behind scenes is a special rcb slot that only has constraints; the fix is taking care of this case and releases only the constraints. If the IPU is explicitly requested then it will be consider as a normal resource. Change-Id: I49a7ab05912bcc4de4e61c223ba0f4dd4c7a2d83 Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dsp/syslink/ipu_pm/ipu_pm.c20
-rw-r--r--drivers/dsp/syslink/ipu_pm/ipu_pm.h14
2 files changed, 21 insertions, 13 deletions
diff --git a/drivers/dsp/syslink/ipu_pm/ipu_pm.c b/drivers/dsp/syslink/ipu_pm/ipu_pm.c
index 5a727740461..5ed0d90a293 100644
--- a/drivers/dsp/syslink/ipu_pm/ipu_pm.c
+++ b/drivers/dsp/syslink/ipu_pm/ipu_pm.c
@@ -482,7 +482,7 @@ static void ipu_pm_clean_res(void)
struct ipu_pm_object *handle;
struct ipu_pm_params *params;
struct rcb_block *rcb_p;
- int cur_rcb = 1;
+ int cur_rcb = 0;
u32 mask;
int res;
int retval = 0;
@@ -525,11 +525,19 @@ static void ipu_pm_clean_res(void)
pr_err("Error releasing res:%d cstrs\n", res);
}
- if (_is_res(res)) {
- pr_debug("Releasing res:%d\n", res);
- retval = release_fxn[res](handle, rcb_p, params);
- if (retval)
- pr_err("Can't release resource: %d\n", res);
+ /* The first resource is internally created to manage the
+ * the constrainst of the IPU via SYS and APP and it shouldn't
+ * be released as a resource
+ */
+ if (cur_rcb > 1) {
+ if (_is_res(res)) {
+ pr_debug("Releasing res:%d\n", res);
+ retval = release_fxn[res](handle, rcb_p,
+ params);
+ if (retval)
+ pr_err("Can't release resource: %d\n",
+ res);
+ }
}
/* Clear the RCB from the RAT if success */
diff --git a/drivers/dsp/syslink/ipu_pm/ipu_pm.h b/drivers/dsp/syslink/ipu_pm/ipu_pm.h
index e7efeae9851..88a9cb4dbd9 100644
--- a/drivers/dsp/syslink/ipu_pm/ipu_pm.h
+++ b/drivers/dsp/syslink/ipu_pm/ipu_pm.h
@@ -91,12 +91,6 @@
#include <linux/workqueue.h>
#include <linux/kfifo.h>
-/* Pm notify ducati driver */
-#define A9 3
-#define SYS_M3 2
-#define APP_M3 1
-#define TESLA 0
-
/* Suspend/resume/other... */
#define NUMBER_PM_EVENTS 4
@@ -106,6 +100,12 @@
#define APP_M3 1
#define TESLA 0
+/* If sysm3 or appm3 is requested ipu will be automatically requested
+ * this is beacause the cstrs can only be set to ipu and not individually.
+ * SYSM3 + APPM3 + IPU
+ */
+#define MAX_IPU_COUNT 3
+
#define PM_CSTR_PERF_MASK 0x00000001
#define PM_CSTR_LAT_MASK 0x00000002
#define PM_CSTR_BW_MASK 0x00000004
@@ -150,7 +150,7 @@
* i.e. Ducati is using 0 to 4 (b00000011) rcb's for internal purpose
* without requestig any resource.
*/
-#define RESERVED_RCBS 0xFFFFFFFC
+#define RESERVED_RCBS 0xFFFFFFFE
#define PM_RESOURCE 2
#define PM_NOTIFICATION 3