Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4827786pxb; Tue, 28 Sep 2021 05:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM/F2KIv/Qk1cJ7lXYSu3c9wJQxF/9lEO5CsNj1vUCuYxAUylotKKIJVptF6FHVt8h6wYl X-Received: by 2002:adf:f4ca:: with SMTP id h10mr6033787wrp.159.1632830957502; Tue, 28 Sep 2021 05:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632830957; cv=none; d=google.com; s=arc-20160816; b=J96npo45ZvXWAfOp6+zZMgnAbH96d/JaAOyyAxFv4N4fzJicqYJ9c4XthpXGzvb5/M aoyhUf0S1tsGd5F/Xwvw9JuNDw9wpA+qQWCSOaevZZYrM3pTAJsYuUABpBTgXlL/4hh5 47pXyXHMZ9LwH5fTfLT7Mr1bUBq27hTvJ/azqQl1FEMKOuSXjv0ZQRpjHzwwzssXKsNm DDYEJWKYTNhslMH/mAH2LGw3fTRVuYFCllLBiRTAEGvk0shXzpnXXtIh4FKsPRN0yvP/ 6nGJbc3q51uD2kq4e8mSUB5i5KneccEybUtGEp3LHTfemIA2Ac+WuJZPkk3+mwd8jJDA Rz+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=vdPsCXL7ckfb1HsCHTQXiYKUfYKnUrT8UdPfYAXb6HI=; b=xLOBA6VyTJnAKmdXmEv5vFBhpfESG5YFZbxZJt8YNpj2zKY8f95h3FOoF7MIz1kp5B Y9VvErn9OxIdq0rrp1pXaXHxhJvSUxg4jvEXuTZieVaL5gHmSEvTVBs+FY6AfTgNB15W INt27IiGFsO7BgFOSYG7xk0N8r1EfxMVRX7L+c/cUdKXmtpFAhmCZA6suZ5SlWLsyEE4 TM7UUF2oxAtl+0lg5UN+Vkfz3cwViPUFTMEOWSxfKtSBVzgHW5aUin0hlTKbtxvvVXbl NU8K/ahz0+QxBHUkE7vSaVohdLHtwt3oBzxFZeXvr8MOCDFogP4iizEat0yCDibBV+ei 0tVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=PecPCprG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si17345350edm.184.2021.09.28.05.08.51; Tue, 28 Sep 2021 05:09:17 -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=@goldelico.com header.s=strato-dkim-0002 header.b=PecPCprG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240515AbhI1MIC (ORCPT + 99 others); Tue, 28 Sep 2021 08:08:02 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.171]:18770 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240410AbhI1MH7 (ORCPT ); Tue, 28 Sep 2021 08:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1632830764; 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=vdPsCXL7ckfb1HsCHTQXiYKUfYKnUrT8UdPfYAXb6HI=; b=PecPCprGmA31TW9uM8RdMQk6R952x/CXQluQMLLJnGfEVqyiFaFhZkF0IPSN1ucnVe wq9M/+hTl/WnbMvBcDiJVmuahgBSyyd4qTHbCeHWDI3QiK56tS/CZ5CV33SZdAlJ6/31 TX+pdl2o71dpKuowixZH+d0aU3sbrlA8Ftl+9DX+U2mKZ8Ax9J51tAuUSl7ELLUZG8cr 5W2bJhsXGcrQaLSRHxCOzb8ggq2/IzsFtu1hQhwamr7oqvYvUCpVEUaggbiykWXb2MOp i2s9S8gCf2vWAwyKBNhzSRJG5VM/a7oao+iMnCWQNvl7rKSHS08wrmmujOmLRLO7cbSU TDcQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHWElw43sT7Q=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.33.8 DYNA|AUTH) with ESMTPSA id I01f74x8SC63eDy (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); Tue, 28 Sep 2021 14:06: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: <1E10A04A-4A78-4B47-B0FB-1E8C99456DA1@goldelico.com> Date: Tue, 28 Sep 2021 14:06:03 +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: <17BF1D7A-2057-448B-9FD2-907DE0EFD281@goldelico.com> References: <68cca888be1894ce45f1a93cfabeb5aa1f88c20a.1632761067.git.hns@goldelico.com> <1E10A04A-4A78-4B47-B0FB-1E8C99456DA1@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 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. A quick test shows that it *is* required. At least if I configure = everything as modules. But like you I can't explain why. 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. BR, Nikolaus