All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: vb2: replace alloc_ctx by struct device * in vb2_queue
@ 2014-09-21 13:05 Hans Verkuil
  2014-09-22  3:47 ` Pawel Osciak
  2014-09-22  6:18 ` Marek Szyprowski
  0 siblings, 2 replies; 3+ messages in thread
From: Hans Verkuil @ 2014-09-21 13:05 UTC (permalink / raw)
  To: Pawel Osciak, Marek Szyprowski; +Cc: Linux Media Mailing List, Laurent Pinchart

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-22  6:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.