Skip to content

detach ACPI platform dev from pm_domain for Minnowboard - #708

Merged
plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
ranj063:fix/byt_pm
Mar 19, 2019
Merged

plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
ranj063:fix/byt_pm

Conversation

@ranj063

@ranj063 ranj063 commented Mar 11, 2019 •

Copy link
Copy Markdown
Collaborator

Minnowboard has a known issue with the BIOS that prevents the DSP
from resuming back to D0 when the system resumes from S3 to S0.
So, detach the platform device from the pm_domain to prevent
the DSP from entering D3.

@bardliao bardliao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on BYT and it looks reasonable to me.

@ranj063

ranj063 commented Mar 12, 2019

Copy link
Copy Markdown
Collaborator Author

@juimonen this will allow all tests on the minnowboard but what we really need is for PM to be implemented. Do you think you could take a look into it?

@plbossart

Copy link
Copy Markdown
Member

Don't we have a known issue that the MinnowBoard will not survive S3 with audio enabled?

@ranj063

ranj063 commented Mar 12, 2019

Copy link
Copy Markdown
Collaborator Author

Don't we have a known issue that the MinnowBoard will not survive S3 with audio enabled?

@plbossart is that so? I had no idea. Then all the more reason to disable PM I suppose

@plbossart

Copy link
Copy Markdown
Member

@lgirdwood can you comment here? I think you're the only one who talked to the BIOS folks on this S3 issue.

@lgirdwood

Copy link
Copy Markdown
Member

@ranj063 minnowboard S3 -> S0 does not bring the DSP HW back to D0 state. A BIOS issue afaict.

@ranj063

ranj063 commented Mar 14, 2019

Copy link
Copy Markdown
Collaborator Author

@lgirdwood @plbossart in that case, is this change acceptable as a means to prevent the DSP from being turn off when all the DAPM widgets get powered down?

@plbossart

Copy link
Copy Markdown
Member

@lgirdwood @plbossart in that case, is this change acceptable as a means to prevent the DSP from being turn off when all the DAPM widgets get powered down?

we should do this conditionally on platforms where we know S3 support is broken. I think PM would work without issues on most platforms. I seem to be the only one left with Baytrail devices, we need to get more really.

@ranj063

ranj063 commented Mar 14, 2019

Copy link
Copy Markdown
Collaborator Author

@lgirdwood @plbossart in that case, is this change acceptable as a means to prevent the DSP from being turn off when all the DAPM widgets get powered down?

we should do this conditionally on platforms where we know S3 support is broken. I think PM would work without issues on most platforms. I seem to be the only one left with Baytrail devices, we need to get more really.

@plbossart a quick clarification. should this be platform specific or board specific? Is the minnowboard the only known BYT board to have this problem? How about the T100 that @singalsu has?

@plbossart

Copy link
Copy Markdown
Member

S3 exit should work on most platforms, I only know of the MinnowBoard as a problematic case.

@ranj063

ranj063 commented Mar 14, 2019

Copy link
Copy Markdown
Collaborator Author

S3 exit should work on most platforms, I only know of the MinnowBoard as a problematic case.
OK let me make this fix conditional only for the minnowboard in that case.

@ranj063

ranj063 commented Mar 15, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart sorry I am a bit confused about this. if I were to do this conditionally only for the minnmowboard, should I match the DMI and then disable PM?

@plbossart

plbossart commented Mar 18, 2019 via email

Copy link
Copy Markdown
Member

@ranj063 ranj063 changed the title ASoC: SOF: detach ACPI platform dev from pm_domain (for now) detach ACPI platform dev from pm_domain for Minnowboard Mar 19, 2019
@ranj063

ranj063 commented Mar 19, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart updated now

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, maybe a comment on the dev_pm_detach_domain() below to help reviewers, and also maybe add in the commit message what issue this really fixes (can't recall if this is related to the rt5651 issues)

Comment thread sound/soc/sof/sof-acpi-dev.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a comment that the second argument is telling the PM core to leave the DSP on during the detach process, not that it invalidates the detach itself:
@power_off: Used to indicate whether we should power off the device.

A recent change in the SOF driver to power off all DAPM widgets
in the audio pipeline when not active causes the DSP on the
Minnowboard to be powered off. This is despite the fact that PM
is not implemented for the Baytrail platform and we explicitly keep
the device usage count > 0 to prevent the system from being
runtime suspended.

In ACPI platforms (such as BYT), the platform device is attached
to a pm_domain. The pm_domain provider is responsible for
powering on/off all the devices that are attached it.
So when all the DAPM widgets in the card get powered down,
the pm_domain provider powers off the DSP as well.

Additionally, Minnowboard has a known issue with the BIOS that
prevents the DSP from resuming back to D0 when the system resumes
from S3 to S0.

So, given the above limitations, it is recommended to detach
the platform device from the pm_domain to prevent the DSP from being
powered off on the Minnowboard.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063

ranj063 commented Mar 19, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart updated now

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will likely add this to the v5 upstream patches tomorrow.
Thanks @ranj063

@plbossart
plbossart merged commit 68bbdac into thesofproject:topic/sof-dev Mar 19, 2019
@ranj063
ranj063 deleted the fix/byt_pm branch March 20, 2019 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants