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.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DC33AC433DF for ; Fri, 21 Aug 2020 13:38:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AD115207DE for ; Fri, 21 Aug 2020 13:38:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="QKWBRvNe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD115207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A6016EB0E; Fri, 21 Aug 2020 13:38:02 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 077CE6E14D for ; Fri, 21 Aug 2020 13:38:00 +0000 (UTC) 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 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Sam, Em Wed, 19 Aug 2020 19:35:58 +0200 Sam Ravnborg escreveu: > > + ret = drm_bridge_attach(encoder, bridge, NULL, 0); > The bridge should be attached with the falg that tell the bridge NOT to > create a connector. > > The display driver shall created the connector. > > 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. From what I've seen at the DRM code, one of the differences between the 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. 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. - 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 = of_graph_get_remote_port_parent(endpoint); dsi->bridge = 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. 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 = 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel