Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp818653pxb; Wed, 29 Sep 2021 10:16:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6CeA/g1TJMTIfp8fXIPk3012PFYfaOr/g4xAW0kTtwV8dzu7JA6R+MXo9a6EbAf+n0YaW X-Received: by 2002:a62:750e:0:b0:44b:bd38:52cb with SMTP id q14-20020a62750e000000b0044bbd3852cbmr811603pfc.57.1632935781301; Wed, 29 Sep 2021 10:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632935781; cv=none; d=google.com; s=arc-20160816; b=QPQW7LZjR5UPk+mgCEM5fo3iNGvEJOt2R9PKTrvt//8nWIvsEQfGp2Do032feowS2M zcKk0glOZMg8Ek9iTwwd438wCWQuTl4r2BLTbgwwF1FDkoJ/rMOWxQ7jIFxzZR8c13vM esLUcyHUuDqqUGplLcVVHBjkMwCYMw4kth+xPp+gYS6bnw+1oXxgXVjcL/n5wNzJxjFD yJr3mbQgGtn751fbSUfuQMRg+p8fgucPXVqaxgSK+1aEeFtiv6J9ym6Gu2XQGFofFhLW p1GA7eqvJ5eirSLx8xrQXMrUajIZRFuxEYpU2XXWAY/I4CBBmvHnOKMAuTVXAjwaCFN5 XPIQ== 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=kPb1XAUujTirff8NuwQdqau5AGawOLNbzJCx314J3RQ=; b=ekxvmITiQhHNevoQJiSFjjbN9bc0YjCLslFVxabFNOn6B8plLvxk/JspXqWw38YloC BsV3ll0UVLyvGbTrZTak86Uc2XeMuF1CqmyQl/d7+eOEvf/he0IA7MoVeFIsa/++iWdG 8UNK1RsG478WsP0L6I35UtOMIXmq9FEUnb1JLScMdl7/q4J5SBJK34BWLov79Q9dgaiV 7lSfOiPLSgGnGMAQvTB2uAvugoVw7k9OaT7vTFZZm9R0qM1XpRzsQGvTwoZ+K3RPzNXo H5Uq0kUkYR+rOmKtu8Uz1PjQs3S1O89qED06KN3a106fzpcCFbvyugGbr9vlZ1J+X6I2 xiJQ== 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 p23si568124plq.104.2021.09.29.10.16.08; Wed, 29 Sep 2021 10:16:21 -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 S245552AbhI2Oce convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Sep 2021 10:32:34 -0400 Received: from aposti.net ([89.234.176.197]:43458 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245167AbhI2Oce (ORCPT ); Wed, 29 Sep 2021 10:32:34 -0400 Date: Wed, 29 Sep 2021 15:30:31 +0100 From: Paul Cercueil Subject: Re: [PATCH v4 02/10] drm/ingenic: Add support for JZ4780 and HDMI output To: "H. Nikolaus Schaller" 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 Message-Id: In-Reply-To: <17BF1D7A-2057-448B-9FD2-907DE0EFD281@goldelico.com> References: <68cca888be1894ce45f1a93cfabeb5aa1f88c20a.1632761067.git.hns@goldelico.com> <1E10A04A-4A78-4B47-B0FB-1E8C99456DA1@goldelico.com> <17BF1D7A-2057-448B-9FD2-907DE0EFD281@goldelico.com> 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, Le mar., sept. 28 2021 at 14:06:03 +0200, H. Nikolaus Schaller a ?crit : > Hi Paul, > >> Am 28.09.2021 um 12:21 schrieb H. Nikolaus Schaller >> : >> >>>> @@ -1492,10 +1555,16 @@ static int ingenic_drm_init(void) >>>> { >>>> int err; >>>> + if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI)) { >>>> + err = platform_driver_register(ingenic_dw_hdmi_driver_ptr); >>>> + if (err) >>>> + return err; >>>> + } >>> >>> I don't see why you need to register the ingenic-dw-hdmi driver >>> here. Just register it in the ingenic-dw-hdmi driver. >> >> Ok, I never though about this (as the code was not from me). We >> apparently just followed the IPU code pattern (learning by example). >> >> It indeed looks not necessary and would also avoid the >> ingenic_dw_hdmi_driver_ptr dependency. >> >> But: what is ingenic_ipu_driver_ptr then good for? >> It's done this way because ingenic-drm-drv.c and ingenic-ipu.c are both compiled within the same module ingenic-drm. I'm not sure this is still required, maybe ingenic-ipu.c can be its own module now. >> >> 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, a quick test here shows that it is not required, at least when configuring with everything built-in. -Paul > 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 >