From: vkalia@codeaurora.org
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, vrajesh@codeaurora.org,
sachins@codeaurora.org, apurupa@codeaurora.org
Subject: V4L2_MEMORY_DMABUF for video decoders
Date: Mon, 1 Dec 2014 20:35:57 -0000 [thread overview]
Message-ID: <0dabfbb34c548337f7d1098b46e2d197.squirrel@www.codeaurora.org> (raw)
Hi
I am facing an issue while using videobuf2-dma-contig.c mem_ops. Following
is brief description of the driver architecture and the limitation. Any
pointers/hints are appreciated.
Driver architecture:
It is a video codec driver for video decoding. It exposes two ports -
CAPTURE and OUTPUT. Raw bitstream buffers are queued/dequeued via OUTPUT
capability and YUV via CAPTURE. This driver uses vb2_qops as well as
vb2_mem_ops from videobuf2-dma-contig.c. Video hardware has MMU.
V4L2 framework limitation:
The empty buffers are allocated by userspace and file descriptor is queued
to the V4L2 driver via VIDIOC_QBUF call. I am using vb2_mem_ops so the
buffers are mapped into video device's MMU by map_dmabuf op. Then video
driver sends this buffer down to hardware and hardware does the decoding
and writes YUV data in this buffer. This buffer is ready to be shared with
userspace so hardware returns this buffer back to driver. Userspace calls
VIDIOC_DQBUF to get the buffer but as a result the buffer is also unmapped
from video device's MMU. This is because DQBUF calls unmap_dmabuf op. This
causes problem because video device will still need this buffer so future
frames referencing to it can be decoded properly. Has anyone else faced
this problem? Is there a patch for reference counting the MMU
mappings/unmappings so that driver has more control over it?
Thanks
Vinay
next reply other threads:[~2014-12-01 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 20:35 vkalia [this message]
2014-12-11 18:33 ` V4L2_MEMORY_DMABUF for video decoders vkalia
2014-12-29 20:59 ` Sakari Ailus
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=0dabfbb34c548337f7d1098b46e2d197.squirrel@www.codeaurora.org \
--to=vkalia@codeaurora.org \
--cc=apurupa@codeaurora.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=sachins@codeaurora.org \
--cc=vrajesh@codeaurora.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 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).