Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1456101rwi; Thu, 3 Nov 2022 05:37:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM53n4ACeNnkOvnQq2mp6/Nz7PMK2ZLDCHAmgS3PiyipMspTUhKo6T6a4bc0dpxpBNMZKiKq X-Received: by 2002:a63:db14:0:b0:44d:e4f3:b45c with SMTP id e20-20020a63db14000000b0044de4f3b45cmr25242002pgg.267.1667479075620; Thu, 03 Nov 2022 05:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667479075; cv=none; d=google.com; s=arc-20160816; b=gugpAca47ORZ/VpfhDh2ZTzUK60EPP8hfAYSy/5e/RkNQm7pAjPhGw6qQxTiVjQDE+ FKooBaSgRjHN5R84iJERaIoBvWz2bp3GyiBcRDTP+Rh044ZWzJB53P9fb/I3FpQW/E11 abGR70mbFawnIwSkfP+0pntAtdPZFquz+xkQ+4hfx7sfmURX5gJEH5c5p6V4FWF+4Of5 CJDQVeBv9EUacaEZ1hLhshhkq8BzPUl4XXJWKHBUdQIn72unP0dgwKHRIDUY4FwjlQKP av93rBZqfhZqHj92yzVA+60C+iStosnTPvqEr3asDk8168cBu5eGgIqlEhEOmEUCOC5o v9Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=IlQ2J+gcsQ5DR2efmW7WLTd9l6RHqx0HidylUapfKBg=; b=thaxkFsLmm5qSPRDw0ef2Yp6LM5yKfHFq+zv8rgwJ/JI1yxfdLdHd4MeHv9ND5QcUR AkGpfqAMamYEG6FGFeXBAmTi7NDdjOSuPUlp/+buwgRIg1tVL3azrfjIBYIK546YWimL s3gHAOtf8PSHNWeNpFfloNb8Rvl4e1mdWMpptWtLeuaaOyPmCsUhn9MfIvfmQbDNLF6/ //bjJM8sgnJU94c7MWSn7iQlvnOIWVJYQtMTHFt23sFBo5uGRysZkZFZc0KQ7Pn2lqWb U6XnxuHR96BbGYvFTIKkPZgWC+BJXdCdxcTAE+qZw3weN3yc05ATlthILdxNFj1L4cFo iJYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sgJkqbNm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a170902821500b0016cca53817dsi534866pln.341.2022.11.03.05.37.38; Thu, 03 Nov 2022 05:37:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sgJkqbNm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbiKCL72 (ORCPT + 97 others); Thu, 3 Nov 2022 07:59:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbiKCL7W (ORCPT ); Thu, 3 Nov 2022 07:59:22 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC5BB6396; Thu, 3 Nov 2022 04:59:21 -0700 (PDT) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 14B53589; Thu, 3 Nov 2022 12:59:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1667476760; bh=yDrB2VkpU4kyJipoxlFvlid4/amRaP6+HLz0Wmutlsk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=sgJkqbNmNR1i4K+9exxotK4hqHTTSHuTYuKR+n4osjEJUkNIEuZ5PujiOYlCOH8Lh vU2v8gP7Fy/Ttj6dUsiBqUpDH00W3rJRTHPnMYJ57X6xUBk+y1RfgkJGleel9P8YmQ M+D2xMt3poQgbI2hYlNq1Qk6p2cWE508xwOw+P3g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20221018181828.19528-1-rdunlap@infradead.org> <166747314442.3962897.9754510086268412956@Monstersaurus> Subject: Re: [PATCH] drm: rcar_du: DRM_RCAR_DU optionally depends on RCAR_MIPI_DSI From: Kieran Bingham Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Tomi Valkeinen , LUU HOAI To: Javier Martinez Canillas , Randy Dunlap , linux-kernel@vger.kernel.org Date: Thu, 03 Nov 2022 11:59:17 +0000 Message-ID: <166747675705.15935.18102645792749937940@Monstersaurus> User-Agent: alot/0.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Javier Martinez Canillas (2022-11-03 11:53:14) > Hello Kieran, >=20 > On 11/3/22 11:59, Kieran Bingham wrote: > > Hi Randy, > >=20 > > Quoting Randy Dunlap (2022-11-03 06:06:45) > >> ping. I have verified (on linux-next-20221103) that this is still need= ed. > >> Thanks. > >> > >> On 10/18/22 11:18, Randy Dunlap wrote: > >>> When CONFIG_DRM_RCAR_DU=3Dy and CONFIG_DRM_RCAR_MIPI_DSI=3Dm, calls > >>> from the builtin driver to the mipi driver fail due to linker > >>> errors. > >>> Since the RCAR_MIPI_DSI driver is not always required, fix the > >>> build error by making DRM_RCAR_DU optionally depend on the > >>> RCAR_MIPI_DSI Kconfig symbol. This prevents the problematic > >>> kconfig combination without requiring that RCAR_MIPI_DSI always > >>> be enabled. > >>> > >>> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function= `rcar_du_crtc_atomic_enable': > >>> rcar_du_crtc.c:(.text+0x3a18): undefined reference to `rcar_mipi_dsi_= pclk_enable' > >>> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function= `rcar_du_crtc_atomic_disable': > >>> rcar_du_crtc.c:(.text+0x47cc): undefined reference to `rcar_mipi_dsi_= pclk_disable' > >>> > >>> Fixes: 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence= ") > >>> Signed-off-by: Randy Dunlap > >>> Cc: Tomi Valkeinen > >>> Cc: Laurent Pinchart > >>> Cc: Kieran Bingham > >>> Cc: LUU HOAI > >>> Cc: dri-devel@lists.freedesktop.org > >>> Cc: linux-renesas-soc@vger.kernel.org > >>> Cc: David Airlie > >>> Cc: Daniel Vetter > >>> --- > >>> drivers/gpu/drm/rcar-du/Kconfig | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff -- a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/K= config > >>> --- a/drivers/gpu/drm/rcar-du/Kconfig > >>> +++ b/drivers/gpu/drm/rcar-du/Kconfig > >>> @@ -4,6 +4,7 @@ config DRM_RCAR_DU > >>> depends on DRM && OF > >>> depends on ARM || ARM64 > >>> depends on ARCH_RENESAS || COMPILE_TEST > >>> + depends on DRM_RCAR_MIPI_DSI || DRM_RCAR_MIPI_DSI=3Dn > >=20 > > Please forgive my ignorance, but I don't understand how this works. > > Could you explain what this is doing please? > >=20 > > I know you've explained above that it fixes it to optionally depend on > > DRM_RCAR_MIPI_DSI ... but it's not making sense to me. > >=20 > > To me - this is saying we depend on DRM_RCAR_MIPI_DSI being enabled, or > > not being enabled ... ? Which is like saying if (0 || 1) ? > >=20 > > I'm guessing I'm missing something obvious :-S > > >=20 > What this Kconfig expression is saying is that it depends on DRM_RCAR_MIP= I_DSI=3Dy > if DRM_RCAR_DU=3Dy and DRM_RCAR_MIPI_DSI=3Dm if DRM_RCAR_DU=3Dm. But that= the it can > also be satisfied if is not set DRM_RCAR_MIPI_DSI. >=20 > This is usually used to make sure that you don't end with a configuration= where > DRM_RCAR_MIPI_DSI=3Dy and DRM_RCAR_DU=3Dm or DRM_RCAR_MIPI_DSI=3Dm and DR= M_RCAR_DU=3Dy. >=20 > Randy, I think that it's more idiomatic though to it express as following: >=20 > depends on DRM_RCAR_MIPI_DSI || !DRM_RCAR_MIPI_DSI Ok - thanks, so it's the module part that breaks. I never build modules, always builtin - so it doesn't hit me ;-) Anyway - it certainly makes sense now I think so either as posted, or with the idiomatic proposal from Javier: Reviewed-by: Kieran Bingham >=20 > --=20 > Best regards, >=20 > Javier Martinez Canillas > Core Platforms > Red Hat >