linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: ezequiel@vanguardiasur.com.ar, linux-media@vger.kernel.org,
	laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl,
	ribalda@chromium.org, tfiga@chromium.org, senozhatsky@google.com,
	hch@lst.de, kernel@collabora.com
Subject: Re: [PATCH 3/3] media: stk1160: use dma_alloc_noncontiguous API
Date: Tue, 11 Jan 2022 09:13:31 +0100	[thread overview]
Message-ID: <20220111081331.GB21713@lst.de> (raw)
In-Reply-To: <20220111065505.6323-4-dafna.hirschfeld@collabora.com>

On Tue, Jan 11, 2022 at 08:55:05AM +0200, Dafna Hirschfeld wrote:
> Replace the urb buffers allocation to
> use the noncontiguous API. This improve performance
> on Arm.
> The noncontiguous API require handling
> synchronization.
> This commit is similar to the one sent to
> uvc: [1]

Strange formatting.  I'd flow this as:

Replace the urb buffers allocation to use the noncontiguous API.  This
improve performance on ARM plattform (XXX: insert why here)
The noncontiguous API requires the driver to handle synchronization.
This commit is similar to this one for the uvc driver:

    https://lkml.org/lkml/2021/3/12/1506

> @@ -310,6 +311,9 @@ static void stk1160_isoc_irq(struct urb *urb)
>  		return;
>  	}
>  
> +	dma_sync_sgtable_for_cpu(stk1160_get_dmadev(dev), stk_urb->sgt, DMA_FROM_DEVICE);
> +	invalidate_kernel_vmap_range(stk_urb->transfer_buffer, urb->transfer_buffer_length);

Besisdes the unreadably long lines, I'd invalidate the vmap range before
the direct mapping range.

  reply	other threads:[~2022-01-11  8:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  6:55 [PATCH 0/3] media: stk1160: allocate urb buffs with the DMA noncontiguous API Dafna Hirschfeld
2022-01-11  6:55 ` [PATCH 1/3] media: stk1160: fix number of buffers in case not all buffers are created Dafna Hirschfeld
2022-01-11 12:21   ` Ezequiel Garcia
2022-01-11  6:55 ` [PATCH 2/3] media: stk1160: move transfer_buffer and urb to same struct 'stk1160_urb' Dafna Hirschfeld
2022-01-11  8:10   ` Christoph Hellwig
2022-01-11 12:29   ` Ezequiel Garcia
2022-01-11  6:55 ` [PATCH 3/3] media: stk1160: use dma_alloc_noncontiguous API Dafna Hirschfeld
2022-01-11  8:13   ` Christoph Hellwig [this message]
2022-01-11  8:50     ` Dafna Hirschfeld
2022-01-11  8:52       ` Christoph Hellwig
2022-01-11  8:55         ` Dafna Hirschfeld
2022-01-11  8:59           ` Christoph Hellwig
2022-01-12  9:25             ` Sergey Senozhatsky
2022-01-11 12:38   ` Ezequiel Garcia
2022-01-24 14:43     ` Dafna Hirschfeld
2022-01-24 16:02       ` Dafna Hirschfeld

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=20220111081331.GB21713@lst.de \
    --to=hch@lst.de \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=ribalda@chromium.org \
    --cc=senozhatsky@google.com \
    --cc=tfiga@chromium.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).