Skip to content

cavs: clk: add timeout to wait loop to avoid dead loop - #3192

Closed
keyonjie wants to merge 1 commit into
thesofproject:masterfrom
keyonjie:clk_fix
Closed

keyonjie wants to merge 1 commit into
thesofproject:masterfrom
keyonjie:clk_fix

Conversation

@keyonjie

Copy link
Copy Markdown
Contributor

Try 20 times and exit if it keeps failed to avoid dead loop.

Signed-off-by: Keyon Jie yang.jie@linux.intel.com

@paulstelian97 paulstelian97 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.

Shouldn't there also be an -ETIMEDOUT or some similar error in case the clock still isn't on? DON'T SWITCH TO A CLOCK THAT ISN'T ON! (you won't have a chance to panic I think)

Comment thread src/platform/intel/cavs/lib/clk.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.

Should be a platform macro (since it may be different on different CAVS platforms).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should be a platform macro (since it may be different on different CAVS platforms).

Hi @lgirdwood the platform specific stuff is already covered by PLATFORM_DEFAULT_DELAY.

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.

ok, but you should have a local macro then.

Comment thread src/platform/intel/cavs/lib/clk.c Resolved
@keyonjie

Copy link
Copy Markdown
Contributor Author

Thanks for feedback, @lgirdwood @paulstelian97 I will refine this PR after #3205 get merged as there may be conflict with changing the similar part.

@keyonjie
keyonjie marked this pull request as draft November 5, 2020 13:54
@keyonjie
keyonjie force-pushed the clk_fix branch 2 times, most recently from e0f4fe0 to 33206ab Compare February 7, 2021 14:53
@lgirdwood

Copy link
Copy Markdown
Member

@keyonjie look like you need to rebase - no hurry - lets do after CNY.

@keyonjie
keyonjie force-pushed the clk_fix branch 3 times, most recently from db1ad24 to e8194be Compare March 2, 2021 08:27
@keyonjie
keyonjie marked this pull request as ready for review March 2, 2021 09:00
@keyonjie
keyonjie requested review from lgirdwood and removed request for jajanusz and tlauda March 2, 2021 09:00
@keyonjie

keyonjie commented Mar 2, 2021

Copy link
Copy Markdown
Contributor Author

@lgirdwood @paulstelian97 updated now.

@paulstelian97 paulstelian97 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.

Looks good to me, but waiting for test results...

Try 20 times and exit if it keeps failed, trace error and not update the
current_freq_idx for the failed case.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
@lgirdwood lgirdwood closed this Mar 28, 2021
@lgirdwood
lgirdwood deleted the branch thesofproject:master March 28, 2021 13:44
@paulstelian97

Copy link
Copy Markdown
Collaborator

@keyonjie If this PR is still applicable, please submit it again.

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.

3 participants