Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3441919pxt; Tue, 10 Aug 2021 03:50:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzp1w+t02qVErYywdSfitwx1eCZa/sqmN+kznnB0WK4oStqPcDCOQkUOGme1MNLo6l0CFU X-Received: by 2002:a02:384c:: with SMTP id v12mr19878520jae.3.1628592612936; Tue, 10 Aug 2021 03:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628592612; cv=none; d=google.com; s=arc-20160816; b=RIBvsIY00Jb8mDzeApoSdxDuXN8lDhoTeAitGk4Qv6SPzaEBxod3UND+K5jP/Db/P+ 7VDj7NJq4FLxwVMIkBGcyC0MndAvhddSQk0KMA3a7brHChiHuT+QFswyI9SD2a4CQ2JP 6EwdOtEwwXiMtG7he85kHIVyM7F8ycrf8OU4Z70OMAWYnhTeGKdVpAx0S0cw/9D43JVQ GewozxlM1ejtueMwI69/Kqdb4s4DqipQikz4CGYMjAqf+juf/eKWhnQtU/VDzv70OIX+ tcsuzy68acnQe4BH+SsTw0eJb2b3jO++na0/TIBCkXAkoLxe0rQQ0KnqKL409VvP8G/O vwow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=weVeG9JpWKGaejOerHMnQ6GylYAZxfyfh+IdoLVRVhU=; b=yHsQKfLF4U2MCeFhgftCujX2Yj1GHsxd9BfIi35a6/y+qpGU4Pneaqor36+u/Jzsaj Rg97pOoDrH39iiI4RykFgKiZmhbgQraOoQmObDHc9JwHtWgnxVhFGnXVxssm2v0c/B/c V6/K6h4dvIFO8dGobHKm354WazeR24eHhwR2nQGspqUrEmuysGsYz9qvp+YfvPCRBJFB UKeoi7zleBnrnP8IphgWixbWrqU8hv6Uh5hY4u6ibtlIV2fmiUCXzbI8ruZTwqi3JioV x+CL7NP7YJ8MOwj73dSbCU+ZR7yfh/4CvJ1wsFJojpXWjYFhaF2ClmSyl0CsMwryfJvY b+cQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si19805834ilj.25.2021.08.10.03.49.59; Tue, 10 Aug 2021 03:50:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237643AbhHJHxH convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 Aug 2021 03:53:07 -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