Re: [PATCH] ASoC: OMAP: HDMI: Prevent DSS module from going idle when playing audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 16 Dec 2011, Tomi Valkeinen wrote:

> Ricardo, struct omap_dss_board_info already contains a few function
> pointers, for example get_context_loss_count. I think
> omap_hwmod_set_slave_idlemode can be handled the same way.
> 
> Although I'm not sure should the function pointer be just
> "set_slave_idlemode", and thus just a direct way to call the hwmod func,
> or should it be something more use case specific, like, say
> "hdmi_audio_start/stop".
> 
> I'm thinking it should be the latter. As far as I understand, the bug is
> not in the HDMI IP, but somewhere in the L3 side? And if so, it's not
> the HDMI driver's job to know how to fix the bug, but just to offer
> hooks so that the platform code can fix it.

Should the HDMI module ever be allowed to run in smart-idle wakeup mode 
while it's active?  If not, then the easy way to fix this bug would be to 
add the HWMOD_SWSUP_SIDLE flag to the HDMI omap_hwmod.flags field.  No 
omap_device/omap_hwmod code/pdata hacking needed.

On the other hand, if there are times when the HDMI module should run in 
smart-idle wakeup while it's active, then some code would be needed.  
It's ironic that the bug is related to L3 interface clock autoidle, but 
that we no longer have the ability to control that on OMAP4...  My 
recollection is that the McBSP + sidetone blocks have exactly the same bug 
on OMAP3, but that case is even worse because they can't use the module 
slave idle bits to fix the problem due to some power management 
regression.

So anyway, off the top of my head, I'd naïvely suggest something like 
omap_hwmod_block_slave_autoidle() and omap_hwmod_allow_slave_autoidle().  
I don't think we'd have a situation where we'd need to use-count these, 
unless you think otherwise.  So I'd suggest having those functions do 
nothing if HWMOD_SWSUP_SIDLE is set in omap_hwmod.flags.  Otherwise, I'd 
suggest that block() should set a new omap_hwmod._int_flags bit, 
_HWMOD_SWSUP_SIDLE_FORCE or something, and call _set_slave_idlemode() 
appropriately.  allow() should clear that flag and call 
_set_slave_idlemode() appropriately.  It will also be necessary to change 
every place in the hwmod code that tests omap_hwmod.flags against 
HWMOD_SWSUP_SIDLE to also test omap_hwmod._int_flags against 
_HWMOD_SWSUP_SIDLE_FORCE, e.g., in _{enable,disable}_wakeup(), 
_{enable,idle}_sysc(), etc.

Thoughts welcome.

- Paul

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux