Received: by 10.223.164.202 with SMTP id h10csp823399wrb; Wed, 15 Nov 2017 08:28:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZVF86m4bcRq5Va7MThXlPhvXOoAf/nhJYQm7ScNFTtEYCvDQlUDoCivl+EKkC3T6ZGNf3H X-Received: by 10.159.255.75 with SMTP id u11mr3220018pls.79.1510763315877; Wed, 15 Nov 2017 08:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510763315; cv=none; d=google.com; s=arc-20160816; b=zLNqWlDeIMK0/epqpBZgDuYzjUh8A0eU0PtbWR/A/z4b0Bb57L4fViUhi7H5N4G6mD t6D7f/kDhtlwcqeMNaPzl2xWlLmVp7FdCT6Ltg4s2LfiflUQ/2qUCDbM5Rk5kfUdtXzU qk5wUdT8BNTCPY2fGwxOfDvyNeNwSmznJjQQqxsu1J6S2m4Ag17eVHjTsmnF0b2g0HZF YDsjzb230swsDDRR6loWMxftyn9ga3rdVovMxfoE0JfXZ8yIgx34Darhzp7e6zbvyyso 2SmVE/DBx2i3Vemy3KCbqsvov4C7PyuVOXJAvbcXbfZlMKfD2hZqCQd464uHYkx1ciF7 vWHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qTOIJVGU8qgfUbBPxhRyPtoSkRGiJ5DCpwgZ/D3zylU=; b=MuRxbLKIDeYNXt1zwXWKVTmcImTn68oRDYyqMDJquiqNL5s2FCudda18Vc6q4JSf3u R8zudsUsgSWO7cPqyjSOD54Na6RYjWXrKH1lSyp1Qc/FgG5tFVIV2UOAYMSISI6zvNeI Y0Y1aydkdaRJJ/u0ACyAB+jdODhr/sjCO46kd1aAYtmRcMKklD8u7AIWscCzaHhfy014 douYpVMkSdlQmbhlKxDiTNCECm9wS8pCxkeZ/FHCP/Srm7DeOBIJ09HRC9L+3ycm2OxR yKGGvap/9HM7na4DJmd5rrT5XMQjR8zyHgQL+lGMUtxxScD+2q6zeqXI238/63dm3f+u XziQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ttdV4MVy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba12si18658255plb.95.2017.11.15.08.28.23; Wed, 15 Nov 2017 08:28: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ttdV4MVy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758258AbdKOO6I (ORCPT + 89 others); Wed, 15 Nov 2017 09:58:08 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:46196 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757584AbdKOO5p (ORCPT ); Wed, 15 Nov 2017 09:57:45 -0500 Received: by mail-qt0-f193.google.com with SMTP id 1so34899407qtn.3; Wed, 15 Nov 2017 06:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qTOIJVGU8qgfUbBPxhRyPtoSkRGiJ5DCpwgZ/D3zylU=; b=ttdV4MVyWGuuKOeMJ1AN6RWGHW/KRgDeK3soyTuhRFUHHgXDijRqPDpLP76gcoiZhP jOffQc90DiWp1waq9UVNV+GAC7PulHQthzDzivLydy0NEZnBz2H+rjzysIqxT98mX0xW OApE1xYopm9ERNdNjpd+uDRoIiA5QGOgrS6jxQPU6CtwtRnPWOOh1lOk3WlWaR5yChLR g//+kTnci3jpB1QnlkwZxv7w9olCK6DFr3OXBAXJnwJYQjc/QeK/qlgBR1K3Vq8Tzoup oi63htowHpKDToakqPkqaqWw1urEhvpSxw8CFq0oRDBDeXKU07JPnFZF7SvHH3Dy0XEk irNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qTOIJVGU8qgfUbBPxhRyPtoSkRGiJ5DCpwgZ/D3zylU=; b=Dc1S9CWZBZRsMc4cPsm+sSnUUNoZZDRPMO3Rt6uDeNAxDyBtOb2bEGHy+x07kHYV/j 6RtICVcSPuWHiYYe8wU55eoO+/lAhKqWCphnYgCLivvTRf/BXL4c6cvqm2ncxkN6vTyF vCB/8E92U8PhpFswCHSixbvw1vcsRufiFGm3yGtVpuJbV1B4a75bjZbOhhl43ctGk10B fe/M4URa9fUGvD0U7uheK8w9ub0JJ30DlabLIlHcFiOr4ld/vLb9Pa5gl+eqtoRCp5e3 3+G9LlI4Bn2BLmHa5X2YK9S7aFAxmSGzSDf6Y5ua1nuhySp76+DFEyrtBRXD0tRjMLGd 3JFw== X-Gm-Message-State: AJaThX4s7nDIf8rNb5HTyUCrzm2m8iP/8Jsn2PnUBx1kDxNY16J4avE2 YbWpKYv6Sh5NoE1b0nOT5htYTh8CHfvhckER05E= X-Received: by 10.200.13.70 with SMTP id r6mr23806182qti.303.1510757864177; Wed, 15 Nov 2017 06:57:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.38.139 with HTTP; Wed, 15 Nov 2017 06:57:43 -0800 (PST) In-Reply-To: References: <20171115072927.29367-1-jacob-chen@iotwrt.com> From: Jacob Chen Date: Wed, 15 Nov 2017 22:57:43 +0800 Message-ID: Subject: Re: [RFC PATCH 0/5] Rockchip ISP1 Driver To: Tomasz Figa Cc: "open list:ARM/Rockchip SoC..." , Linux Media Mailing List , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Nicolas Dufresne , Sakari Ailus , Shunqian Zheng , =?UTF-8?B?6ZKf5Lul5bSH?= , Eddie Cai , Jeffy , Allon Huang , Philipp Zabel , Steve Longerbeam , linux@armlinux.org.uk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tomasz, 2017-11-15 16:03 GMT+08:00 Tomasz Figa : > Hi Jacob, > > Thanks for sending the series! > > On Wed, Nov 15, 2017 at 3:29 PM, Jacob Chen wrote: >> This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC. >> >> TODO: >> - Thomas is rewriting the binding code between isp, phy, sensors, i hope we could get suggestions. >> https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/768633/2 >> rules: >> - There are many mipi interfaces("rx0", "dxrx0")(actually it also could be parallel interface) in SoC and isp can decide which one will be used. >> - Sometimes there will be more than one senor in a mipi phy, the sofrware should decide which one is used(media link). >> - rk3399 have two isp. > > Also the two ISP subsystems have their own, completely different, CSI2 > PHY blocks, so we need to make the ISP driver work with two different > PHY drivers. > >> - Add a dummy buffer(dma_alloc_coherent) so drvier won't hold buffer. >> - Finish all TODO comments(mostly about hardware) in driver. >> >> To help do a quick review, i have push source code to my Github. >> 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 > > Is the rkcamsrc plugin source available somewhere to download? It could be download, but it's rough and just be used by me to test driver at present since Hal3 is not completed. You can consider it as "media-ctl + gstreamer v4l2src" https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2src.c > > Thanks, > Tomasz From 1584124663031454618@xxx Wed Nov 15 09:43:25 +0000 2017 X-GM-THRID: 1584119114847659121 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread