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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 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 9DEA8C433E4 for ; Fri, 21 Aug 2020 13:38:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 774F6207DE for ; Fri, 21 Aug 2020 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598017084; bh=Ll99DIK1T8Lkx3D20DknnJzu5dcs03ue33YMpeTIyUU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=w+3JDN56GlGuzPCTo0i+ZjUWjFERIyt9NIyABxU+6RQXVibILa3DL0AaUj3vpN5gt Bfg0wOg5+KqDulJ8lL+urnNxMJ0SVyXDhFZkYkCfcGtjN8lAX0p8RPMjG71+rt7PcY YbnVL7F90ZZxguePPEEOhj5X8t58pYyFjqQhfOjo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbgHUNiC (ORCPT ); Fri, 21 Aug 2020 09:38:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:53420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727926AbgHUNiA (ORCPT ); Fri, 21 Aug 2020 09:38:00 -0400 Received: from coco.lan (ip5f5ad5bf.dynamic.kabel-deutschland.de [95.90.213.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8FAEF2075E; Fri, 21 Aug 2020 13:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598017079; bh=Ll99DIK1T8Lkx3D20DknnJzu5dcs03ue33YMpeTIyUU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QKWBRvNeIHjsvJmXUSYSgHLegxdwzMcHXG3CQqzPDoRqSjvqfitMTxyInPncgbksc ewEiJwcez1JSi0ZzL0lO//cdc1CPnS2j38p1s53qqHd5jMu8h8BpHwH5ueESJ3Y407 MQszV343fhRhN9y+MYrw7+n6dUHclNFDknk/lK6o= Date: Fri, 21 Aug 2020 15:37:49 +0200 From: Mauro Carvalho Chehab To: Sam Ravnborg 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: <20200821153749.08afec86@coco.lan> In-Reply-To: <20200819173558.GA3733@ravnborg.org> References: <20200819152120.GA106437@ravnborg.org> <20200819174027.70b39ee9@coco.lan> <20200819173558.GA3733@ravnborg.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Sam, Em Wed, 19 Aug 2020 19:35:58 +0200 Sam Ravnborg escreveu: > > + ret =3D drm_bridge_attach(encoder, bridge, NULL, 0); =20 > The bridge should be attached with the falg that tell the bridge NOT to > create a connector. >=20 > The display driver shall created the connector. >=20 > Please see how other drivers do this (but most driver uses the old > pattern so so look for drm_bridge_attach() with the flag argument. Not sure if I got what should be done here. =46rom what I've seen at the DRM code, one of the differences between the=20 display engine for the first Hikey board (Kirin 620 based) and 960/970 is with regards to bridges. The first Hikey device doesn't use any external bridges: both panel and HDMI support are provided by the SoC. The Hikey 960 and 970 boards may either use an external bridge or not. They also have two output connectors: - The first one doesn't use an external bridge. It is used only together with an external daughter display panel board.=20 It sounds that one such panels is this one: https://www.96boards.org/blog/linksprite-hikey-aosp/ I don't have any such board. The OOT driver came with one panel display, I didn't port such driver.=20 - The second one uses an external bridge (adv7535) which is connected to the HDMI board's connector. As there's just one bridge, the driver uses this to find its OF data: struct device_node *bridge_node; bridge_node =3D of_graph_get_remote_port_parent(endpoint); dsi->bridge =3D of_drm_find_bridge(bridge_node); Basically, it doesn't call drm_bridge_add(), and doesn't declare any struct drm_bridge_funcs fops, as there's just one bridge that it is always there. - That's said, when I ported the code from Kernel 4.9, I fixed some broken things at the hotplug logic, trying to use other drivers with external bridges as examples. Yet, as you noticed, I ended using some older bridge model. =20 The only other driver I found that doesn't use drm_bridge_add() and doesn't pass 0 as flags is this one: drivers/gpu/drm/omapdrm/omap_drv.c Is it a good example? What I see different there there is that it calls drm_bridge_attach() with: ret =3D drm_bridge_attach(pipe->encoder, pipe->output->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR); Is adding this enough? Or should I do something else? Thanks, Mauro