Received: by 10.223.164.202 with SMTP id h10csp1461361wrb; Thu, 23 Nov 2017 18:38:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZHFF7Yvao+xOgsfj8rnf1CcaXI7PaahKPzJESOphVo/FgmCFBB3hr4XPJ6CkS9T8GabVT9 X-Received: by 10.98.62.221 with SMTP id y90mr25065276pfj.71.1511491115600; Thu, 23 Nov 2017 18:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511491115; cv=none; d=google.com; s=arc-20160816; b=zYIMKRSu7EQM9FkJ5LtmcLVhCmfdO0ZDZs7SAucboK4hMsXsYkjvE8aWcEntPupT47 if4N5kko7d34jBJN8iDSagaaF6c7GPZf/d/fG36wZXe/ivm+2AfWUMTlGJhoGoFCEqzg kotWAl/wjrQNzx7IlodC9KJtXHZY5nBQ9VozOoZJp2uQ7w9idvykX6Zx6W1b2WhW6ZW4 MqE3ucEiGzTwkEOoxE9n8itPiFd+2u98u7onSlLxOrXgKOstRd2gxWWLnfrHH0FL0w2W xqtk52NzyS6CwnqfBpBSwHaDArGPfXXzz6tJnrS4s8XA24gln7t2WKnEGXkP02KmFRxO mHIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FTg0UUXsU4q2uYnafXoL/3HhAKfIQYgSvIc0cJyhLHo=; b=yNMc7gt/TJaroiUv5nySWUpvrONt3oyesI0qpUZPLi5/AfQRELRBkkXBstAoshTsIu +di746B46Q5AlWRcII8QbGUVSPhG4yPRQUesHE9Jnvka0KsBXpRLPAk0XkPgqroU9WWf nsiSPncEgv5Nx58oOAdHlq5bAPvwgDbkOpBXBwiZz2bLkW9VlYG4sSlCUhPrneWryF0l iVcQTxhHtdCXGbxfDhYwlWKqfGZcknsWTATFiB8WYHV7OJoR4GpwM16z42UBs8dtHMIA jfcG20PG8eUwJ0UW9sbt2E0GCsK3cQ8qiUfiJVqT7kMXGxkE40fSq2+GKIumQLjNakyQ 21eQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si19019210pfr.84.2017.11.23.18.38.23; Thu, 23 Nov 2017 18:38:35 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752859AbdKXCha (ORCPT + 74 others); Thu, 23 Nov 2017 21:37:30 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38078 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbdKXCh2 (ORCPT ); Thu, 23 Nov 2017 21:37:28 -0500 Received: by mail-pf0-f196.google.com with SMTP id r62so14193380pfd.5; Thu, 23 Nov 2017 18:37:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FTg0UUXsU4q2uYnafXoL/3HhAKfIQYgSvIc0cJyhLHo=; b=Sdkt7jnmAOy9VWQTAwBSTVuodDU29F+Dd9OiMBPcZ6H0f/z9ccq7jKlkE75MyTSJH8 7lkbhP0P1SJkWoVUDwpQI2IHYU+Ib8H1UGCb2iqYPo6/2znfu8z4rCHvCni+wOI1+Oaj 0zMx6DjLz/yP5hOpyX8HAV3AJp+weRPe7bSkoYx8vY453hgLopNn/NLCYAs3ZYHtLW6h 5iHI+QyLPMjAIGPAJssoTcPxy6ODV+5WmHD3ItMTMiRpscL+OqwG0bZMgyP3u6yYbK0S 2Hp5QxIBb2hpgnDp7++zbf5Ieu6ulJqIVmB3j8TaPm5Fg3X2ka8bDyz9BJSx6y7o24ig BWaA== X-Gm-Message-State: AJaThX6RdsjqvQ8y9/7m77EJCrv8zumd/7LD/rZ9E1KSN0IZeVYCaSFX V5Z84w7W3xAjV/F/+ynhX00= X-Received: by 10.99.174.1 with SMTP id q1mr19169152pgf.434.1511491047509; Thu, 23 Nov 2017 18:37:27 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id i8sm29440653pgq.67.2017.11.23.18.37.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 18:37:26 -0800 (PST) From: Jacob Chen To: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mchehab@kernel.org, linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, tfiga@chromium.org, zhengsq@rock-chips.com, laurent.pinchart@ideasonboard.com, zyc@rock-chips.com, eddie.cai.linux@gmail.com, jeffy.chen@rock-chips.com, allon.huang@rock-chips.com, devicetree@vger.kernel.org, heiko@sntech.de, robh+dt@kernel.org, Jacob Chen Subject: [PATCH v2 00/11] Rockchip ISP1 Driver Date: Fri, 24 Nov 2017 10:36:55 +0800 Message-Id: <20171124023706.5702-1-jacob-chen@iotwrt.com> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC. Kernel Branch: https://github.com/wzyy2/linux/tree/rkisp1/drivers/media/platform/rockchip/isp1 Below are some infomations about driver/hardware: Rockchip ISP1 have many Hardware Blocks(simplied): MIPI --> ISP --> DCrop(Mainpath) --> RSZ(Mainpath) --> DMA(Mainpath) DMA-Input --> --> DCrop(Selfpath) --> RSZ(Selfpath) --> DMA(Selfpath);) (Acutally the TRM(rk3288, isp) could be found online...... which contains a more detailed block diagrams ;-P) The funcitons of each hardware block: Mainpath : up to 4k resolution, support raw/yuv format Selfpath : up tp 1080p, support rotate, support rgb/yuv format RSZ: scaling DCrop: crop ISP: 3A, Color processing, Crop MIPI: MIPI Camera interface Media pipelines: Mainpath, Selfpath <-- ISP subdev <-- MIPI <-- Sensor 3A stats <-- <-- 3A parms Code struct: capture.c : Mainpath, Selfpath, RSZ, DCROP : capture device. rkisp1.c : ISP : v4l2 sub-device. isp_params.c : 3A parms : output device. isp_stats.c : 3A stats : capture device. mipi_dphy_sy.c : MIPI : sperated v4l2 sub-device. Usage: ChromiumOS: use below v4l2-ctl command to capture frames. v4l2-ctl --verbose -d /dev/video4 --stream-mmap=2 --stream-to=/tmp/stream.out --stream-count=60 --stream-poll use below command to playback the video on your PC. mplayer /tmp/stream.out -loop 0 --demuxer=rawvideo --rawvideo=w=800:h=600:size=$((800*600*2)):format=yuy2 or mplayer ./stream.out -loop 0 -demuxer rawvideo -rawvideo w=800:h=600:size=$((800*600*2)):format=yuy2 Linux: use rkcamsrc gstreamer plugin(just a modified v4l2src) to preview. gst-launch-1.0 rkcamsrc device=/dev/video0 io-mode=4 disable-3A=true videoconvert ! video/x-raw,format=NV12,width=640,height=480 ! kmssink Jacob Chen (7): media: rkisp1: add rockchip isp1 driver media: rkisp1: add Rockchip MIPI Synopsys DPHY driver dt-bindings: Document the Rockchip ISP1 bindings dt-bindings: Document the Rockchip MIPI RX D-PHY bindings ARM: dts: rockchip: add isp node for rk3288 ARM: dts: rockchip: add rx0 mipi-phy for rk3288 MAINTAINERS: add entry for Rockchip ISP1 driver Jeffy Chen (1): media: rkisp1: Add user space ABI definitions Shunqian Zheng (3): media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format arm64: dts: rockchip: add isp0 node for rk3399 arm64: dts: rockchip: add rx0 mipi-phy for rk3399 .../devicetree/bindings/media/rockchip-isp1.txt | 61 + .../bindings/media/rockchip-mipi-dphy.txt | 77 + MAINTAINERS | 10 + arch/arm/boot/dts/rk3288.dtsi | 24 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 26 + drivers/media/platform/Kconfig | 10 + drivers/media/platform/Makefile | 1 + drivers/media/platform/rockchip/isp1/Makefile | 8 + drivers/media/platform/rockchip/isp1/capture.c | 1691 ++++++++++++++++++++ drivers/media/platform/rockchip/isp1/capture.h | 46 + drivers/media/platform/rockchip/isp1/common.h | 330 ++++ drivers/media/platform/rockchip/isp1/dev.c | 632 ++++++++ drivers/media/platform/rockchip/isp1/isp_params.c | 1556 ++++++++++++++++++ drivers/media/platform/rockchip/isp1/isp_params.h | 81 + drivers/media/platform/rockchip/isp1/isp_stats.c | 537 +++++++ drivers/media/platform/rockchip/isp1/isp_stats.h | 81 + .../media/platform/rockchip/isp1/mipi_dphy_sy.c | 805 ++++++++++ drivers/media/platform/rockchip/isp1/regs.c | 251 +++ drivers/media/platform/rockchip/isp1/regs.h | 1578 ++++++++++++++++++ drivers/media/platform/rockchip/isp1/rkisp1.c | 1230 ++++++++++++++ drivers/media/platform/rockchip/isp1/rkisp1.h | 130 ++ drivers/media/v4l2-core/v4l2-ioctl.c | 2 + include/uapi/linux/rkisp1-config.h | 554 +++++++ include/uapi/linux/videodev2.h | 4 + 24 files changed, 9725 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt create mode 100644 drivers/media/platform/rockchip/isp1/Makefile create mode 100644 drivers/media/platform/rockchip/isp1/capture.c create mode 100644 drivers/media/platform/rockchip/isp1/capture.h create mode 100644 drivers/media/platform/rockchip/isp1/common.h create mode 100644 drivers/media/platform/rockchip/isp1/dev.c create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c create mode 100644 drivers/media/platform/rockchip/isp1/regs.c create mode 100644 drivers/media/platform/rockchip/isp1/regs.h create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h create mode 100644 include/uapi/linux/rkisp1-config.h -- 2.15.0 From 1584833359873881490@xxx Thu Nov 23 05:27:51 +0000 2017 X-GM-THRID: 1584833359873881490 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread