mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Escande <thierry.escande@collabora.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pawel Osciak <pawel@osciak.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 1/2] [media] vb2: Store dma_dir in vb2_queue
Date: Thu, 20 Oct 2016 10:20:05 +0200	[thread overview]
Message-ID: <aefee886-3aed-b72f-b1c4-722b3f213399@collabora.com> (raw)
In-Reply-To: <20161019212907.GT9460@valkosipuli.retiisi.org.uk>

Hi Sakari,

On 19/10/2016 23:29, Sakari Ailus wrote:
> Hi Thierry,
>
> On Wed, Oct 19, 2016 at 10:24:16AM +0200, Thierry Escande wrote:
>> From: Pawel Osciak <posciak@chromium.org>
>>
>> Store dma_dir in struct vb2_queue and reuse it, instead of recalculating
>> it each time.
>>
>> Signed-off-by: Pawel Osciak <posciak@chromium.org>
>> Tested-by: Pawel Osciak <posciak@chromium.org>
>> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
>> Reviewed-by: Owen Lin <owenlin@chromium.org>
>> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
>> ---
>>  drivers/media/v4l2-core/videobuf2-core.c | 12 +++---------
>>  drivers/media/v4l2-core/videobuf2-v4l2.c |  2 ++
>>  include/media/videobuf2-core.h           |  2 ++
>>  3 files changed, 7 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>> index 21900202..f12103c 100644
>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>> @@ -194,8 +194,6 @@ static void __enqueue_in_driver(struct vb2_buffer *vb);
>>  static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
>>  {
>>  	struct vb2_queue *q = vb->vb2_queue;
>> -	enum dma_data_direction dma_dir =
>> -		q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
>>  	void *mem_priv;
>>  	int plane;
>>  	int ret = -ENOMEM;
>> @@ -209,7 +207,7 @@ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
>>
>>  		mem_priv = call_ptr_memop(vb, alloc,
>>  				q->alloc_devs[plane] ? : q->dev,
>> -				q->dma_attrs, size, dma_dir, q->gfp_flags);
>> +				q->dma_attrs, size, q->dma_dir, q->gfp_flags);
>
> My bad, I guess I expressed myself unclearly.
>
> Could you introduce the macro in this patch? You can then remove q->dma_dir
> altogether.
My bad. Sorry for the confusion...

The v3 is on its way.

Regards,
  Thierry

  reply	other threads:[~2016-10-20  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  8:24 [PATCH 0/2] [media] DMA direction support " Thierry Escande
2016-10-19  8:24 ` [PATCH 1/2] [media] vb2: Store dma_dir " Thierry Escande
2016-10-19 21:29   ` Sakari Ailus
2016-10-20  8:20     ` Thierry Escande [this message]
2016-10-19  8:24 ` [PATCH 2/2] [media] vb2: Add support for capture_dma_bidirectional queue flag Thierry Escande
  -- strict thread matches above, loose matches on Subject: below --
2016-10-14 12:08 [PATCH 0/2] [media] DMA direction support in vb2_queue Thierry Escande
2016-10-14 12:08 ` [PATCH 1/2] [media] vb2: Store dma_dir " Thierry Escande

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=aefee886-3aed-b72f-b1c4-722b3f213399@collabora.com \
    --to=thierry.escande@collabora.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    --cc=pawel@osciak.com \
    --cc=sakari.ailus@iki.fi \
    /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®