Hello, This RFC follows the discussion started by Hans [1] a few months back. It does not try to address all the problem reported in this thread but instead focuses on the FMT and BUF(S) ioctls. Note that my primary goal is to unify handling for multiplanar and singleplanar formats and extend things to support the "single dmabuf storing all pixel planes" issue. This is just preliminary work, and nothing has been tested yet (still patching the VB2/VIVID code to test everything), but it should give a good idea of what the new APIs could look like. I hope to get feedback early on so I can adjust the structs/hooks before going into heavy refactoring of the VB2 core (and drivers depending on the VB2 helpers). One last thing, I'm new to the media/v4l2 subsystem, so I likely got a few things wrong. Regards, Boris [1]https://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg135729.html Boris Brezillon (2): media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) Hans Verkuil (1): media: v4l2: Add extended buffer operations drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 +- .../media/platform/exynos4-is/fimc-capture.c | 2 +- .../platform/exynos4-is/fimc-isp-video.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c | 2 +- drivers/media/platform/exynos4-is/fimc-m2m.c | 4 +- .../media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 +- drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 4 +- .../platform/mtk-vcodec/mtk_vcodec_dec.c | 4 +- .../platform/mtk-vcodec/mtk_vcodec_enc.c | 4 +- .../media/platform/qcom/camss/camss-video.c | 2 +- drivers/media/platform/qcom/venus/vdec.c | 4 +- drivers/media/platform/qcom/venus/venc.c | 4 +- drivers/media/platform/rcar_fdp1.c | 4 +- drivers/media/platform/rcar_jpu.c | 4 +- drivers/media/platform/renesas-ceu.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 4 +- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 4 +- drivers/media/platform/ti-vpe/vpe.c | 4 +- drivers/media/platform/vicodec/vicodec-core.c | 2 - drivers/media/platform/vivid/vivid-core.c | 6 +- .../media/platform/vivid/vivid-vid-common.c | 20 - .../media/platform/vivid/vivid-vid-common.h | 2 - drivers/media/v4l2-core/v4l2-common.c | 281 ++++++ drivers/media/v4l2-core/v4l2-dev.c | 32 +- drivers/media/v4l2-core/v4l2-ioctl.c | 831 +++++++++++++++--- drivers/staging/media/ipu3/ipu3-v4l2.c | 4 +- .../media/rockchip/vpu/rockchip_vpu_enc.c | 4 +- include/media/v4l2-common.h | 12 + include/media/v4l2-ioctl.h | 65 +- include/uapi/linux/videodev2.h | 207 +++++ 31 files changed, 1332 insertions(+), 198 deletions(-) -- 2.20.1