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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 426A7C432BE for ; Tue, 10 Aug 2021 07:52:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23BF560238 for ; Tue, 10 Aug 2021 07:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237651AbhHJHxI convert rfc822-to-8bit (ORCPT ); Tue, 10 Aug 2021 03:53:08 -0400 Received: from aposti.net ([89.234.176.197]:41390 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237608AbhHJHxG (ORCPT ); Tue, 10 Aug 2021 03:53:06 -0400 Date: Tue, 10 Aug 2021 09:52:36 +0200 From: Paul Cercueil Subject: Re: [Letux-kernel] [PATCH 8/8] drm/ingenic: Attach bridge chain to encoders To: Paul Boddie Cc: "H. Nikolaus Schaller" , David Airlie , linux-mips , dri-devel , linux-kernel , Daniel Vetter , list@opendingux.net, Sam Ravnborg , Discussions about the Letux Kernel Message-Id: In-Reply-To: <2242071.3D3ZAXhqrE@jason> References: <20210808134526.119198-1-paul@crapouillou.net> <5DADB00D-1E0E-4B3A-86CE-4E98A5DC04DE@goldelico.com> <0TYKXQ.YAJ6UYG2GTXS1@crapouillou.net> <2242071.3D3ZAXhqrE@jason> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Le mar., août 10 2021 at 01:17:20 +0200, Paul Boddie a écrit : > On Monday, 9 August 2021 18:22:12 CEST Paul Cercueil wrote: >> >> Le lun., août 9 2021 at 13:14:03 +0200, H. Nikolaus Schaller > a écrit : >> > >> > quick feedback: our HDMI on top compiles fine after fixing 2 merge >> > conflicts, but dos not yet work. >> > Will need some spare time with access to the CI20 board to >> research >> > the issue, i.e. can not give feedback immediately. >> >> Alright, no problem. I'll be back home in about 2 weeks and then I >> can >> test on my CI20 as well. > > Just for reference, I looked into this initialisation failure. The > HDMI > peripheral driver gets initialised satisfactorily... > > dw-hdmi-ingenic 10180000.hdmi: Detected HDMI TX controller v1.31a > with HDCP > (DWC HDMI 3D TX PHY) > dw-hdmi-ingenic 10180000.hdmi: registered DesignWare HDMI I2C bus > driver > > But then the reported error occurs in the DRM driver: > > ingenic-drm 13050000.lcdc0: Unable to init connector > ingenic-drm: probe of 13050000.lcdc0 failed with error -22 > > This originates in a call to drm_bridge_connector_init from > ingenic_drm_bind: > > connector = drm_bridge_connector_init(drm, encoder); > > The invoked function iterates over the registered bridges, one of > which seems > to be the HDMI peripheral (it has bridge operations defined > identically to > those specified in the Synopsys driver), but the type member of the > drm_bridge > structure is set to 0 (DRM_MODE_CONNECTOR_Unknown). > > I might expect the bridge to expose a type acquired from its > connector, but I > don't see this propagation occurring in the Synopsys driver: > dw_hdmi_probe > sets the bridge operations and other members of the drm_bridge > structure, but > it doesn't set the type. > > Also, it might be possible that dw_hdmi_connector_detect (exposed as > the > detect operation) is not getting called, and this would explain why > the > bridge's connector member does not have the connector_type set, > either (since > it is also set to 0). From what I understand the last bridge in the chained list is supposed to set the connector type. The HDMI driver's probe function should get a pointer to the next bridge in the queue and attach it (see how ite-it66121.c does it). The last bridge in the queue should be "hdmi-connector" (display-connector.c) which will effectively set the connector type. Cheers, -Paul