Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2128560imm; Wed, 16 May 2018 08:17:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9jdfVS08o/DRHJ+DaiwaBfZXV8VwIyYtp/h0eIWYawqbobvTrz2QdeZsS4eY1zTxB9XMb X-Received: by 2002:a65:61a6:: with SMTP id i6-v6mr1068696pgv.88.1526483869276; Wed, 16 May 2018 08:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526483869; cv=none; d=google.com; s=arc-20160816; b=RyIJafXWqS8Z0m+rFUq9g8JievXglOKZvrltcK/i+in9N5SvGTgJX1qLEKhKBJklkF 0ewQT6O+GuQglykKNhvyUDJziIn9WuAUNCsuLQBdCyEA83Iqmz0sFmLsIFFmCEi3TEIV GRlBPCwA36RXvghPS4p3JkfR7FqNxG/k5zjiBwi2tRHaWrzZc6mFbOiJMbbUmTchvJlh 9uSOmp/UDax90OqbsIz60SmdY19jfW0ibUal4w4Lqb8TEuxOk4ngIaHGHFvJHzSNc6bH hctGHggGsG9NFYeOLAioiGHBPd0DMXNEPyw6WeZAeYx/OedbvuymsVkItGcaWts5Tl4z AWGg== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=ge6rY5IBMAYoA1GBaLFI5cEAV8UABSo9fCbQuHl8Tv0=; b=Fxb9ZE+8Nxn4RsAP/yiIirU9SZCrb4PqPLZshZsSbvAjrB8K/jnRjiqWaDB9da9DUI Lf1X9REBZjoMt5wiPeVJlePmzJ2HUyqJl8YrT1yN7+On3/QwbjzSBWOXgnhwamxanWq2 GYyWMqsAPSrMPp+iV3c603Jtvq8sieLvbDTEu6dd5EjGk333H1qwexkg5gwv8wEw7iDK 6P3meoDmNj+9zDqxlecw4RH6e2mTzlbcKCWkFzZG+JL3Ro0invWIAmzG+RafX43FM6WY nUY4f9ceGpc2KUzIpXantaLVXX64tZNqoGwmDNtdhB+FMSOldnuTz/9nh7zPiSl6RN1J JvxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nhhvoe35; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2-v6si2891946plk.433.2018.05.16.08.17.34; Wed, 16 May 2018 08:17:49 -0700 (PDT) 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=@chromium.org header.s=google header.b=nhhvoe35; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315AbeEPPP7 (ORCPT + 99 others); Wed, 16 May 2018 11:15:59 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:43043 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbeEPPP5 (ORCPT ); Wed, 16 May 2018 11:15:57 -0400 Received: by mail-ua0-f193.google.com with SMTP id d4-v6so752273ual.10 for ; Wed, 16 May 2018 08:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ge6rY5IBMAYoA1GBaLFI5cEAV8UABSo9fCbQuHl8Tv0=; b=nhhvoe35CrU5ozlex3VCnc5jXmFvGjQpY8HRZ0qghgjKZAvGkIxeNTTu7G+62MBGjj 2wYUQywkRA9Qi5Gif4N9kggJPuC1x69ZFlE83vflE0Aaic7HKTV9G1ormKMIshHK8dwQ Yt18SpeBMx67Ao5eD38iWxLaMhrCXm2enY9O8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ge6rY5IBMAYoA1GBaLFI5cEAV8UABSo9fCbQuHl8Tv0=; b=J304Afu679kDBBTNj+1xJjZbq46Iym0FNVEqjj6Q+9au5vBkN6FzFvhfoYyBzt19Qk FYy8I957CtMQVq2A839BLsQCpaOqIm6ZJ8d5YFFjQDKGC6A9NBnWr7Z/rHrVy9pSxzD3 aSaaHyUR5flGlbXxe0xFKIfxgUsueeOgVbwQEO6ZAg3QRG2HyIIRtzcWIpfsr3k9tbQj 7q2jHU0HvGLJFri0VRgJs1Nu2xve6IrfDecG0//mun48geB5eO0m0TucpiUOuumUE7Hj DlA4gPpDJtTjeMSjoHMWOJgA2EjFbavnZ2nqrVh8dPO+Vhxpg2mmGtNp8TiHCfk7Lx3A Rcag== X-Gm-Message-State: ALKqPwdBFeXMaeQJJwYNmo7OIM5dpoQQfI2qb8PG1VL8xr1w90T9bDNv RYArVj5KtUnCl6MMSovaMH5pHHVHe5s= X-Received: by 2002:ab0:5e8a:: with SMTP id y10-v6mr1127308uag.119.1526483756322; Wed, 16 May 2018 08:15:56 -0700 (PDT) Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com. [209.85.213.51]) by smtp.gmail.com with ESMTPSA id q132-v6sm692377vkd.0.2018.05.16.08.15.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 08:15:55 -0700 (PDT) Received: by mail-vk0-f51.google.com with SMTP id i185-v6so728285vkg.3 for ; Wed, 16 May 2018 08:15:54 -0700 (PDT) X-Received: by 2002:a1f:394b:: with SMTP id g72-v6mr1155866vka.97.1526483754113; Wed, 16 May 2018 08:15:54 -0700 (PDT) MIME-Version: 1.0 References: <20180308094807.9443-1-jacob-chen@iotwrt.com> <20180308094807.9443-5-jacob-chen@iotwrt.com> <18647985.GIavVuIZz4@avalon> In-Reply-To: From: Tomasz Figa Date: Thu, 17 May 2018 00:15:41 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 04/17] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver To: jacobchen110@gmail.com Cc: Laurent Pinchart , "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Mauro Carvalho Chehab , Linux Media Mailing List , Sakari Ailus , Hans Verkuil , Shunqian Zheng , =?UTF-8?B?6ZKf5Lul5bSH?= , Eddie Cai , Jeffy , devicetree@vger.kernel.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , zhengxing@rock-chips.com 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 Jacob, On Wed, May 16, 2018 at 11:54 PM Jacob Chen wrote: > 2018-05-16 22:39 GMT+08:00 Jacob Chen : > > Hi Laurent, > > > > 2018-05-16 13:20 GMT+08:00 Laurent Pinchart < laurent.pinchart@ideasonboard.com>: > >> Hi Jacob, > >> > >> Thank you for the patch. > >> > >> On Thursday, 8 March 2018 11:47:54 EEST Jacob Chen wrote: > >>> From: Jacob Chen > >>> > >>> This commit adds a subdev driver for Rockchip MIPI Synopsys DPHY driver > >> > >> Should this really be a subdev driver ? After a quick look at the code, the > >> only parameters you need to configure the PHY is the number of lanes and the > >> data rate. Implementing the whole subdev API seems overcomplicated to me, > >> especially given that the D-PHY doesn't deal with video streams as such, but > >> operates one level down. Shouldn't we model the D-PHY using the Linux PHY > >> framework ? I believe all the features you need are there except for a D-PHY- > >> specific configuration function that should be very easy to add. > >> > > > > It deserves a subdev driver since the ISP is not the only user. > > Other driver, like VIP, use it too. > > > > > For example, if there are two sensors connected to a rk3399 board. > Sensor1 --> DPHY1 > Sensor2 --> DPHY2 > With a subdev phy driver, i can choose either ISP or VIP for > sensor1/sensor2 by enable/disable media link in the run time. > 1. > Sensor1 --> DPHY1 ---> VIP > Sensor2 --> DPHY2 ---> ISP1 > 2. > Sensor1 --> DPHY1 ---> ISP1 > Sensor2 --> DPHY2 ---> VIP What is VIP? Also, if we model the DPHY using the PHY interface, it will be still possible to achieve the same, just by toggling the link between sensor and VIP or ISP1: 1. Sensor1 -------|~|--- VIP \ | (PHY interface) \ DPHY1 \ | (PHY interface) \---| |-- ISP1 Sensor2 -------| |-- VIP \ | (PHY interface) \ DPHY2 \ | (PHY interface) \---|~|-- ISP1 2. Sensor1 -------| |-- VIP \ | (PHY interface) \ DPHY1 \ | (PHY interface) \---|~|-- ISP1 Sensor2 -------|~|-- VIP \ | (PHY interface) \ DPHY2 \ | (PHY interface) \---| |-- ISP1 Best regards, Tomasz