Skip to content

upstream: rework snd_sof_dsp_register_poll #358

Closed

Description

@plbossart
  1. No need to have an additional variable (done) when refactoring can provide
    you an existing variable (time) to be tested instead.

  2. There are generic macros readx_poll_timeout() that are doing this kind of
    busy loop with IO.

Activity

  1. self-assigned this
    on Dec 3, 2018
  2. ranj063 commented on Dec 4, 2018

    @ranj063
    Collaborator

    @plbossart #366 addresses the first point in this request.

    I have crashed my board over 20 times trying to get readx_poll_timeout() to work instead. I will submit another one later if I ever get it working.

  3. kv2019i commented on Mar 22, 2019

    @kv2019i
    Collaborator

    Created a patch for this now, will send pull req later after a bit more reviews on the kernel style issues (it's been a while):
    https://github.com/kv2019i/linux/tree/topic/issue358-fix

  4. plbossart commented on Mar 24, 2019

    @plbossart
    MemberAuthor

    Created a patch for this now, will send pull req later after a bit more reviews on the kernel style issues (it's been a while):
    https://github.com/kv2019i/linux/tree/topic/issue358-fix

    @kv2019i see my comments directly on your branch. Thanks!

  5. kv2019i commented on Mar 25, 2019

    @kv2019i
    Collaborator

    @plbossart Thanks Pierre for the review comments! I was actually planning to still polish a bit and send a proper PR, but you beat me to it. :)

    But yeah, I'll copy my reply to one of the core opens to here as well. I'll fix the rest and leave the patch in otherwise clean state.

    On the snd_sof_dsp_read_poll_timeout() macro I added:

    ""Yes. This is a verbatim copy of include/linux/iopoll.h. It's a good question whether this is worth the trouble, but at least in regmem a similar approach is taken an copy of iopoll.h with identical interface is provided (regmap_read_poll_timeout). If we start modifying the macro, then you can't make the connection to iopoll.h anymore and the change become somewhat moot.

    So I think we have a few options:

    1. Remove the abstractions for I/O writes from SOF and directly use iopoll.h macros ,
    2. Just keep the old solution.
    3. Take the approach of this patch and follow what regmem does (closer to rest of kernel but still some custom code)

    I'm not sure it makes sense to touch the current code unless we can align with rest of the kernel. If we anyways have a custom code, why not just use the current one?""

  6. plbossart commented on Mar 25, 2019

    @plbossart
    MemberAuthor

    @kv2019i i'd really like to keep this two-resolution method, otherwise we'll be changing the functionality and enter uncharted waters with a behavior that differs from what previous solutions used. If it ain't broke don't fix it applies here.

  7. ranj063 commented on Mar 26, 2019

    @ranj063
    Collaborator

    @plbossart the two-resolution was added only recently in January. And the main reason was suspend stress test failures. We have come a long way in terms of fixing the device hierarchy and the PM flow since then, I think it might be worthwhile to give @kv2019i's approach a try.

  8. ranj063 commented on Mar 26, 2019

    @ranj063
    Collaborator

    @plbossart the two-resolution was added only recently in January. And the main reason was suspend stress test failures. We have come a long way in terms of fixing the device hierarchy and the PM flow since then, I think it might be worthwhile to give @kv2019i's approach a try.

  9. plbossart commented on Mar 28, 2019

    @plbossart
    MemberAuthor

    @ranj063 the 2-step approach came from the cAVS driver and has been in use for a long time, if we have a working solution let's keep it. We have additional programming sequences to double-check to harden our code.

  10. ranj063 commented on Mar 28, 2019

    @ranj063
    Collaborator

    @plbossart that sounds fair. Although I have to mention that the cavs driver added this logic exactly for the same reasons as us and I truly believe it is a bit of an overkill.

  11. kv2019i commented on Apr 1, 2019

    @kv2019i
    Collaborator

    No need to have an additional variable (done) when refactoring can provide you an existing variable (time) to be tested instead.

    Done with PR366 merged.

    There are generic macros readx_poll_timeout() that are doing this kind of busy loop with IO.

    Done with PR750 merged.

    Closing the issue, thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions