I downloaded Codec Engine 2.23.01 for Linux, and built dsplink, cmem, and lpm (lpm_omap3530) kernel modules for a 2.6.28 kernel. The drivers load fine, and all the test apps except LPM work fine. examples/sanity_test also complains (about LPM).
Here is the output from sanity_test/app.out (with tracing turned on in lpm_omap3530.ko):
App-> Application started.
--> LPM_on
lpm.ko: --> LPM_off
lpm.ko: Error: IVA2 power domain not OFF (1)
lpm.ko: <-- LPM_off: stat = 0x1
<-- LPM_on: stat = 0x1
@0x0006c103:[T:0x40957490] ti.sdo.ce.ipc.Power - Power_on> Turning on DSP power FAILED
lpm.ko: --> LPM_off
@0x0006c1f7:[T:0x40957490] OP - Processor_create_d> Power_on failed.
@0x0006c253:[T:0x4001cf30] CE - rserverOpen: can't start 'video_copy.x64P'; Processor_create failed
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.
lpm.ko: Error: IVA2 power domain not OFF (1)
lpm.ko: <-- LPM_off: stat = 0x1
I added some code to print some registers right where the LPM driver is failing, then ran lpm test "lpmOFF.xv5T":
==== LPM OFF Test ====
app: LPM_open
app: LPM_set(LPM_CTRL_REFCOUNTOVR)
app: LPM_off
lpm.ko: --> LPM_off
lpm.ko: Error: IVA2 power domain not OFF (1)
lpm.ko: IVA2 power control = 0x00FF0F04
lpm.ko: IVA2 power status = 0x00000FF7
lpm.ko: <-- LPM_off: stat = 0x1
Error: LPM_off failed
app: LPM_close
==== All Done ====
So it appears that LPM_off() is clearing the two least-significant bits of PM_PWSTCTRL_IVA2 (0x0x483060E0), then waiting for those same bits to clear in PM_PWSTST_IVA2 (0x483060E4). But after MAX_WAIT_COUNT (0x5000) reads, those bits are still set, so the driver gives up and reports a failure.
I am running on a LogicPD Zoom SOM-LV dev kit (noting that I lied and told the tools that I was running on an EVM3530 -- it has not mattered until now). I got the impression that this particular power register is controlling intra-chip things, but perhaps the board matters?
If the board does matter, what is a good/maintainable way to customize this? (I read about creating a board-specific ucvc driver to hook lpm_regExtOnFxn() and lpm_regExtOffFxn(), but lpm_omap3530.ko doesn't seem to call them.) If the board does not matter, any ideas on what has gone wrong and how to fix this? (Waiting for another MAX_WAIT_COUNT reads didn't fix it.)
Thanks in advance (for help, or perhaps just clues!),
-Dirk