From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: maciej.sosnowski@intel.com, dan.j.williams@intel.com,
Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Subject: Re: [PATCH 2/4 v1] i.MX31: Image Processing Unit DMA and IRQ drivers
Date: Tue, 11 Nov 2008 10:36:24 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0811111029120.4565@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.0811071512500.4513@axis700.grange>
(moved to LKML and added Haavard as the author of dw_dmac and DMA_SLAVE
support to cc:)
On Fri, 7 Nov 2008, Guennadi Liakhovetski wrote:
> Now to the problems I encountered with the dmaengine framework. Basically
> I was unable to find out how I can release specific transfer-descriptors
> without using ->device_terminate_all(), and channels without unregistering
> the client.
>
> I did see the DMA_CTRL_ACK flag, but it looks like it is used
> inconsistently in various drivers. In the header it is described as
>
> * @DMA_CTRL_ACK - the descriptor cannot be reused until the client
> * acknowledges receipt, i.e. has has a chance to establish any
> * dependency chains
>
> but I haven't found any way to actually "acknowledge receipt" of the
> descriptor. There are two macros in dmaengine.h: async_tx_ack() and
> async_tx_test_ack() but their implementation doesn't look right:
> async_tx_ack() does just
>
> tx->flags |= DMA_CTRL_ACK;
>
> and async_tx_test_ack()
>
> return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
>
> So, instead of using this flag to say "do not release until acked" it now
> means "acked, can be released?" In ipu_idmac.c I have to be able to
> release specific transfer-descriptors, so, I added a .tx_free() pointer to
> struct dma_async_tx_descriptor.
>
> As for releasing channels - there is a dma_chan_cleanup() function, which
> calls the .device_free_chan_resources() method in struct dma_device and
> decremts channel's refcount, but this doesn't seem to lead to the
> chan->client_count counter being decremented, i.e.,
> dma_clients_notify_removed() never gets called as it, probably, should be.
> I have no solution to this problem, so, releasing specific channels in
> ipu_idmac.c currently doesn't work.
I still have no solution to this ->client_count problem. Is this a bug and
there should be a way to release a channel (including decrementint the
client_count) without unregistering the client, or am I missing something?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
next parent reply other threads:[~2008-11-11 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0811071454000.4513@axis700.grange>
[not found] ` <Pine.LNX.4.64.0811071512500.4513@axis700.grange>
2008-11-11 9:36 ` Guennadi Liakhovetski [this message]
2008-11-11 15:37 ` Dan Williams
2008-11-11 18:13 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0811111029120.4565@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=dan.j.williams@intel.com \
--cc=haavard.skinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.sosnowski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®