linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Pawel Osciak <pawel@osciak.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: RFC: vb2: replace alloc_ctx by struct device * in vb2_queue
Date: Sun, 21 Sep 2014 15:05:33 +0200	[thread overview]
Message-ID: <541ECD1D.5020605@xs4all.nl> (raw)

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.

Regards,

	Hans

             reply	other threads:[~2014-09-21 13:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 13:05 Hans Verkuil [this message]
2014-09-22  3:47 ` RFC: vb2: replace alloc_ctx by struct device * in vb2_queue Pawel Osciak
2014-09-22  6:18 ` Marek Szyprowski

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=541ECD1D.5020605@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --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).