From patchwork Tue Jun 14 19:10:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 581834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA0BC43334 for ; Tue, 14 Jun 2022 19:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344835AbiFNTLw (ORCPT ); Tue, 14 Jun 2022 15:11:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233902AbiFNTLv (ORCPT ); Tue, 14 Jun 2022 15:11:51 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34946205CF for ; Tue, 14 Jun 2022 12:11:49 -0700 (PDT) Received: from pyrite.rasen.tech (softbank036240126034.bbtec.net [36.240.126.34]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C536A825; Tue, 14 Jun 2022 21:11:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655233906; bh=POQJwgYWm/OjgPbqYJOxvoM/PSkiBCRnOT4Lwh/HHu0=; h=From:To:Cc:Subject:Date:From; b=TUv2Mcxd2gX3QNOg9IlpPeEa/P0Ye/+YmfJM83mzh1Xsjt9dJ75mrpVG49J8iFODG Wsb4OQBC7biyVBL720Oznu6908Wv+gX2aswUW5J3CNUc9G4wmCmaYgcz8ECaOzNWn3 KE9StINUmf6vp/oZrc8a1qarknE2YSjdjurC29mQ= From: Paul Elder To: linux-media@vger.kernel.org Cc: Paul Elder , dafna@fastmail.com, heiko@sntech.de, laurent.pinchart@ideasonboard.com, jeanmichel.hautbois@ideasonboard.com, jacopo@jmondi.org, djrscally@gmail.com, helen.koike@collabora.com, linux-rockchip@lists.infradead.org Subject: [PATCH 00/55] media: rkisp1: Cleanups and add support for i.MX8MP Date: Wed, 15 Jun 2022 04:10:32 +0900 Message-Id: <20220614191127.3420492-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello, This series depends on v4 of "media: rkisp1: Misc bug fixes and cleanups" [1]. The ISP integrated in the i.MX8MP is nearly the same as the rkisp1, and so we can reuse the rkisp1 driver for it. This series does some cleanup and refactoring of the rkisp1 driver, (patches 1/55 to 46/55), and then adds support for the i.MX8MP (patches 47/55 to 55/55). Paul [1] https://lore.kernel.org/linux-media/Ymbxs2p9Tuf331qM@pendragon.ideasonboard.com/T/ Laurent Pinchart (38): media: rkisp1: Enable compilation on ARCH_MXC media: rkisp1: Disable runtime PM in probe error path media: rkisp1: Read the ID register at probe time instead of streamon media: rkisp1: Rename rkisp1_match_data to rkisp1_info media: rkisp1: Access ISP version from info pointer media: rkisp1: cap: Print debug message on failed link validation media: rkisp1: Move sensor .s_stream() call to ISP media: rkisp1: Reject sensors without pixel rate control at bound time media: rkisp1: Create link from sensor to ISP at notifier bound time media: rkisp1: Create internal links at probe time media: rkisp1: Rename rkisp1_subdev_notifier() to rkisp1_subdev_notifier_register() media: v4l2-async: Add notifier operation to destroy asd instances media: rkisp1: Fix sensor source pad retrieval at bound time media: rkisp1: isp: Start CSI-2 receiver before ISP media: rkisp1: csi: Handle CSI-2 RX configuration fully in rkisp1-csi.c media: rkisp1: csi: Rename CSI functions with a common rkisp1_csi prefix media: rkisp1: csi: Move start delay to rkisp1_csi_start() media: rkisp1: csi: Pass sensor pointer to rkisp1_csi_config() media: rkisp1: csi: Constify argument to rkisp1_csi_start() media: rkisp1: isp: Don't initialize ret to 0 in rkisp1_isp_s_stream() media: rkisp1: isp: Pass mbus type and flags to rkisp1_config_cif() media: rkisp1: isp: Rename rkisp1_device.active_sensor to source media: rkisp1: isp: Add container_of wrapper to cast subdev to rkisp1_isp media: rkisp1: isp: Add rkisp1_device backpointer to rkisp1_isp media: rkisp1: isp: Pass rkisp1_isp pointer to internal ISP functions media: rkisp1: isp: Move input configuration to rkisp1_config_isp() media: rkisp1: isp: Merge ISP_ACQ_PROP configuration in single variable media: rkisp1: isp: Initialize some variables at declaration time media: rkisp1: isp: Fix whitespace issues media: rkisp1: isp: Constify various local variables media: rkisp1: isp: Rename rkisp1_get_remote_source() media: mc-entity: Add a new helper function to get a remote pad media: mc-entity: Add a new helper function to get a remote pad for a pad media: rkisp1: isp: Disallow multiple active sources media: rkisp1: csi: Plumb the CSI RX subdev media: rkisp1: Add infrastructure to support ISP features media: rkisp1: Make the internal CSI-2 receiver optional media: rkisp1: Configure gasket on i.MX8MP Paul Elder (17): media: rkisp1: debug: Add dump file in debugfs for MI buffer registers media: rkisp1: debug: Add debugfs files to monitor MI and ISP interrupts media: rkisp1: Save info pointer in rkisp1_device media: rkisp1: Make rkisp1_isp_mbus_info common media: rkisp1: Split CSI handling to separate file media: rkisp1: csi: Implement a V4L2 subdev for the CSI receiver media: rkisp1: Use fwnode_graph_for_each_endpoint dt-bindings: media: rkisp1: Add port for parallel interface media: rkisp1: Support the ISP parallel input dt-bindings: media: rkisp1: Add i.MX8MP ISP to compatible media: rkisp1: Add match data for i.MX8MP ISP media: rkisp1: Add and set registers for crop for i.MX8MP media: rkisp1: Add and set registers for output size config on i.MX8MP media: rkisp1: Add i.MX8MP-specific registers for MI and resizer media: rkisp1: Shift DMA buffer addresses on i.MX8MP media: rkisp1: Add register definitions for the test pattern generator media: rkisp1: Fix RSZ_CTRL bits for i.MX8MP .../bindings/media/rockchip-isp1.yaml | 30 +- Documentation/driver-api/media/mc-core.rst | 4 +- .../driver-api/media/v4l2-subdev.rst | 6 + drivers/media/mc/mc-entity.c | 69 ++ .../media/platform/rockchip/rkisp1/Kconfig | 2 +- .../media/platform/rockchip/rkisp1/Makefile | 1 + .../platform/rockchip/rkisp1/rkisp1-capture.c | 49 +- .../platform/rockchip/rkisp1/rkisp1-common.c | 148 ++++ .../platform/rockchip/rkisp1/rkisp1-common.h | 130 +++- .../platform/rockchip/rkisp1/rkisp1-csi.c | 525 ++++++++++++++ .../platform/rockchip/rkisp1/rkisp1-csi.h | 28 + .../platform/rockchip/rkisp1/rkisp1-debug.c | 55 +- .../platform/rockchip/rkisp1/rkisp1-dev.c | 440 +++++++----- .../platform/rockchip/rkisp1/rkisp1-isp.c | 679 +++++++----------- .../platform/rockchip/rkisp1/rkisp1-params.c | 2 +- .../platform/rockchip/rkisp1/rkisp1-regs.h | 87 +++ .../platform/rockchip/rkisp1/rkisp1-resizer.c | 43 +- .../platform/rockchip/rkisp1/rkisp1-stats.c | 4 +- drivers/media/v4l2-core/v4l2-async.c | 10 + include/media/media-entity.h | 63 ++ include/media/v4l2-async.h | 2 + include/uapi/linux/rkisp1-config.h | 3 + 22 files changed, 1735 insertions(+), 645 deletions(-) create mode 100644 drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c create mode 100644 drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Reviewed-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld