Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3094007pxa; Tue, 25 Aug 2020 11:13:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg3D1aaeqhwAOH2XZ+FU4YDaY/eDgO/ytoBn90Iv1rlRwIOeDtDGiCsHKdpRcGGLdDGRBc X-Received: by 2002:a17:906:a89a:: with SMTP id ha26mr8362986ejb.391.1598379204927; Tue, 25 Aug 2020 11:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598379204; cv=none; d=google.com; s=arc-20160816; b=OvTfbmHoGeFAsmRR5deiETbMPdc3AW8N656Es6c1ZaOrmQ2NNa+vhwJrccoSKaAcbZ q8jipX6Us++8KM3GMrveJIdeE0ZQZ4uCAie9/KXQTsJV8Hc0kbPOUhAJZkgW6LQWEy8c Lrt3zjFxXm2lFOV4MMoXckBgHRPHWWLSew5qR5rzNLOc+IhZCrYiEpwy2tQx7rZyITj/ lWoAKHogFV01z0tSky7vFIsUEj8fa6ZicGzPqGxQvTlzfSPShw8OVzP222OA7QpDtwyv z08azWCcsD3moLCG0ATf4408XQz7xGB4/taouDLRL5MWalYTPDz8WzcdL67YSEZMIVRA 5nEA== 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:message-id:subject:cc:to:from:date; bh=yb9VHGBI196EIcSJmoMgm6w3kD6WrtJNvVSc1zmTkRg=; b=UHJOJjSNdAnLYH0Kg5Qo2laZ5Zw8tt3lgkLb8pcuzzCbhtx3cXf6SX3tBUPX2cmg53 l1s3MAbwPZaR9b9IsnjRUmuk5sT/9vxOB0qjKOT/axf9r4f7rS8u8AItwi8CBIlrlRxo shN/qzPEdyGoaYhD8rhTJLoKeDuvg2dcG5OBfsdF5CE7DbPnH1ZGgwHaDrWP8OQUWecJ nBt/ORzlUrhblxvjhg7MaJ/C9sXrZ2U6V6X//Q7DI3dzX4Yp+icebi4kIYRGZ3IWOUe8 HZB04X96lexYzxU/S2EaMThAXdaMcn5GmmESlMloAmnPHaLiBHOu5xJyJ6T/W7NolHCU VCNw== ARC-Authentication-Results: i=1; mx.google.com; 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 m64si6941770ede.91.2020.08.25.11.12.58; Tue, 25 Aug 2020 11:13:24 -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; 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 S1726475AbgHYSMH (ORCPT + 99 others); Tue, 25 Aug 2020 14:12:07 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:34030 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgHYSMF (ORCPT ); Tue, 25 Aug 2020 14:12:05 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id C479B80530; Tue, 25 Aug 2020 20:11:36 +0200 (CEST) Date: Tue, 25 Aug 2020 20:11:35 +0200 From: Sam Ravnborg To: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman , Neil Armstrong , Xinliang Liu , Wanchun Zheng , linuxarm@huawei.com, dri-devel , Andrzej Hajda , Laurent Pinchart , devel@driverdev.osuosl.org, Daniel Borkmann , John Fastabend , Xiubin Zhang , Wei Xu , David Airlie , Xinwei Kong , Tomi Valkeinen , Bogdan Togorean , Laurentiu Palcu , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Liwei Cai , Jesper Dangaard Brouer , Manivannan Sadhasivam , Chen Feng , Alexei Starovoitov , linaro-mm-sig@lists.linaro.org, Rob Herring , Jakub Kicinski , mauro.chehab@huawei.com, Rob Clark , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liuyao An , Rongrong Zou , bpf@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH 00/49] DRM driver for Hikey 970 Message-ID: <20200825181135.GA222283@ravnborg.org> References: <20200819152120.GA106437@ravnborg.org> <20200819174027.70b39ee9@coco.lan> <20200819173558.GA3733@ravnborg.org> <20200821155801.0b820fc6@coco.lan> <20200821155505.GA300361@ravnborg.org> <20200824180225.1a515b6a@coco.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200824180225.1a515b6a@coco.lan> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=aP3eV41m c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=e5mUnYsNAAAA:8 a=i0EeH86SAAAA:8 a=cE7MSZxB1DXlWWN6Tt4A:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=0wGE8ZiEdEHYA50Q:21 a=aLxmh6KD4dSWZl8C:21 a=lEJGdM5x6DowzKYk:21 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mauro > Before posting the big patch series again, let me send the new > version folded into a single patch. > > If you'd like to see the entire thing, I'm placing it here: > > https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/hikey970_v2/ Review 3/3 For next submission then to ease review it would be nice that the patch is spilt up a little. Maybe something like: - HW specific stuff in two patches (header fiels with register + setup code) - Display driver files - DSI driver files - build stuff (Makefile, Kconfig fragments) So all splits on file level - which should be easy to do. This will make it easier for more people to give feedback. It is a bit much to walk through 4k loc or what the full size is. And then we can also provide a-b or r-b for fragments so the reviewed parts can be ignored for later reviews. For the DSI parts I may be hit by the old "when you have a hammer then everything looks like a nail syndrome". In my case the hammer is the bridge interface. Suggestions: - Move encoder to display driver - Move connector creation to display driver (using drm_bridge_connector_init()) - Use drm_bridge interface for the DSI driver parts - Maybe use the HDMI bridge driver as a chained driver - I did not look to close on this - Use the standard bridge interface to find the bridge and drop use of the component framework I hope that some other drm people chime in here. Either to tell this is non-sense or confirm this is the way to go. The above does not give any hint how to use the gpio_mux to shift between the panel and HDMI. This logic needs to be in the display driver as the bridge driver will only be used for HDMI - as I understand the code. And I do not know how to do it. Some details in the following that are not related to the above. Sam > diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c b/drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c > new file mode 100644 > index 000000000000..a2eed961b7d5 > --- /dev/null > +++ b/drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c > @@ -0,0 +1,2126 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * DesignWare MIPI DSI Host Controller v1.02 driver > + * > + * Copyright (c) 2016 Linaro Limited. > + * Copyright (c) 2014-2016 Hisilicon Limited. > + * Copyright (c) 2014-2020, Huawei Technologies Co., Ltd > + * > + * Author: > + * > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include