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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9312BC433EF for ; Wed, 29 Sep 2021 13:25:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A8AC6141B for ; Wed, 29 Sep 2021 13:25:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344173AbhI2N1T (ORCPT ); Wed, 29 Sep 2021 09:27:19 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.83]:20489 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242801AbhI2N1K (ORCPT ); Wed, 29 Sep 2021 09:27:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1632921905; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=iXnkGBjUJ/lD8Seg+3/qoiXxZlA8cp27UXC2S8pwhhE=; b=LKr/APoVDaPodsHvLUwFwZdabISWBDYx7ojmMJKUlP3z+sgzhD748oTXc2WmfcIoiZ 1szZPCEho16UYScbl2z+dDlVLQwqXiro/m9UeJtTKzO6e5vuakfdM2oPGCf1rh36vCwk AoaYxSczLNmY5pj7K/B+m3lu2zaPLzL2ffYVRMAgE+LyvIDthiTtzCLvSD4hpIQJS7cp npEX43lPiBRxLMr2D5WE80Tz2lsDwbaIplqLcFXRMG7wprx0EJmg5X4zaC72omlf/sRX HQQSBtm844e+cumiuLExMB7MAD07ZvNcdTKDg6CXAjjMGAsXDPXwyX9iJ+TQfNV9AdXG BheQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHWElw43qmio=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.33.8 DYNA|AUTH) with ESMTPSA id I01f74x8TDP3k6X (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 29 Sep 2021 15:25:03 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v4 02/10] drm/ingenic: Add support for JZ4780 and HDMI output From: "H. Nikolaus Schaller" In-Reply-To: <17BF1D7A-2057-448B-9FD2-907DE0EFD281@goldelico.com> Date: Wed, 29 Sep 2021 15:25:02 +0200 Cc: Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Ezequiel Garcia , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org Content-Transfer-Encoding: quoted-printable Message-Id: <3D436929-570A-43FA-A388-27A183ECF703@goldelico.com> References: <68cca888be1894ce45f1a93cfabeb5aa1f88c20a.1632761067.git.hns@goldelico.com> <1E10A04A-4A78-4B47-B0FB-1E8C99456DA1@goldelico.com> <17BF1D7A-2057-448B-9FD2-907DE0EFD281@goldelico.com> To: Paul Cercueil X-Mailer: Apple Mail (2.3445.104.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, > Am 28.09.2021 um 14:06 schrieb H. Nikolaus Schaller = : >=20 > Hi Paul, >=20 >> Am 28.09.2021 um 12:21 schrieb H. Nikolaus Schaller = : >>=20 >>>> @@ -1492,10 +1555,16 @@ static int ingenic_drm_init(void) >>>> { >>>> int err; >>>> + if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI)) { >>>> + err =3D = platform_driver_register(ingenic_dw_hdmi_driver_ptr); >>>> + if (err) >>>> + return err; >>>> + } >>>=20 >>> I don't see why you need to register the ingenic-dw-hdmi driver = here. Just register it in the ingenic-dw-hdmi driver. >>=20 >> Ok, I never though about this (as the code was not from me). We = apparently just followed the IPU code pattern (learning by example). >>=20 >> It indeed looks not necessary and would also avoid the = ingenic_dw_hdmi_driver_ptr dependency. >>=20 >> But: what is ingenic_ipu_driver_ptr then good for? >>=20 >> If we can get rid of this as well, we can drop patch 1/10 = ("drm/ingenic: Fix drm_init error path if IPU was registered") = completely. >=20 > A quick test shows that it *is* required. At least if I configure = everything as modules. > But like you I can't explain why. >=20 > Well, just a very rough idea (may be wrong): the bridge chain is not = like an i2c bus and > clients are not automatically loaded/probed if linked in the device = tree. Therefore the > consumer (ingenic_drm_drv) must register the "clients" like IPU and = HDMI. Any suggestion how to proceed here for v5? BR, Nikolaus