From patchwork Mon Jun 12 16:27:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 103647 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp76084obh; Mon, 12 Jun 2017 09:29:17 -0700 (PDT) X-Received: by 10.101.86.76 with SMTP id m12mr41507879pgs.137.1497284957487; Mon, 12 Jun 2017 09:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497284957; cv=none; d=google.com; s=arc-20160816; b=tIsItptEZd4MxqZFpPseN5RwZByTeei07glwhijX+XpB/4ivG2C0tcaOYkqwQB2r2X 9X7f77TCR5kWU2GK+erm14kgUk1oXjq38y7SV+vGvbAUrvSUssHxiY04nCah/eS0fsQt uKTlfuzzZpIkABJvtq7qi+aPwzKtLjDn+NbsmKBhNxK6EQRhwZDHwbz/k6UM7uOnaJXi BEnaa3xPiOOq+w0v4Dp1/FMpm32CxDFqgXDUz5YMflHiw6Kp/fbXolBEuvLxoFgb/rKJ JoVZ/N8yeDjiq9zhDxBMIMqvAJ53cebbr06rvjJJ+1i1gH1QeyP+wV8SqjP3QFldWmHC kExw== 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 :dkim-signature:arc-authentication-results; bh=PTup8sLtM6yl9SMoSqfEFb+or0J1KawWzNLvpeLdx0g=; b=AAZMqCXmvwi1WO8GHmwisih9Uv3jV9j9YkC9EODmupTcRy7VAZrz086v2VMgTBZbPO 1FaudwoNlMjbbfb9ukivB6EtKCvq/LyNaXL2CUPmnmrUCDAAReHVkukamnZgRnt1jxcl a/h6gukHj5xqyv7tDnZF4DB2UazwOg+7VkqYnwVh5xDVMM8CVt1XQx56+p/LinaYHJ7p xycfrbpBVkiSwlbONKv4lqFvZ+qR9LffCaIXz1CyRXrA7aO+RUyRTSGpH7I0DD+ZsinX qqJasUEv+82HMvXj0PT/icYj33ezP9cr4/XHi5iZDsnJtWw5L4od48zC1tmspykZROMI +1LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si705624pln.34.2017.06.12.09.29.17; Mon, 12 Jun 2017 09:29:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754199AbdFLQ3P (ORCPT + 4 others); Mon, 12 Jun 2017 12:29:15 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34454 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbdFLQ3N (ORCPT ); Mon, 12 Jun 2017 12:29:13 -0400 Received: by mail-wr0-f175.google.com with SMTP id g76so101820076wrd.1 for ; Mon, 12 Jun 2017 09:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PTup8sLtM6yl9SMoSqfEFb+or0J1KawWzNLvpeLdx0g=; b=KsUhVP2eOZ6Cy4ou6KTXoCbdj4NcX6Tf3etpRXLTFlusBIzlPHBOljaWf8FlUlBDJE hfhXSz2bXhRZYAAs0jNysZwLd6ma/MHKClciXsIwYzkkLdyjkLKg7hXajXWJoQ09YJrR B6JkawMBxC3i0WThKLSVSJDJEN2QGQVrsqGxQ= 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=PTup8sLtM6yl9SMoSqfEFb+or0J1KawWzNLvpeLdx0g=; b=o8qrPbS9J2pu2yiehXS+2GJWEvOKI13u127KH8E9XMXzVlgJTwFNfuPN8fEfHNo325 lU7piu94wPjVIdqDNC2GN2pOKiJOTGMLB1LhtVMaCJXgVS8rAbrpakt5Br+cOJLLS49p DrVK00zL3IXd/VdxIdDLyB9O/1icqfT9jy12Quk1b1uHC5J25cAtLL4i5lbSctqi5EXi Fyx9+KNNlnlD0AGBgkCmZ7h9rlg/q0XXrWMgnyrQRoVq7y/5JIeU+L6c4uu7pnM4u17t I8sbv5iaJG9EeCMtaILEMvPDE9YBAMM51Go+ZR6BecZ5veVdSlARESeDioa+FYOTx55H 1Shw== X-Gm-Message-State: AODbwcA6M6nHE2VNvXTZuD+A4b6XUbz3z16kSXcUNsIbqeIISUDZJPKe A0eHVV3R9wKRJF8MfP3m3g== X-Received: by 10.223.160.178 with SMTP id m47mr8899814wrm.194.1497284947967; Mon, 12 Jun 2017 09:29:07 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 49sm14493531wrz.8.2017.06.12.09.29.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jun 2017 09:29:07 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v10 00/18] Qualcomm video decoder/encoder driver Date: Mon, 12 Jun 2017 19:27:37 +0300 Message-Id: <1497284875-19999-1-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello, The changes since patchset v9 are the following: * patches from 1/18 to 9/18 are the same. * patches from 10/18 to 16/18 are fixes for warns/errors found by Mauro when building with its gcc7. * patch 17/18 adding support for minimum buffers for capture get control. This fixes an issue with gstreamer and it will be good to have it in the inital version of the venus driver. * patch 18/18 enable COMPILE_TEST Kconfig option for the driver, and this patch depends on the other one for qcom_scm driver. The submited patch for qcom_scm driver can be found at [1]. Mauro, I failed to build gcc7 on my own machine and fallback to a pre-built version of the gcc-7 for may Ubuntu distro. The version which I tried was: gcc version 7.1.0 (Ubuntu 7.1.0-5ubuntu2~16.04). Unfortunately I cannot reproduce the warns/errors (except two warnings) from your compiler (even that the version looks the same 7.1.0). So I fixed the warns/errors as per your response to v9, and hope that the errors will disappear. [1] https://patchwork.kernel.org/patch/9775803/ Stanimir Varbanov (18): media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management doc: DT: venus: binding document for Qualcomm video driver MAINTAINERS: Add Qualcomm Venus video accelerator driver media: venus: adding core part and helper functions media: venus: vdec: add video decoder files media: venus: venc: add video encoder files media: venus: hfi: add Host Firmware Interface (HFI) media: venus: hfi: add Venus HFI files media: venus: enable building of Venus video driver media: venus: hfi: fix mutex unlock media: venus: hfi_cmds: fix variable dereferenced before check media: venus: helpers: fix variable dereferenced before check media: venus: hfi_venus: fix variable dereferenced before check media: venus: hfi_msgs: fix set but not used variables media: venus: vdec: fix compile error in vdec_close media: venus: venc: fix compile error in venc_close media: venus: vdec: add support for min buffers for capture media: venus: enable building with COMPILE_TEST .../devicetree/bindings/media/qcom,venus.txt | 107 ++ MAINTAINERS | 8 + drivers/media/platform/Kconfig | 13 + drivers/media/platform/Makefile | 2 + drivers/media/platform/qcom/venus/Makefile | 11 + drivers/media/platform/qcom/venus/core.c | 388 +++++ drivers/media/platform/qcom/venus/core.h | 323 ++++ drivers/media/platform/qcom/venus/firmware.c | 109 ++ drivers/media/platform/qcom/venus/firmware.h | 22 + drivers/media/platform/qcom/venus/helpers.c | 725 +++++++++ drivers/media/platform/qcom/venus/helpers.h | 45 + drivers/media/platform/qcom/venus/hfi.c | 522 +++++++ drivers/media/platform/qcom/venus/hfi.h | 175 +++ drivers/media/platform/qcom/venus/hfi_cmds.c | 1259 ++++++++++++++++ drivers/media/platform/qcom/venus/hfi_cmds.h | 304 ++++ drivers/media/platform/qcom/venus/hfi_helper.h | 1050 +++++++++++++ drivers/media/platform/qcom/venus/hfi_msgs.c | 1052 +++++++++++++ drivers/media/platform/qcom/venus/hfi_msgs.h | 283 ++++ drivers/media/platform/qcom/venus/hfi_venus.c | 1572 ++++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_venus.h | 23 + drivers/media/platform/qcom/venus/hfi_venus_io.h | 113 ++ drivers/media/platform/qcom/venus/vdec.c | 1162 +++++++++++++++ drivers/media/platform/qcom/venus/vdec.h | 23 + drivers/media/platform/qcom/venus/vdec_ctrls.c | 158 ++ drivers/media/platform/qcom/venus/venc.c | 1283 ++++++++++++++++ drivers/media/platform/qcom/venus/venc.h | 23 + drivers/media/platform/qcom/venus/venc_ctrls.c | 270 ++++ drivers/media/v4l2-core/v4l2-mem2mem.c | 37 + include/media/v4l2-mem2mem.h | 92 ++ 29 files changed, 11154 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,venus.txt create mode 100644 drivers/media/platform/qcom/venus/Makefile create mode 100644 drivers/media/platform/qcom/venus/core.c create mode 100644 drivers/media/platform/qcom/venus/core.h create mode 100644 drivers/media/platform/qcom/venus/firmware.c create mode 100644 drivers/media/platform/qcom/venus/firmware.h create mode 100644 drivers/media/platform/qcom/venus/helpers.c create mode 100644 drivers/media/platform/qcom/venus/helpers.h create mode 100644 drivers/media/platform/qcom/venus/hfi.c create mode 100644 drivers/media/platform/qcom/venus/hfi.h create mode 100644 drivers/media/platform/qcom/venus/hfi_cmds.c create mode 100644 drivers/media/platform/qcom/venus/hfi_cmds.h create mode 100644 drivers/media/platform/qcom/venus/hfi_helper.h create mode 100644 drivers/media/platform/qcom/venus/hfi_msgs.c create mode 100644 drivers/media/platform/qcom/venus/hfi_msgs.h create mode 100644 drivers/media/platform/qcom/venus/hfi_venus.c create mode 100644 drivers/media/platform/qcom/venus/hfi_venus.h create mode 100644 drivers/media/platform/qcom/venus/hfi_venus_io.h create mode 100644 drivers/media/platform/qcom/venus/vdec.c create mode 100644 drivers/media/platform/qcom/venus/vdec.h create mode 100644 drivers/media/platform/qcom/venus/vdec_ctrls.c create mode 100644 drivers/media/platform/qcom/venus/venc.c create mode 100644 drivers/media/platform/qcom/venus/venc.h create mode 100644 drivers/media/platform/qcom/venus/venc_ctrls.c Here is the output of v4l2-compliance for decoder (as in this version of the patchset only decoder has functional changes): dragonboard-410c:~$ ./v4l2-compliance -d /dev/video0 v4l2-compliance SHA : 8fc88615b49843acb82cd8316d0bc4ab8474cba2 Driver Info: Driver name : qcom-venus Card type : Qualcomm Venus video decoder Bus info : platform:qcom-venus Driver version: 4.9.27 Capabilities : 0x84204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Compliance test for device /dev/video0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second video open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 9 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported) test Composing: OK (Not Supported) test Scaling: OK Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK Test input 0: Total: 43, Succeeded: 43, Failed: 0, Warnings: 0 -- 2.7.4