Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1879266rwi; Thu, 3 Nov 2022 10:03:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5kSkvH1SYMqYaBUsqmN39TwsP0vL8nijCQ9gfg+LSdrply4lJvVuKwtcabgV0wYZPGCgYU X-Received: by 2002:a17:906:fc6:b0:72f:d080:416 with SMTP id c6-20020a1709060fc600b0072fd0800416mr29681235ejk.1.1667495032227; Thu, 03 Nov 2022 10:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667495032; cv=none; d=google.com; s=arc-20160816; b=upiBFxpJ6NGRbAU7+RM1eXp9s2uwWNC76iuYczikOoYKsZ69G07LWokJrmNntqynbn gYLy6pf6qR/MA/XMw1xNzbf30thVJ8YfuFyrbNEchD1KXbvgXqvuHrvHTG/KDc1yDAqX tAsknQ0OB5GUM3RFiIkq4GY4ylu5R5aMzttx+lFS5I+rwai2bUAdj7LYNPwWSiRn7/Nh jp15yMsGSG3NgznJIg/EHBjUsvAmYKI2i2aFwQN8QwnEvXPYJ1mYIYgE7sz7NcckZ+qt 4wPBYZYa4+c+teV/FxJk8ClqcVvOSV7wyMWMbS6ohTjsqnsGZGD68lAXygg3NJI3Tu/M dk2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=LuUlqEzo0OPo2OKzfkX6TrEu4UYR2Ri7Y6DcewzJiDo=; b=oe7Ix2aIkP4RdzkeXRZgD2IX+HJuvKXzcF6x8N+nfSxmQiU4ZyZ9HhAnssT84EsJk1 YRQPslulNbJG+7Niff6lbx6hpP4cXsS0FJz1rrtqqfI72DTAEWQZse+eViWcQGDw7qss P33t/7cuW0bdRNR6osA5MTHwU46pDa59XeKpvOA3isY+Q4chdt2AE/dBavINMWDfP4B/ gsnwiDPAqJ5u3fjZVmD5UToDPo/7FFc4RWk38+cDaH9HGjw62QbTNYycNbW0W46by4d/ eJs49rnd5WhBILU65/wajGrsRL6IySt6/BHP9HpC8u0gxou6pSqYWiQ252lBEvZNiL4c 5GLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vBdSLQm2; 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 i23-20020aa7dd17000000b0045eec876883si1616289edv.229.2022.11.03.10.03.23; Thu, 03 Nov 2022 10:03:52 -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 header.i=@infradead.org header.s=bombadil.20210309 header.b=vBdSLQm2; 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 S231354AbiKCQ0P (ORCPT + 97 others); Thu, 3 Nov 2022 12:26:15 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 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