From patchwork Tue May 10 11:50:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15840 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0BFAAC3256 for ; Tue, 10 May 2022 11:51:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D2B365647; Tue, 10 May 2022 13:51:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652183518; bh=znKOnW5DcqLMT8bFMMoINNY9WM5rEJCjpMdpXf5v+rw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fHHRzj1EVOW1GDUVUmI3a92sCfvS/SkBaNxFeekIsu3BxbzYWA/Z3b7A2Y4KQxQXZ Ed2ckKUfoN3PWwl/r+uz7KET6V9PhfDqR6weL8VhD7UdTcURTBye51t+6kPH/k7R1O jk2fqro6ThlFmNrxcy0VOMFaFt8CDMsqGu6dndm4Rkg/DbN+OrgVaFzbFQirrPSFA8 Iros5j21IdSH7CrKvYyb/IWL4C+WeOxmM3HQFHnqOWr8COvQ8KwLWSEmv+0yzQ+IG4 wyCixbn2rY+5NhOLKYKT0SPy88dJwVW5r6QFI+szYYT+4YINAcN+uXYYTpE4ClyEUU aigSKz1Zid6Gg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EB3D465643 for ; Tue, 10 May 2022 13:51:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wcGShA1j"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DEACB824; Tue, 10 May 2022 13:51:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652183516; bh=znKOnW5DcqLMT8bFMMoINNY9WM5rEJCjpMdpXf5v+rw=; h=From:To:Cc:Subject:Date:From; b=wcGShA1jZVNewEmn8mEEFWEqxQ/fTZ/IjA+bmbzZ7sCdUlV13on9+smivez/CTCww CFjNYnln53w/aDwrXptDkAgDiRu5WoJVQkDdIK6VDE75G2HduAqHRPrRqMOE2lnRMz 7oAIwzdNlydz4I/B8r0TAtzXeXYdE6WR9ltQM4cE= To: libcamera-devel@lists.libcamera.org Date: Tue, 10 May 2022 14:50:57 +0300 Message-Id: <20220510115147.19360-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/50] staging: media: imx: Prepare destaging of imx7-media-csi X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Martin Kepplinger , kernel@pengutronix.de, Dorota Czaplejewicz , Alexander Stein , Rui Miguel Silva , Philipp Zabel , Steve Longerbeam Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series prepares the imx7-media-csi for destaging by decoupling it from the helpers shared with the i.MX6 IPUv3. The strategy Paul and I have followed is to import copies of helper code and, refactor it within the imx7-media-csi driver, and repeat until no more shared helpers are used. There is still room for refactoring and simplification of the imx7-media-csi driver, but I believe it is now in a state clean enough to be moved out of staging. The series also includes a few fixes or improvements in supported formats that are now made possible thanks to this refactoring. See patches 45/50 and 46/50 for details. The code size has grown as a result. This is partly offset by code in the shared helpers that can be removed or simplified, but I haven't starting working on that. The helpers are now used for the i.MX6 IPUv3 only, so I will leave this exercise to anyone who would be interested in destaging that driver as well. Some of the items in the TODO file related to the imx7-media-csi driver have been addressed. The two remaining items are frame interval monitor support and restricting the list of supported formats to the SoC version. The former isn't a destaging blocker in my opinion, as the feature can be added later if desired (and frame interval monitoring should then be moved to the V4L2 core). I believe the latter could also be addressed after destaging the driver, but in any case, this is a discussion for a future destaging series (which may come as soon as this one is accepted). Alexander, this also could greatly simplify your "[PATCH v3 0/8] imx7/imx8mm media / csi patches" series. Laurent Pinchart (48): staging: media: imx: imx7-media-csi: Initialize locks early on staging: media: imx: imx7-media-csi: Split imx_media_dev from probe() staging: media: imx: imx7-media-csi: Import notifier helpers staging: media: imx: imx7-media-csi: Drop duplicate link creation staging: media: imx: imx7-media-csi: Drop the imx_media notifier staging: media: imx: imx7-media-csi: Don't populate vdev lists staging: media: imx: imx7-media-csi: Drop unused frame_interval staging: media: imx: imx7-media-csi: Move format init to probe time staging: media: imx: imx7-media-csi: Import video device helpers staging: media: imx: imx7-media-csi: Drop legacy video device support staging: media: imx: imx7-media-csi: Drop unused controls support staging: media: imx: imx7-media-csi: Reorganize imx7_csi structure staging: media: imx: imx7-media-csi: Fold capture_priv into imx7_csi staging: media: imx: imx7-media-csi: Ensure consistent function prefix staging: media: imx: imx7-media-csi: Don't set subdev group id staging: media: imx: imx7-media-csi: Import imx_media_dev_init() helper staging: media: imx: imx7-media-csi: Embed imx_media_dev in imx7_csi staging: media: imx: imx7-media-csi: Drop imx_media_add_video_device call staging: media: imx: imx7-media-csi: Don't initialize unused fields staging: media: imx: imx7-media-csi: Inline imx_media_pipeline_pad() staging: media: imx: imx7-media-csi: Import imx_media_pipeline_set_stream() staging: media: imx: imx7-media-csi: Avoid unnecessary casts staging: media: imx: imx7-media-csi: Inline pipeline start/stop staging: media: imx: imx7-media-csi: Fold imx_media_dev into imx7_csi staging: media: imx: imx7-media-csi: Decouple from imx_media_buffer staging: media: imx: imx7-media-csi: Fold imx_media_video_dev into imx7_csi staging: media: imx: imx7-media-csi: Store imx7_csi in drv data staging: media: imx: imx7-media-csi: Decouple from imx_media_dma_buf staging: media: imx: imx7-media-csi: Decouple from shared macros staging: media: imx: imx7-media-csi: Drop error message on alloc failure staging: media: imx: imx7-media-csi: Import format helpers staging: media: imx: imx7-media-csi: Replace ipu_color_space with bool yuv field staging: media: imx: imx7-media-csi: Drop IC support from imx7_csi_try_colorimetry() staging: media: imx: imx7-media-csi: Drop IPU-only formats staging: media: imx: imx7-media-csi: Drop unsupported YUV and RGB formats staging: media: imx: imx7-media-csi: Make default formats consistent staging: media: imx: imx7-media-csi: Define macro for default mbus code staging: media: imx: imx7-media-csi: Simplify default mbus code in try_fmt staging: media: imx: imx7-media-csi: Drop YUV/RGB/BAYER format selectors staging: media: imx: imx7-media-csi: Drop unneeded imx7_csi_pixfmt fields staging: media: imx: imx7-media-csi: Inline imx7_csi_init_mbus_fmt() staging: media: imx: imx7-media-csi: Simplify default format in try_fmt staging: media: imx: imx7-media-csi: Fix list of supported formats staging: media: imx: imx7-media-csi: Add V4L2_PIX_FMT_Y14 support staging: media: imx: imx7-media-csi: Drop unneeded pixel format validation staging: media: imx: imx7-media-csi: Inline imx7_csi_enum_pixel_formats() staging: media: imx: imx7-media-csi: Drop V4L2 events support staging: media: imx: imx7-media-csi: Drop usage of shared helpers Paul Elder (2): staging: media: imx: imx7-media-csi: Move misc init out of probe() staging: media: imx: imx7-media-csi: Remove imx_media_of_add_csi drivers/staging/media/imx/imx7-media-csi.c | 1370 +++++++++++++++++--- 1 file changed, 1172 insertions(+), 198 deletions(-) base-commit: c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a