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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A289CC4332F for ; Thu, 3 Nov 2022 16:26:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231367AbiKCQ0Q (ORCPT ); Thu, 3 Nov 2022 12:26:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbiKCQ0N (ORCPT ); Thu, 3 Nov 2022 12:26:13 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60727DEDC; Thu, 3 Nov 2022 09:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=LuUlqEzo0OPo2OKzfkX6TrEu4UYR2Ri7Y6DcewzJiDo=; b=vBdSLQm2ScrC/F19qfTghg8m4Z yB3h906OykABRfgw8Tx/gJkEUKwe9fIMVXnbdPplZ+fYHObjhnP0ok4TVKxGv05iZCuI0gQDH3Fen 3tV+Pw6TIQDa9EExDJCRVTWjKaHS8k+iIuNN/Q3BGHjGKGYEOuePucFze6TiLdLOkAPpubSLu6krZ 98Gp323cPmkk2iQrMt2L7REeAFO9dXIqFLuL92U18PPXrDfflJsgfblKJUbL43PAcd6L0jeTJdSzu KoheCz7X6bmokwq640ljKET1LxpDhff/pmvR92p07J+lce7v6IYHgy5pRoy8oMfQZxg9ImMD7b6no Wg7kgJZg==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqd2f-000g7r-L4; Thu, 03 Nov 2022 16:26:09 +0000 Message-ID: Date: Thu, 3 Nov 2022 09:26:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] drm: rcar_du: DRM_RCAR_DU optionally depends on RCAR_MIPI_DSI Content-Language: en-US To: Javier Martinez Canillas , Kieran Bingham , linux-kernel@vger.kernel.org Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Tomi Valkeinen , LUU HOAI References: <20221018181828.19528-1-rdunlap@infradead.org> <166747314442.3962897.9754510086268412956@Monstersaurus> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/3/22 04:53, Javier Martinez Canillas wrote: > Hello Kieran, > > On 11/3/22 11:59, Kieran Bingham wrote: >> Hi Randy, >> >> Quoting Randy Dunlap (2022-11-03 06:06:45) >>> ping. I have verified (on linux-next-20221103) that this is still needed. >>> Thanks. >>> >>> On 10/18/22 11:18, Randy Dunlap wrote: >>>> When CONFIG_DRM_RCAR_DU=y and CONFIG_DRM_RCAR_MIPI_DSI=m, 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/Kconfig >>>> --- 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=n >> >> Please forgive my ignorance, but I don't understand how this works. >> Could you explain what this is doing please? >> >> 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. >> >> 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) ? >> >> I'm guessing I'm missing something obvious :-S It's kconfig tristate symbols (y/n/m), not boolean. :) > What this Kconfig expression is saying is that it depends on DRM_RCAR_MIPI_DSI=y > if DRM_RCAR_DU=y and DRM_RCAR_MIPI_DSI=m if DRM_RCAR_DU=m. But that the it can > also be satisfied if is not set DRM_RCAR_MIPI_DSI. > > This is usually used to make sure that you don't end with a configuration where > DRM_RCAR_MIPI_DSI=y and DRM_RCAR_DU=m or DRM_RCAR_MIPI_DSI=m and DRM_RCAR_DU=y. > > Randy, I think that it's more idiomatic though to it express as following: > > depends on DRM_RCAR_MIPI_DSI || !DRM_RCAR_MIPI_DSI I count just over 200 of each idiom (but my grep strings could be too crude). I guess that you want a v2 with that change? Thanks. -- ~Randy