From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, Pawel Osciak <pawel@osciak.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: RFC: vb2: replace alloc_ctx by struct device * in vb2_queue
Date: Mon, 22 Sep 2014 08:18:45 +0200 [thread overview]
Message-ID: <541FBF45.6030601@samsung.com> (raw)
In-Reply-To: <541ECD1D.5020605@xs4all.nl>
Hello,
On 2014-09-21 15:05, Hans Verkuil wrote:
> Hi Marek, Pawel,
>
> Currently for dma_config (and the dma_sg code that I posted before) drivers have
> to allocate a alloc_ctx context, but in practice that just contains a device pointer.
>
> Is there any reason why we can't just change in struct vb2_queue:
>
> void *alloc_ctx[VIDEO_MAX_PLANES];
>
> to:
>
> struct device *alloc_ctx[VIDEO_MAX_PLANES];
>
> or possibly even just:
>
> struct device *alloc_ctx;
>
> That simplifies the code quite a bit and I don't see and need for anything
> else. The last option would make it impossible to have different allocation
> contexts for different planes, but that might be something that Samsumg needs.
The last option won't work for for s5p-mfc driver, so better please keep
separate context per each plane.
If we are going to change the structures and their names, then maybe we
should
get rid of 'context' name are simply replace it by the following entry in
vb2_queue:
struct device *alloc_dev[VIDEO_MAX_PLANES];
and change respective parameter names in memory allocators.
The true context was useful when we were using custom, non-mainline memory
allocators.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
prev parent reply other threads:[~2014-09-22 6:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 13:05 RFC: vb2: replace alloc_ctx by struct device * in vb2_queue Hans Verkuil
2014-09-22 3:47 ` Pawel Osciak
2014-09-22 6:18 ` Marek Szyprowski [this message]
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=541FBF45.6030601@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=pawel@osciak.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;
as well as URLs for NNTP newsgroup(s).