Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1043036ybb; Wed, 25 Mar 2020 14:35:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvW36Xfqpa+slo6f42DMSv4Sg4tc8Jc6NvUpoSFOwGno+LHyehTfm9FwbxvjpXzkO+pFPCK X-Received: by 2002:aca:39d5:: with SMTP id g204mr3798301oia.93.1585172132032; Wed, 25 Mar 2020 14:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585172132; cv=none; d=google.com; s=arc-20160816; b=k7dvDNR9I6fKQAw+af1mi4Z2QixQcTdU6tCzP2xQ01U5aPkDdZVgohhiOg9V+gUQtV HyxzutxPclweQTS0WeogqOPw7PiGDpxIUNfnfXOPUnIcs6ej5vDv8VqUZ4m7YjlFMZoL UB1cQUnuNKhJpShD870PNMHvJbteLGeTEKXikH48AUOmQ6iSRAZAm8nMATGDTaflFisW jbugXLCxQitHvl0TpbyJiPejOgXvxWqKS363KOacCzdcYfpzqsk5sBAubKgWURF9+hzw uEn+SdPbYC3pwUxouGEXEIk2pCBnZMxbOLG8WbplBjNBHusleufd3ZH/c+qrGO7r7Bp9 oDNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RQJPQng23b06sPDcIjOdEBsj9PM2yYCduYL5pzlO+Hw=; b=Fn/kxwl+mFpUt5so/IGKz4uZDC6iXmFqXePxl3crIzgdatC7OUpgnzl1SHPesqC0KV 0VtvjwXpZTWulRBAJSbAtXfje/MJm/yr4MLlzjLn65rgJT2+aYyEkrXz1EM/DOsY6VwB oDjy/nA1o3DuzMu1MQ9MKOacodBL3r8VWj7jE1WQ16H3Gd4WyII1Sgd+KeSIekWfC374 09/xWnJg84Zg8TLFHlJKJulsPf9u+rjSueFLgWf3qbSQIKBgWKsg/2imlGWfxvJBfguG /b3KfJLZ147bk4geaR6WZ3MGgiBDlZ2BpUxjm0bNWScNbkZLM2lqyS6Goev9gor2PKTR gwuQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si133012otr.256.2020.03.25.14.35.18; Wed, 25 Mar 2020 14:35:32 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbgCYVe4 (ORCPT + 99 others); Wed, 25 Mar 2020 17:34:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39822 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgCYVe4 (ORCPT ); Wed, 25 Mar 2020 17:34:56 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id DA42F293EA8 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , Nicolas Dufresne , kernel@collabora.com, Jonas Karlman , Heiko Stuebner , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Ezequiel Garcia Subject: [PATCH v3 0/7] hantro: set of small cleanups and fixes Date: Wed, 25 Mar 2020 18:34:31 -0300 Message-Id: <20200325213439.16509-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.26.0.rc2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Cleanups and fixes, third 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. Note that patch 7 still needs reviews from device tree maintainers. Changes v3: * Rebased media master. * Revert buffer sequence removal change. 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 (7): 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 .../bindings/media/rockchip-vpu.txt | 43 ------- .../bindings/media/rockchip-vpu.yaml | 82 +++++++++++++ MAINTAINERS | 2 +- drivers/media/v4l2-core/v4l2-mem2mem.c | 11 +- drivers/staging/media/hantro/hantro.h | 7 +- drivers/staging/media/hantro/hantro_drv.c | 28 ++--- drivers/staging/media/hantro/hantro_hw.h | 31 +++++ drivers/staging/media/hantro/hantro_v4l2.c | 111 +++++++++--------- 8 files changed, 193 insertions(+), 122 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txt create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.yaml -- 2.26.0.rc2