Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4272472ybz; Tue, 28 Apr 2020 08:32:15 -0700 (PDT) X-Google-Smtp-Source: APiQypKomljCc1g83dUjY4QE2oZ1wPGXH6EFp4rwQIrRzHfhDraE6MooioD3hqKwG3VQzn3MaFfH X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr22363462edb.46.1588087935443; Tue, 28 Apr 2020 08:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588087935; cv=none; d=google.com; s=arc-20160816; b=OdxCdaMtcla6dCwAUIqb6AFEGLKTISTOvy7OYi4boGmwN37TOxgMtm1+qT05jOsHBo Kpl4CSWQ1fIlYy/ypYkDnyb5250D3c/65mfWg40AE7EqNbBo0nYBM52/BV/A3hwclJJi Ko+xovWrTplvtt4VX8zwrpGPNudJh5gEEGCGhzkn5K3lmS3VbFDmKn5gEVQfmO7zLHC1 5PTumKnL579Aw+wPznU/cs52TfqO12VgRcI2aQoWrBtqbZ4na8cuzku2frTUDZqKItV4 vdazE+v6D2z0A8PEGYHn4Gxp2MGQOYnQctBYxfusCds9kDjV9CaahgaRoM82nltRMKjA It9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=ACsdcmPNJMTTTwskSc7fbtaJNBvyX2gLdzIz5qYW2zI=; b=wXmoX9wAWwqPIO01eCi2cxZ6OjiEY6/TGXU5GrzMN2CmvLOxek7AYizmVbWjH/ALWE V7Cd9Zh1O9kjRKPBJrlyx/CNXOuhKjM/uy/dKtx2TX3IcuwF4QD4gjmKQ1esrx9yaM4R YTR1jZtYCMVMEtvuSX8FjfjVtjODPdNiuOy+7yeA6JDagsWCPbXaesJ6zFhZrocwJSsl 57+eCOQbNaKQvX/Imj2lDibbu/6uqzwbqPMGnUPhUac8uof2X+ofcJEUTfuwW3wbLluG HjNhmKK+kvcccYijC/4sFOrbUuouusB0Sc69n8DWmObz3XOLJpEPHULdl6VqpzbiW4Kf TxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Rhfnc3r5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si1995261edg.437.2020.04.28.08.31.51; Tue, 28 Apr 2020 08:32:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Rhfnc3r5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728097AbgD1P2W (ORCPT + 99 others); Tue, 28 Apr 2020 11:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728021AbgD1P2W (ORCPT ); Tue, 28 Apr 2020 11:28:22 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB23C03C1AB for ; Tue, 28 Apr 2020 08:28:20 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id h4so3266566wmb.4 for ; Tue, 28 Apr 2020 08:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=ACsdcmPNJMTTTwskSc7fbtaJNBvyX2gLdzIz5qYW2zI=; b=Rhfnc3r5FaP2Y00zFRmq7xAUbbTfePa4pMoR05MEZraJ2x76Bh/5LUDrjGBHsTZMs8 p0qOlrvzbAGN47ygi9rDG/eOZRIymRjmVEG0EhjhQxeYLKqISYPHY3+Wpn4lo5uBARW9 EZh0OliUCqfGW7euCmZ2OxALOlvZhOB7kqjg0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=ACsdcmPNJMTTTwskSc7fbtaJNBvyX2gLdzIz5qYW2zI=; b=Xmm2pKwXLt5al7VgMiU9Wu/WUpgHEGJunV87W6h1A8ki/oOV+sXx6l4QZwDHQ4b1cX f3/bzTJl6spyBswhOSxZBxw8ocDn28Xkfhgssjk3GzQyimun5glCgueEQXHcCV1aREb0 18Oqabli6YmizfH4bVTlBA4z4M9YZg2DAhiDfLjRhE/9Laz1ilQ2lD5i8xYPepIrCMl0 iHREsMAXi2HsQa1JzT0a0z/+sei4LIay1ar8nP2Xc2lb9xcJVDf9ca5TBdxnsYg+og4F om1ilmTMnobaXxHwvepYVeYsn13mukgCKwXK63/kvPP5j9VbE/OpAOjIr5LvC7NzfoJW hWlA== X-Gm-Message-State: AGi0PuZxq4DLuyvxTmwr3b9wEH9vnTxT10EUZ9F/WNI4520jpn1EQPdO aNx29D/WV8Y0UufZFlkzphjn1A== X-Received: by 2002:a7b:c759:: with SMTP id w25mr5720407wmk.68.1588087699047; Tue, 28 Apr 2020 08:28:19 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id b4sm25992132wrv.42.2020.04.28.08.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 08:28:17 -0700 (PDT) Date: Tue, 28 Apr 2020 17:28:15 +0200 From: Daniel Vetter To: Angelo Ribeiro Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , Sam Ravnborg , Gustavo Pimentel , Joao Pinto Subject: Re: [PATCH v3 3/4] drm: ipk: Add extensions for DW MIPI DSI Host driver Message-ID: <20200428152815.GX3456981@phenom.ffwll.local> Mail-Followup-To: Angelo Ribeiro , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , David Airlie , Sam Ravnborg , Gustavo Pimentel , Joao Pinto References: <24372475c0afe1e88f323efec16300903d1c6294.1587992776.git.angelo.ribeiro@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24372475c0afe1e88f323efec16300903d1c6294.1587992776.git.angelo.ribeiro@synopsys.com> X-Operating-System: Linux phenom 5.3.0-3-amd64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 04:00:35PM +0200, Angelo Ribeiro wrote: > Add Synopsys DesignWare IPK specific extensions for Synopsys DesignWare > MIPI DSI Host driver. > > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: David Airlie > Cc: Daniel Vetter > Cc: Sam Ravnborg > Cc: Gustavo Pimentel > Cc: Joao Pinto > Signed-off-by: Angelo Ribeiro I've dumped this on a pile of bridge drivers by now, but I don't think the dw-mipi-dsi organization makes much sense. I think what we'd need is: - drm_encoder is handled by the drm_device driver, not by dw-mipi-dsi drm_bridge driver - the glue code for the various soc specific implementations (like ipk here) should be put behind the drm_bridge abstraction. Otherwise I'm not really seeing why exactly dw-mipi-dsi is a bridge driver if it doesn't work like a bridge driver - Probably we should put all these files into drm/bridge/dw-mipi-dsi/ - drm_device drivers should get at their bridges with one of the standard of helpers we have in drm_bridge, not by directly calling into a bridge drivers. I know that dw-hdmi is using the exact same code pattern, but we got to stop this eventually or it becomes an unfixable mess. -Daniel > --- > Changes since v3: > - Rearranged headers. > --- > drivers/gpu/drm/ipk/Kconfig | 9 + > drivers/gpu/drm/ipk/Makefile | 2 + > drivers/gpu/drm/ipk/dw-mipi-dsi-ipk.c | 557 ++++++++++++++++++++++++++++++++++ > 3 files changed, 568 insertions(+) > create mode 100644 drivers/gpu/drm/ipk/dw-mipi-dsi-ipk.c > > diff --git a/drivers/gpu/drm/ipk/Kconfig b/drivers/gpu/drm/ipk/Kconfig > index 1f87444..49819e5 100644 > --- a/drivers/gpu/drm/ipk/Kconfig > +++ b/drivers/gpu/drm/ipk/Kconfig > @@ -11,3 +11,12 @@ config DRM_IPK > Enable support for the Synopsys DesignWare DRM DSI. > To compile this driver as a module, choose M here: the module > will be called ipk-drm. > + > +config DRM_IPK_DSI > + tristate "Synopsys DesignWare IPK specific extensions for MIPI DSI" > + depends on DRM_IPK > + select DRM_DW_MIPI_DSI > + help > + Choose this option for Synopsys DesignWare IPK MIPI DSI support. > + To compile this driver as a module, choose M here: the module > + will be called dw-mipi-dsi-ipk. > diff --git a/drivers/gpu/drm/ipk/Makefile b/drivers/gpu/drm/ipk/Makefile > index 6a1a911..f22d590 100644 > --- a/drivers/gpu/drm/ipk/Makefile > +++ b/drivers/gpu/drm/ipk/Makefile > @@ -2,3 +2,5 @@ > ipk-drm-y := dw-drv.o dw-vpg.o > > obj-$(CONFIG_DRM_IPK) += ipk-drm.o > + > +obj-$(CONFIG_DRM_IPK_DSI) += dw-mipi-dsi-ipk.o > diff --git a/drivers/gpu/drm/ipk/dw-mipi-dsi-ipk.c b/drivers/gpu/drm/ipk/dw-mipi-dsi-ipk.c > new file mode 100644 > index 0000000..f8ac4ca > --- /dev/null > +++ b/drivers/gpu/drm/ipk/dw-mipi-dsi-ipk.c > @@ -0,0 +1,557 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2019-2020 Synopsys, Inc. and/or its affiliates. > + * Synopsys DesignWare MIPI DSI solution driver > + * > + * Author: Angelo Ribeiro > + * Author: Luis Oliveira > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include