linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] S3C64XX DMA: S3C2410_DMAF_CIRCULAR disable
Date: Wed, 16 Sep 2009 01:28:32 +0100	[thread overview]
Message-ID: <20090916002832.GN13508@trinity.fluff.org> (raw)
In-Reply-To: <1253008882-7587-1-git-send-email-jassi.brar@samsung.com>

On Tue, Sep 15, 2009 at 07:01:22PM +0900, Jassi wrote:
> S3C2410_DMAF_CIRCULAR requires that we don't free buffer
> resources after TC-IRQ because we will revisit the buffer.
> During simple long term playback/capture, like movie-play,
> this may block those resources(kmem/dma_pool) unncessarily.
> This is especially a problem since we allocate them in IRQ
> context.
> For now, we disable the option and free buff resources after
> it's TC-IRQ. Also, chan->curr will point to the active buffer
> while chan->next is rendered useless.

This would have been better changing the sound driver and ensuring
it does not allocate as much memory for buffering audio.

The whole point of the circular buffer is it is allocated once and
then used until the end of playback. If what you are saying is right,
and resources are running out then somewhere either the SoC layer is
losing them or between the DMA and the I2S driver we are losing
buffers. This points to a bug in the resource management of one of
them.
 
> Signed-Off-by: Jassi <jassi.brar@samsung.com>
> ---
>  arch/arm/plat-s3c64xx/dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
> index 266a107..02bc82b 100644
> --- a/arch/arm/plat-s3c64xx/dma.c
> +++ b/arch/arm/plat-s3c64xx/dma.c
> @@ -375,10 +375,12 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
>  		end->next = buff;
>  		endlli->next_lli = buff->lli_dma;
>  
> +#if 0
>  		if (chan->flags & S3C2410_DMAF_CIRCULAR) {
>  			struct s3c64xx_dma_buff *curr = chan->curr;
>  			lli->next_lli = curr->lli_dma;
>  		}
> +#endif
>  
>  		if (next == chan->curr) {
>  			writel(buff->lli_dma, chan->regs + PL080_CH_LLI);
> -- 
> 1.6.2.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

  parent reply	other threads:[~2009-09-16  0:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:01 [PATCH 4/7] S3C64XX DMA: S3C2410_DMAF_CIRCULAR disable Jassi
2009-09-15 10:07 ` Mark Brown
2009-09-15 11:01   ` jassi brar
2009-09-15 11:52     ` Mark Brown
2009-09-15 12:05       ` jassi brar
2009-09-16  0:28 ` Ben Dooks [this message]
2009-09-16  2:24   ` jassi brar
2009-09-22 20:14     ` Ben Dooks

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=20090916002832.GN13508@trinity.fluff.org \
    --to=ben-linux@fluff.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).