Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp260721pxa; Fri, 21 Aug 2020 06:41:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLiTiNe+OYLAlAWUERQDQp2KAryvidWm2f8PJqGfuQYFbcjg2zJS0+Fs2a491eY5p5mqMj X-Received: by 2002:a17:906:3e4f:: with SMTP id t15mr3122546eji.368.1598017282421; Fri, 21 Aug 2020 06:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598017282; cv=none; d=google.com; s=arc-20160816; b=De6GsWUsFjQPmfLPteHMwArbbBEJ9v2MDbTxyFxsD8E4xAf1fj1/CwhdbxSTC463JY XwWsIBXqeXTDTQ74lrpbMnVZSzQrB0Nv7UePxrGI/UIUJ+swcxxCmrDjcWHQw/onZRrM wQZ3lx9N9RLXowga8mSUW4vfb64xLTXx7XTKA0c8GnurFAvb6c690BhvZbZyYNI24uw4 Fg9t+Fi1ha1+ctuGuhRUtK1na7kKCwRaknJXHvSYI4xr8TTE6OzgNhG+wOOW3/04DqVh SUrLa0ncJTtLsTa0VYSlk6Av/XmrTfqsnMEm7R5BqHq4/S8EzGVelSF1rlWjH+XuLIUi L5ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Ig4nvwAnRQU4mEgpFXeHopbQTJsbLLHs92XhetSiClA=; b=Gb/OGglPnyEVM07JjQI6IzGyLMSbCuEmnl81fB8MDeJwcKpfG+34XUIHs7h7Jqh7K7 4kfB0FPOCkIBHsuyV77xxuQyY8wnh9qaz8B7Kmcgu/EPjKUY1bPRr7jawT/E8tUnXVcU lxsTJbXkE4fWo1c4yAYLr8oxofTFn40xw/18XieZg7aO/+1g6VQ1xAEt7+kLzsPanLRU 5F/9pNPYmtX0QHJXCRy37IJIIXQdPbj3DsKb6NOOV/V+FtznwozG2XnH4CsOzFnIifhF GNN+7fjlHREdKtTH3/UYLhYkhbi+NSo2zTaebHvXIPcaavwiHGyAbhn9Atx6XMVXH40F va4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QKWBRvNe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si1184970ejk.250.2020.08.21.06.40.59; Fri, 21 Aug 2020 06:41:22 -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=@kernel.org header.s=default header.b=QKWBRvNe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728776AbgHUNiF (ORCPT + 99 others); Fri, 21 Aug 2020 09:38:05 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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