[lkml]   [2012]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH/RFC] dmaengine: add a slave parameter to __dma_request_channel()
    On Thu, Mar 8, 2012 at 11:16 AM, Guennadi Liakhovetski
    <> wrote:

    >(...) our case can be handled _very_ easily:
    > 1. a client requests a channel of a specific type
    > 2. one of channels of that type, residing on one of compatible
    >   controllers, is allocated, configured and handed in to the client
    > That's it. No filtering, no post-allocation configuration - at least so
    > far. And penalising such a simple case by forcing it to use virtual
    > channels and filter through some unnatural mappings doesn't seem very
    > productive to me.

    But you do realize that this increases the complexity of the
    dmaengine and means more maintenance burden for the
    subsystem maintainer that will after this have to think in two
    different sematic ways about channel retrieveal - yeah this one
    passes that as parameter and this one has a config struct
    provided, then this one use a filter function still - etc.

    That is, of course, unless you convert all the existing DMA
    engines to do it the same way, then it's redesigning proper.

    In that case I am much more positive to the change, even
    if it doesn't take us all the way to the new channel mappings
    we want to have.

    You haven't stated whether you will go in and rewrite the other
    drivers to use this scheme or whether you will just add this one
    kludge to handle this one DMA controller, then just update
    all others to ignore the parameter. (You'd obviously have to
    do that to get this to even compile...)

    So the *proper* way to refactor to using this scheme would
    be to introduce this new scheme *and* remove the filter
    function from all the other drivers and DMA engine at large,
    so it's not needed anymore. Which means a bit of refactoring.

    Currently drivers have to pass a filter function from
    platform data to filter out relevant channels, and with
    the new style (this patch plus removing all filter functions)
    it will be passing something else instead. That's all
    fine, and actually an improvement, because passing around
    a filter function is not as good as passing some struct
    with data.

    So does RFC patch mean you will fix this up for everyone
    or does it mean something else?

    If you're not also planning to get rid of the filter functions
    for all other drivers I don't see this going anywhere right
    now. It is not beneficial for dmaengine, the only benefit
    is one more kludgy driver to maintain.

    Linus Walleij
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2012-03-08 12:49    [W:0.024 / U:0.820 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site