From patchwork Wed Mar 18 13:21:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 11445213 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB73B1820 for ; Wed, 18 Mar 2020 13:21:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89FC420768 for ; Wed, 18 Mar 2020 13:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O4qX0Xwk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89FC420768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pbf3APYqSvqxPM62XXPks2rAbMpog4uFohIb7uGs86c=; b=O4qX0XwkLciFn8 dKa9m5npvHIiG0oPe+G+FaNYtNk+AVw0sdueb26TPcviWrU6Lnmwcwu6fSTe+0grTjHBzc8p7GJlI xGLYEy9jiu9CLQadz6FLpfikv+MTxeco5hzAhRoOgDOnhxD6dG8IN6D40UMbbBMlriKu+0VxET9EI YJkd85AGQ5uMqA03a7Ta1cvt9CXSdL8hFpwI3bigS7lBwp4tfnGF5IMAJhHDEP8OoIvqrvuhgQRIX PJpNbOq0XF7sJPh6pGBUNN9Jr58Zm923wFPLdgc0sHST53AH7N9dG7XqvGFm+HRp8Tug7DPbKN3a9 G5fewUclGypkncNi87xw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEYds-0003GT-H2; Wed, 18 Mar 2020 13:21:52 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEYdp-0003FZ-N9 for linux-rockchip@lists.infradead.org; Wed, 18 Mar 2020 13:21:51 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 60E0429661A From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] hantro: set of small cleanups and fixes Date: Wed, 18 Mar 2020 10:21:00 -0300 Message-Id: <20200318132108.21873-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200318_062149_885695_E2FB06A9 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [46.235.227.227 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Tomasz Figa , Heiko Stuebner , Alexandre Courbot , Jonas Karlman , Nicolas Dufresne , Hans Verkuil , Jeffrey Kardatzke , kernel@collabora.com, Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Hi all, Cleanups and fixes, second iteration. The main idea here is to address two issues, and while at it, clean the driver a bit. The first issue can be found in Patch 1, when the Request API is used, the CAPTURE buffer should be returned _before_ the OUTPUT buffer, to avoid waking up userspace prematurely. I noticed this issue while working on the rkvdec driver, but this time I've decided to tackle it at the core, in v4l2_m2m_buf_done_and_job_finish(). The second issue is a simple compliance issue, which is solved by refactoring the driver, dealing with internal set format properly. Changes v2: * Fix compile warning introduced by patch 6. * I'm adding two additional patches this time. Patch 7 converts the binding to json-schema, and patch 8 puts linux-rockchip mailing list in MAINTAINERS. Thanks, Ezequiel Ezequiel Garcia (8): v4l2-mem2mem: return CAPTURE buffer first hantro: Set buffers' zeroth plane payload in .buf_prepare hantro: Use v4l2_m2m_buf_done_and_job_finish hantro: Remove unneeded hantro_dec_buf_finish hantro: Move H264 motion vector calculation to a helper hantro: Refactor for V4L2 API spec compliancy dt-bindings: rockchip-vpu: Convert bindings to json-schema hantro: Add linux-rockchip mailing list to MAINTAINERS .../bindings/media/rockchip-vpu.txt | 43 ------- .../bindings/media/rockchip-vpu.yaml | 82 +++++++++++++ MAINTAINERS | 3 +- drivers/media/v4l2-core/v4l2-mem2mem.c | 11 +- drivers/staging/media/hantro/hantro.h | 7 +- drivers/staging/media/hantro/hantro_drv.c | 37 ++---- drivers/staging/media/hantro/hantro_hw.h | 31 +++++ drivers/staging/media/hantro/hantro_v4l2.c | 111 +++++++++--------- 8 files changed, 194 insertions(+), 131 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txt create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.yaml