V4L2: Specify a way to pass an offset within a DMA-buf |
|||||
Issue descriptionWhen importing a DMA-buf that contains all color planes of a planar format (e.g. NV12) to a V4L2 device that exposes support for planar formats with multiple memory planes (color planes are allowed to be in separate buffers), we need to be able to specify the location of the color plane within the buffer. However, the current V4L2 specification doesn't define how to do it. For now, we're going to abuse the data_offset field of v4l2_plane struct and add the offset directly in the drivers, but we need to figure out the right solution with the media community and switch to it. Preferably it would be fully handled by the VB2 framework, without the need to update the drivers. The relevant part of the specification: https://www.kernel.org/doc/html/latest/media/uapi/v4l/buffer.html#c.v4l2_plane
,
Nov 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c8dada6eb2d55994e79f65d4ef04bb37abd2fd8d commit c8dada6eb2d55994e79f65d4ef04bb37abd2fd8d Author: Hirokazu Honda <hiroh@chromium.org> Date: Tue Nov 13 10:29:29 2018 media/gpu/v4l2/v4l2 VEA: Support DMABuf-backed video frame input on Encode() V4L2VEA supports only SHMEM video frame for Encode(). V4L2_MEMORY_USERPTR API is used on VIDIOC_QBUF, which is less efficient than V4L2_MEMORY_{MMAP, DMABUF} API. This enables V4L2VEA to accept DMABuf-backed video frame on Encode(). The video frame is queued with V4L2_MEMORY_DMABUF API unless ImageProcessor outputs SHMEM video frame. BUG= 895230 , 901264 TEST=VDA unittest --native_input on minnie, kevin Change-Id: I545e26ffb619eb6c065183f794cef78e42cc2ea8 Reviewed-on: https://chromium-review.googlesource.com/c/1301579 Commit-Queue: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Pawel Osciak <posciak@chromium.org> Cr-Commit-Position: refs/heads/master@{#607546} [modify] https://crrev.com/c8dada6eb2d55994e79f65d4ef04bb37abd2fd8d/media/gpu/v4l2/v4l2_video_encode_accelerator.cc
,
Nov 17
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd5ba607b11a618d116e6ca230f57fa471e0664f commit fd5ba607b11a618d116e6ca230f57fa471e0664f Author: Hirokazu Honda <hiroh@chromium.org> Date: Sat Nov 17 16:54:11 2018 HACK: CHROMIUM: rk3399-vpu: Compute plane address with data_offset With V4L2 MEMORY DMABUF API, it is necessary to set a file descriptor on each plane. The way to pass an offset with a DmaBuf is not defined in V4L2 specification. This is the case as it is needed to specify offsets because Chromium creates one DmaBuf for the planes. This is HACK to abuse data_offset for the purpose. This patch should be reverted after the appropriate way is defined. BUG= chromium:895230 , chromium:901264 TEST=VEA unittest --native_input on kevin Change-Id: I0508ac10f2c2be4a0332125f41d0dd4b13d0499c Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1312535 Reviewed-by: Tomasz Figa <tfiga@chromium.org> [modify] https://crrev.com/fd5ba607b11a618d116e6ca230f57fa471e0664f/drivers/media/platform/rockchip-vpu/rk3399_vpu_hw_vp8e.c [modify] https://crrev.com/fd5ba607b11a618d116e6ca230f57fa471e0664f/drivers/media/platform/rockchip-vpu/rk3399_vpu_hw_h264e.c
,
Nov 18
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1da370daf99f2e71ef2e092385df3db60b6cba22 commit 1da370daf99f2e71ef2e092385df3db60b6cba22 Author: Hirokazu Honda <hiroh@chromium.org> Date: Sun Nov 18 00:41:42 2018 HACK: CHROMIUM: rk3288-vpu: Compute plane address with data_offset With V4L2 MEMORY DMABUF API, it is necessary to set a file descriptor on each plane. The way to pass an offset with a DmaBuf is not defined in V4L2 specification. This is the case as it is needed to specify offsets because Chromium creates one DmaBuf for the planes. This is HACK to abuse data_offset for the purpose. This patch should be reverted after the appropriate way is defined. BUG= chromium:895230 , chromium:901264 TEST=VEA unittest --native_input on veyron_minnie Change-Id: Id1471ef622aa3e616dcdb5559f4f948b2c1155ee Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1319830 Reviewed-by: Tomasz Figa <tfiga@chromium.org> [modify] https://crrev.com/1da370daf99f2e71ef2e092385df3db60b6cba22/drivers/media/platform/rk3288-vpu/rk3288_vpu_hw_vp8e.c
,
Nov 20
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/df8697848d558161684e543d6abcf231649d4351 commit df8697848d558161684e543d6abcf231649d4351 Author: Hirokazu Honda <hiroh@chromium.org> Date: Tue Nov 20 07:43:56 2018 HACK: CHROMIUM: mtk-vcodec: Compute plane address with data_offset With V4L2 MEMORY DMABUF API, it is necessary to set a file descriptor on each plane. The way to pass an offset with a DmaBuf is not defined in V4L2 specification. This is the case as it is needed to specify offsets because Chromium creates one DmaBuf for the planes. This is HACK to abuse data_offset for the purpose. This patch should be reverted after the appropriate way is defined. BUG= chromium:895230 , chromium:901264 TEST=VEA unittest --native_input on hana Change-Id: I7ad238d9bdb0916d429720faef27783fffeb2069 Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1319829 [modify] https://crrev.com/df8697848d558161684e543d6abcf231649d4351/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
,
Jan 11
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tfiga@google.com
, Nov 2Cc: hiroh@chromium.org
Labels: media-kernel-shortlist