Received: by 10.223.185.111 with SMTP id b44csp584921wrg; Fri, 9 Mar 2018 09:50:39 -0800 (PST) X-Google-Smtp-Source: AG47ELuC3Xc0l4rP9nu9vYFcLQjfYjNEZIf4n6WeIOQCl1I86Qs2R9M8AuQvR4tNdFoR9QYuBOpN X-Received: by 2002:a17:902:70cb:: with SMTP id l11-v6mr29082242plt.192.1520617839091; Fri, 09 Mar 2018 09:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520617839; cv=none; d=google.com; s=arc-20160816; b=UqJlgzNy5jDmNgg7x89RxLdX20crWXFMIhJYBE4VmSFhha2/+eMsagNN4ZeoNChYYi AgzVTc2vWcxEG1jfRhedhqbqlt+swhpjb5L+vukXlt+a0Nbjwc2ufnBy9oXr9fC64HKu w5bd6asngjnSAlr0S8m6l0rl4T/QqcRRbbWwc+L34ars74rrom/vyi6euT4Vzv5sY/qn cGhQpMuzxdmaJp2KB62PHDb75NbCq6hd5Jbuzb/DRtJ0UcYu2JBi+6JCyRwhU5Fxjpuy ddncwdWR48AcFf85QT6XXqIBrXlUtSEWIsU4bIPfChWBHFVMLhOb53eQqVxOWYHFuwFj A3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=83WxgCX0SOgfyM12U9tH7ZgbUlNiOIO2wGd5fshDFDU=; b=qr9+U19R6xeb9a51/wzBEDm02pQe0iJvTAjSLM6QFvZOD/ZIQ+J2wkivyk8yDrg5J5 LYzdLx/doxbap0iOaWPciplz6xTuT0kSr4FuSgwFE8uhTt7WlJe+P92RfqYLK0qaw3SK DLAUG2Atlhqx2i/ZUt7JPQ/ZJ5LIGYX3nhmQWUGAt+nTS22IbhapudhqWYuryxpHuFqz KYWadJ8I0z6G5MCzmqL/5a0ysE+v7UEHpGBJEtQh/dz9YXlr4Z//iSvkVvEqHHsoaFQJ HYqkOXt/tvueC0VC/hhHW/HkL2OM9E/HIXvL/5LH6Tj5Xd0KM71Gg7+B4kV/LZ9biutw U0Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si1213466plo.467.2018.03.09.09.50.24; Fri, 09 Mar 2018 09:50:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932432AbeCIRtb (ORCPT + 99 others); Fri, 9 Mar 2018 12:49:31 -0500 Received: from mail-qt0-f172.google.com ([209.85.216.172]:40113 "EHLO mail-qt0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbeCIRt2 (ORCPT ); Fri, 9 Mar 2018 12:49:28 -0500 Received: by mail-qt0-f172.google.com with SMTP id y6so11638591qtm.7; Fri, 09 Mar 2018 09:49:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=83WxgCX0SOgfyM12U9tH7ZgbUlNiOIO2wGd5fshDFDU=; b=Ko+6jUpv5EnwRbBpEgxQJLclv1GJFg0sSJSgatfncTcuUmshinyD39Wa2UGGb00J+V wBCFQQLse1OfHwfMgFZ5tkkBphrESPpbOA4k6MLnE7OTYsUzBIg3nlWj4nhxX42VQTMq lN6pb/nxcwx2jyn023pS1FxctLWlURYRVokIu5Vqo6rid4ffeyYK36kp8olzrhG+1nsL WYTyAo4ovHpaAVE3XSE1iDzFGTkOsZkV7JgweNAuyizL7oCYiMh/SU67qK4shWdbRWVg pleZmgPFCZH/GKFUcp7Rh3o7rtELt/t9yIWkL8dXYw9ESfQvbsitpp75u3Y+jasmzH+T k3Uw== X-Gm-Message-State: AElRT7HT/Ow+wTY1962ZkIJlbqxf+TUXxzc5KaU8SFNcjdVEkxUkYFu1 BTQZ61nPx/PcmewZXCVx8gb7dbSa X-Received: by 10.237.55.225 with SMTP id j88mr46019190qtb.213.1520617767449; Fri, 09 Mar 2018 09:49:27 -0800 (PST) Received: from localhost.localdomain ([2804:14c:138:2ada:4961:b672:c997:efad]) by smtp.gmail.com with ESMTPSA id g4sm873976qke.91.2018.03.09.09.49.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 09:49:26 -0800 (PST) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: kernel@collabora.com, Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [PATCH v8 00/13] V4L2 Explicit Synchronization Date: Fri, 9 Mar 2018 14:49:07 -0300 Message-Id: <20180309174920.22373-1-gustavo@padovan.org> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gustavo Padovan Hi, So v8 is finally out addressing the comments from the previous version[1]. For more info see v5 cover letter[2]. The most important points I address here is the handling of fences that signal with error to follow Hans suggestion. I also added V4L2_CAP_FENCES to all vb2 drivers and marked all codec and cobalt as unordered. More specific changelog are noted on the patches itself. The first 3 patches are just clean ups in preparation to add the new cap flag and can go upstream earlier. Then there are patches to add unordered info, the actual fences implementation and later the V4L2_CAP_FENCES flag. The last patch contains the Documentation. You can find the code at: https://gitlab.collabora.com/padovan/linux/tree/v4l2-fences The test tools I've been using are: https://gitlab.collabora.com/padovan/drm-v4l2-test https://gitlab.collabora.com/padovan/v4l2-fences-test Please review, Gustavo [1] https://lkml.org/lkml/2018/1/10/644 [2] https://lkml.org/lkml/2017/11/15/550 Gustavo Padovan (13): [media] xilinx: regroup caps on querycap [media] hackrf: group device capabilities [media] omap3isp: group device capabilities [media] vb2: add is_unordered callback for drivers [media] v4l: add 'unordered' flag to format description ioctl [media] cobalt: add .is_unordered() for cobalt [media] vb2: mark codec drivers as unordered [media] vb2: add explicit fence user API [media] vb2: add in-fence support to QBUF [media] vb2: add out-fence support to QBUF [media] v4l: introduce the fences capability [media] v4l: Add V4L2_CAP_FENCES to drivers [media] v4l: Document explicit synchronization behavior Documentation/media/uapi/v4l/buffer.rst | 45 +++- Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 7 + Documentation/media/uapi/v4l/vidioc-qbuf.rst | 55 +++- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 12 +- Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 + drivers/media/common/videobuf2/videobuf2-core.c | 289 ++++++++++++++++++--- drivers/media/common/videobuf2/videobuf2-v4l2.c | 58 ++++- drivers/media/pci/cobalt/cobalt-v4l2.c | 4 +- drivers/media/pci/cx23885/cx23885-417.c | 2 +- drivers/media/pci/cx23885/cx23885-video.c | 3 +- drivers/media/pci/cx88/cx88-video.c | 3 +- drivers/media/pci/dt3155/dt3155.c | 2 +- drivers/media/pci/saa7134/saa7134-video.c | 2 + drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 3 +- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 3 +- drivers/media/pci/sta2x11/sta2x11_vip.c | 2 +- drivers/media/pci/tw68/tw68-video.c | 3 +- drivers/media/pci/tw686x/tw686x-video.c | 2 +- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- drivers/media/platform/blackfin/bfin_capture.c | 3 +- drivers/media/platform/coda/coda-common.c | 4 +- drivers/media/platform/davinci/vpbe_display.c | 3 +- drivers/media/platform/davinci/vpfe_capture.c | 3 +- drivers/media/platform/davinci/vpif_capture.c | 3 +- drivers/media/platform/davinci/vpif_display.c | 3 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 +- drivers/media/platform/exynos4-is/fimc-capture.c | 3 +- drivers/media/platform/exynos4-is/fimc-isp-video.c | 3 +- drivers/media/platform/exynos4-is/fimc-lite.c | 2 +- drivers/media/platform/exynos4-is/fimc-m2m.c | 4 +- drivers/media/platform/m2m-deinterlace.c | 4 +- drivers/media/platform/marvell-ccic/mcam-core.c | 2 +- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 1 + drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 1 + drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 1 + drivers/media/platform/mx2_emmaprp.c | 4 +- drivers/media/platform/omap3isp/ispvideo.c | 9 +- drivers/media/platform/pxa_camera.c | 3 +- drivers/media/platform/qcom/venus/vdec.c | 1 + drivers/media/platform/qcom/venus/venc.c | 1 + drivers/media/platform/rcar_fdp1.c | 1 + drivers/media/platform/rcar_jpu.c | 4 +- drivers/media/platform/rockchip/rga/rga-buf.c | 1 + drivers/media/platform/s3c-camif/camif-capture.c | 3 +- drivers/media/platform/s5p-g2d/g2d.c | 4 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 4 +- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 4 +- drivers/media/platform/sh_veu.c | 4 +- drivers/media/platform/sh_vou.c | 2 +- drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 4 +- drivers/media/platform/ti-vpe/cal.c | 2 +- drivers/media/platform/ti-vpe/vpe.c | 4 +- drivers/media/platform/vim2m.c | 4 +- drivers/media/platform/vivid/vivid-core.c | 2 +- drivers/media/platform/vsp1/vsp1_histo.c | 2 +- drivers/media/platform/vsp1/vsp1_video.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 7 +- drivers/media/usb/airspy/airspy.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 3 +- drivers/media/usb/em28xx/em28xx-video.c | 1 + drivers/media/usb/go7007/go7007-v4l2.c | 2 +- drivers/media/usb/hackrf/hackrf.c | 12 +- drivers/media/usb/msi2500/msi2500.c | 2 +- drivers/media/usb/pwc/pwc-v4l.c | 2 +- drivers/media/usb/s2255/s2255drv.c | 2 +- drivers/media/usb/stk1160/stk1160-v4l.c | 3 +- drivers/media/usb/usbtv/usbtv-video.c | 3 +- drivers/media/usb/uvc/uvc_driver.c | 1 + drivers/media/v4l2-core/Kconfig | 33 +++ drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 4 +- include/media/videobuf2-core.h | 45 +++- include/media/videobuf2-v4l2.h | 10 + include/uapi/linux/videodev2.h | 9 +- 75 files changed, 650 insertions(+), 105 deletions(-) -- 2.14.3