From: Jiri Slaby <jirislaby@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mchehab@redhat.com, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] vino: replace dma_sync_single with dma_sync_single_for_cpu
Date: Thu, 28 May 2009 08:02:14 +0200 [thread overview]
Message-ID: <4A1E28E6.2090807@gmail.com> (raw)
In-Reply-To: <20090528100938I.fujita.tomonori@lab.ntt.co.jp>
On 05/28/2009 03:10 AM, FUJITA Tomonori wrote:
> This replaces dma_sync_single() with dma_sync_single_for_cpu() because
> dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:
>
> /* Backwards compat, remove in 2.7.x */
> #define dma_sync_single dma_sync_single_for_cpu
> #define dma_sync_sg dma_sync_sg_for_cpu
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> drivers/media/video/vino.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c
> index 43e0998..97b082f 100644
> --- a/drivers/media/video/vino.c
> +++ b/drivers/media/video/vino.c
> @@ -868,9 +868,9 @@ static void vino_sync_buffer(struct vino_framebuffer *fb)
> dprintk("vino_sync_buffer():\n");
>
> for (i = 0; i < fb->desc_table.page_count; i++)
> - dma_sync_single(NULL,
> - fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i],
> - PAGE_SIZE, DMA_FROM_DEVICE);
> + dma_sync_single_for_cpu(NULL,
> + fb->desc_table.dma_cpu[VINO_PAGE_RATIO * i],
> + PAGE_SIZE, DMA_FROM_DEVICE);
Shouldn't be there sync_for_device in vino_dma_setup (or somewhere)
then? If I understand the API correctly this won't (and didn't) work on
some platforms.
The same for other drivers who don't free the buffer after the sync but
recycle it instead.
next prev parent reply other threads:[~2009-05-28 6:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 1:10 [PATCH] vino: replace dma_sync_single with dma_sync_single_for_cpu FUJITA Tomonori
2009-05-28 6:02 ` Jiri Slaby [this message]
2009-06-01 2:08 ` FUJITA Tomonori
2009-06-10 16:52 ` Mauro Carvalho Chehab
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=4A1E28E6.2090807@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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