From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2527C433E3 for ; Tue, 25 Aug 2020 18:13:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EFE42083B for ; Tue, 25 Aug 2020 18:13:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d+uxw7Hd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EFE42083B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tdleox4x6U5L1dDmBhAu4pPrpYOyCnzyIo8GCZWQTDQ=; b=d+uxw7Hd6XAsPUn4aVna2WjBX V+UyiMPTQMxY0c7QioUiiH+F0qUWyfdCMudJFhYlCFpF9dXDQ4W9V9MR3/4EnDMH7CK4ETaeZ2f1O zfG936az36kRgLPHdvfRQHT1qksVG/56qBcNQj9KI103M07p9Zg8LZG+SplNCFnqURgvHEHKHmwVc GR8SRvuDaco3aUNkc18EGhDIUUemG7CqmmC0V86fSVKPJN+hLvqdDE+eP47geZMO6cpcTcaaaMruX +TSY8U9usYb1e2DfmpUr2cslR8Wjxo5tZT2jth4tbcIxbMnl88rGooe+PuNiN/Ewf8KAX+SwVASYN ytbysL21w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAdQK-0005zm-7C; Tue, 25 Aug 2020 18:11:56 +0000 Received: from asavdk4.altibox.net ([109.247.116.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAdQD-0005yb-Os for linux-arm-kernel@lists.infradead.org; Tue, 25 Aug 2020 18:11:53 +0000 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 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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200825_141150_474546_CCE5C34C X-CRM114-Status: GOOD ( 39.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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 , Jakub Kicinski , 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 , mauro.chehab@huawei.com, Rob Clark , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Liuyao An , netdev@vger.kernel.org, Rongrong Zou , bpf@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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