From: Chen-Yu Tsai <wenst@chromium.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Tomasz Figa <tfiga@chromium.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
Ricardo Ribalda <ribalda@chromium.org>,
Christoph Hellwig <hch@lst.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv6 2/8] videobuf2: inverse buffer cache_hints flags
Date: Tue, 28 Sep 2021 14:05:36 +0800 [thread overview]
Message-ID: <YVKwsMDU6eNO1X0u@google.com> (raw)
In-Reply-To: <20210909112430.61243-3-senozhatsky@chromium.org>
Hi,
On Thu, Sep 09, 2021 at 08:24:24PM +0900, Sergey Senozhatsky wrote:
> It would be less error prone if the default cache hints value
> (we kzalloc() structs, so it's zeroed out by default) would be
> to "always sync/flush" caches. Inverse and rename cache hints
> flags.
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> ---
> .../media/common/videobuf2/videobuf2-core.c | 31 ++++++-------------
> .../media/common/videobuf2/videobuf2-v4l2.c | 17 +++-------
> include/media/videobuf2-core.h | 12 +++----
> 3 files changed, 21 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index c4ff356da600..9d57df348b5f 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
[...]
> @@ -415,17 +415,6 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
> vb->index = q->num_buffers + buffer;
> vb->type = q->type;
> vb->memory = memory;
> - /*
> - * We need to set these flags here so that the videobuf2 core
> - * will call ->prepare()/->finish() cache sync/flush on vb2
> - * buffers when appropriate. However, we can avoid explicit
> - * ->prepare() and ->finish() cache sync for DMABUF buffers,
> - * because DMA exporter takes care of it.
> - */
> - if (q->memory != VB2_MEMORY_DMABUF) {
> - vb->need_cache_sync_on_prepare = 1;
> - vb->need_cache_sync_on_finish = 1;
> - }
This hunk seems odd. It's not inverting the logic but just removing
the block wholesale. The end result is different. This seems to be fixed
in a following patch, but the change here doesn't match what the commit
log says.
ChenYu
next prev parent reply other threads:[~2021-09-28 6:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 11:24 [PATCHv6 0/8] videobuf2: support new noncontiguous DMA API Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 1/8] videobuf2: rework vb2_mem_ops API Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 2/8] videobuf2: inverse buffer cache_hints flags Sergey Senozhatsky
2021-09-28 6:05 ` Chen-Yu Tsai [this message]
2021-09-09 11:24 ` [PATCHv6 3/8] videobuf2: split buffer cache_hints initialisation Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 4/8] videobuf2: move cache_hints handling to allocators Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 5/8] videobuf2: add V4L2_MEMORY_FLAG_NON_COHERENT flag Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 6/8] videobuf2: add queue memory coherency parameter Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT flag Sergey Senozhatsky
2021-09-28 4:50 ` Sergey Senozhatsky
2021-09-09 11:24 ` [PATCHv6 8/8] videobuf2: handle non-contiguous DMA allocations Sergey Senozhatsky
2021-09-10 10:00 ` [PATCHv6 0/8] videobuf2: support new noncontiguous DMA API Tomasz Figa
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=YVKwsMDU6eNO1X0u@google.com \
--to=wenst@chromium.org \
--cc=dafna.hirschfeld@collabora.com \
--cc=hch@lst.de \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=senozhatsky@chromium.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.