From patchwork Wed Feb 14 14:19:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 13556595 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A366EC48BC3 for ; Wed, 14 Feb 2024 14:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=XmQxyDWhYx2TJ8i2BzuzPyMYiFb46ERSDMBVM38gNJs=; b=LGbAl4sPCDRyiX vjURQyXEJisncQSPxUD36i/Azs9U8Peky6h+rPgnaCbvw8FGIj/tLRssO4Xe2CsJkyjpmcN3/FK9K J8KVcfUhAoh3VUK/jgZlLKLclv9SAHfNyj/9oweIsFszG/+EA99/ELSWQ3RHMoSYEI2v2RHfHv/Du CWToOP7Pl50xgDEtpO0k7lmwO1hs5OMxoDGglmdlXgEcH5uEeovB6oLnQbledDdbGT8CC92d2fGEE H00PFLJKOWIR64GOQbuZJHQvGL9/4L3dS0JWn7DBvZVSjthaWgCwHWygDcUAWP9SNQeqSYDOaiB+h u9FD8LpZ0Gs7m4XToGLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raG72-0000000D91q-3mNI; Wed, 14 Feb 2024 14:19:48 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raG6p-0000000D8s4-0JYU for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 14:19:36 +0000 Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 599BCB3; Wed, 14 Feb 2024 15:19:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1707920364; bh=Op8xfYq9CEblapR+ckPR9YtdwoyMOHb40q2SOwH43kU=; h=From:To:Cc:Subject:Date:From; b=S7XayFHaqVyvax7NMvSVk5ZKI37o5XAL3YEHiap6YtjxiziCkHYyA+Q4+LoO3XsH6 CG5gTGVhYxbbPh20OwSj32dMP8EuFtDzrQZcywUZvY6z4c5nZtmFHkgVlpoIhfhCmh 358+QkAIZ0A8oBDGuNgq6Ee9xkYvPcZYlQnCZ0Gg= From: Daniel Scally To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: jacopo.mondi@ideasonboard.com, nayden.kanchev@arm.com, robh+dt@kernel.org, mchehab@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jerome.forissier@linaro.org, kieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com, Daniel Scally Subject: [PATCH v2 0/5] Add Arm Mali-C55 Image Signal Processor Driver Date: Wed, 14 Feb 2024 14:19:01 +0000 Message-Id: <20240214141906.245685-1-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_061935_308988_151FA874 X-CRM114-Status: GOOD ( 13.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello all This patchset introduces a driver for Arm's Mali-C55 Image Signal Processor. The driver uses the media controller API and in this initial support implements both of the ISP's capture pipelines allowing a range of output formats plus downscaling and cropping. The capture pipelines are named "Full resolution" and "Downscale" and so abbreviated FR and DS throughout the driver. The driver exposes 4 V4L2 subdevices: - mali-c55 isp: input data formatting - mali-c55 tpg: test pattern generator (modeled as a camera sensor entity) - mali-c55 resizer fr: downscale / crop and format setting for the FR pipe - mali-c55 resizer ds: downscale / crop and format setting for the DS pipe Conspicuously missing from the list are subdevices for the ISP's statistics and parameters; work is progressing in these areas and we plan on introducing them in later series on top of this one. Thanks Dan Daniel Scally (5): media: uapi: Add MEDIA_BUS_FMT_RGB202020_1X60 format code dt-bindings: media: Add bindings for ARM mali-c55 media: mali-c55: Add Mali-C55 ISP driver media: Documentation: Add Mali-C55 ISP Documentation MAINTAINERS: Add entry for mali-c55 driver .../admin-guide/media/mali-c55-graph.dot | 19 + Documentation/admin-guide/media/mali-c55.rst | 318 +++++ .../admin-guide/media/v4l-drivers.rst | 1 + .../bindings/media/arm,mali-c55.yaml | 77 ++ .../media/v4l/subdev-formats.rst | 168 +++ MAINTAINERS | 10 + drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/arm/Kconfig | 5 + drivers/media/platform/arm/Makefile | 2 + drivers/media/platform/arm/mali-c55/Kconfig | 18 + drivers/media/platform/arm/mali-c55/Makefile | 9 + .../platform/arm/mali-c55/mali-c55-capture.c | 1021 +++++++++++++++++ .../platform/arm/mali-c55/mali-c55-common.h | 271 +++++ .../platform/arm/mali-c55/mali-c55-core.c | 767 +++++++++++++ .../platform/arm/mali-c55/mali-c55-isp.c | 682 +++++++++++ .../arm/mali-c55/mali-c55-registers.h | 180 +++ .../arm/mali-c55/mali-c55-resizer-coefs.h | 382 ++++++ .../platform/arm/mali-c55/mali-c55-resizer.c | 678 +++++++++++ .../platform/arm/mali-c55/mali-c55-tpg.c | 425 +++++++ include/uapi/linux/media-bus-format.h | 3 +- 21 files changed, 5037 insertions(+), 1 deletion(-) create mode 100644 Documentation/admin-guide/media/mali-c55-graph.dot create mode 100644 Documentation/admin-guide/media/mali-c55.rst create mode 100644 Documentation/devicetree/bindings/media/arm,mali-c55.yaml create mode 100644 drivers/media/platform/arm/Kconfig create mode 100644 drivers/media/platform/arm/Makefile create mode 100644 drivers/media/platform/arm/mali-c55/Kconfig create mode 100644 drivers/media/platform/arm/mali-c55/Makefile create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-capture.c create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-common.h create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-core.c create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-isp.c create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-registers.h create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-resizer-coefs.h create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-resizer.c create mode 100644 drivers/media/platform/arm/mali-c55/mali-c55-tpg.c