summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
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