Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp751429ybz; Wed, 15 Apr 2020 18:10:00 -0700 (PDT) X-Google-Smtp-Source: APiQypI8KJZk4JLjvmSqZ+VRUKVQN3VnIwprrjwWpsqIIulU4IY/HQ1lTQl9tq73otzpbRoPJbdo X-Received: by 2002:aa7:d685:: with SMTP id d5mr16001084edr.340.1586999400539; Wed, 15 Apr 2020 18:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999400; cv=none; d=google.com; s=arc-20160816; b=thTR4ln7HFoR1fNyDSPJEnbuyQ7LfSGD9wzEz+1j4u66642QbZyCqPpqs2ArphMQds tXX84XjQ/T9qukjbHiXcjvYE7DHrllCRgKJlx4Q3X8Z0DUaTfQEeA0yTjeHMDbwLeWBb YvSYU8/FYx0YDd3FzRXZDcryxZzDtc/Zd4WuUUjdKnDkj0qmoEZruxe207UyPORUSwDC 9il05kIQniRba3HeeTgm2phbzIIyE6EdoUv9vC5qzPSyRqH8dRZJ8RQ3aP30Ir4TH42h Qgcr4GCUtXIuDZGLjepUFHYFYczJ4kbj3nlMHqkWuG2NPVU80Phb0mlnk1+Nc12Bki3m XIfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9qJOvBqPG2UZB1XAS11hZ9a/DsPos7c1iHxB9UCU/co=; b=EKHR1oNRDBhi4F9C9cSUGuQRNcJIDO9IwwKJ3JP8lyllmn7OeLpSlXgOp/yhpVemr9 PeZUoPUxQRzdd8Jn3Ir2Af8/PvNf0nl5BtjWiDSVs1YpUZEcs5AAsUL3AgmTcIaLAmdJ 7I7FpbFkUfIUnCx2v5DxcGWYsmRAyDV14ybhKd1PRHm/WxvFpEPq6mPRW+O7N6fYv+s0 FWT7rMJV+imxIcU9qIidZ7J0Yg2rngoLWU5NH5YFTJZ3bc1/v6T3WmTWtWLrnrgGOxxw eJ4lGj3aZeQ8cSnWCQSAkWkt2NKvj2uoVLB2Cd/Vvs1x0D3LFI0RugPyYIT4NtUveOaa jEng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Asq687MH; 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 a6si5723565edv.395.2020.04.15.18.09.35; Wed, 15 Apr 2020 18:10:00 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=Asq687MH; 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 S371396AbgDOVMm (ORCPT + 99 others); Wed, 15 Apr 2020 17:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S371372AbgDOVMh (ORCPT ); Wed, 15 Apr 2020 17:12:37 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D58C061A0C; Wed, 15 Apr 2020 14:12:37 -0700 (PDT) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 498802D1; Wed, 15 Apr 2020 23:12:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586985152; bh=6ZsvRs7bRQKm2uUaVr3nSLa1kHFG0xzNrbDdN57gCCQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Asq687MHzIHKq43berIYmZ59aeoEo+vMV3L0Kmj60d9CPYdYFrSOTpzamKOx7ty4P RovcFHD6tSHE6LH/oKFii6xcTJvMhpSzgSQSO/AwUu9TmSH0HB8/5jwj5kQHQpGG3I HaqY0Wr/aUbcwlF7mJE34yCw4xZy4KOu4ykEJTyI= Date: Thu, 16 Apr 2020 00:12:20 +0300 From: Laurent Pinchart To: Arnd Bergmann Cc: Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Masahiro Yamada , Nicolas Pitre , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Kieran Bingham , "David S. Miller" , Saeed Mahameed , Leon Romanovsky , dri-devel , Linux-Renesas , Networking , linux-rdma Subject: Re: [RFC 5/6] drm/rcar-du: fix selection of CMM driver Message-ID: <20200415211220.GQ4758@pendragon.ideasonboard.com> References: <20200408202711.1198966-1-arnd@arndb.de> <20200408202711.1198966-6-arnd@arndb.de> <20200414201739.GJ19819@pendragon.ideasonboard.com> <20200414205158.GM19819@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Wed, Apr 15, 2020 at 09:07:14PM +0200, Arnd Bergmann wrote: > On Wed, Apr 15, 2020 at 5:18 PM Arnd Bergmann wrote: > > On Wed, Apr 15, 2020 at 4:13 PM Geert Uytterhoeven wrote: > > > On Wed, Apr 15, 2020 at 3:47 PM Arnd Bergmann wrote: > > > > On Tue, Apr 14, 2020 at 10:52 PM Laurent Pinchart wrote: > > > > > Doesn't "imply" mean it gets selected by default but can be manually > > > > > disabled ? > > > > > > > > That may be what it means now (I still don't understand how it's defined > > > > as of v5.7-rc1), but traditionally it was more like a 'select if all > > > > dependencies are met'. > > > > > > That's still what it is supposed to mean right now ;-) > > > Except that now it should correctly handle the modular case, too. > > > > Then there is a bug. If I run 'make menuconfig' now on a mainline kernel > > and enable CONFIG_DRM_RCAR_DU, I can set > > DRM_RCAR_CMM and DRM_RCAR_LVDS to 'y', 'n' or 'm' regardless > > of whether CONFIG_DRM_RCAR_DU is 'm' or 'y'. The 'implies' > > statement seems to be ignored entirely, except as reverse 'default' > > setting. > > Here is another version that should do what we want and is only > half-ugly. I can send that as a proper patch if it passes my testing > and nobody hates it too much. This may be a stupid question, but doesn't this really call for fixing Kconfig ? This seems to be such a common pattern that requiring constructs similar to the ones below will be a never-ending chase of offenders. > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig > index 0919f1f159a4..d2fcec807dfa 100644 > --- a/drivers/gpu/drm/rcar-du/Kconfig > +++ b/drivers/gpu/drm/rcar-du/Kconfig > @@ -4,8 +4,6 @@ config DRM_RCAR_DU > depends on DRM && OF > depends on ARM || ARM64 > depends on ARCH_RENESAS || COMPILE_TEST > - imply DRM_RCAR_CMM > - imply DRM_RCAR_LVDS > select DRM_KMS_HELPER > select DRM_KMS_CMA_HELPER > select DRM_GEM_CMA_HELPER > @@ -14,13 +12,17 @@ config DRM_RCAR_DU > Choose this option if you have an R-Car chipset. > If M is selected the module will be called rcar-du-drm. > > -config DRM_RCAR_CMM > - tristate "R-Car DU Color Management Module (CMM) Support" > - depends on DRM && OF > +config DRM_RCAR_USE_CMM > + bool "R-Car DU Color Management Module (CMM) Support" > depends on DRM_RCAR_DU > + default DRM_RCAR_DU > help > Enable support for R-Car Color Management Module (CMM). > > +config DRM_RCAR_CMM > + def_tristate DRM_RCAR_DU > + depends on DRM_RCAR_USE_CMM > + > config DRM_RCAR_DW_HDMI > tristate "R-Car DU Gen3 HDMI Encoder Support" > depends on DRM && OF > @@ -28,15 +30,20 @@ config DRM_RCAR_DW_HDMI > help > Enable support for R-Car Gen3 internal HDMI encoder. > > -config DRM_RCAR_LVDS > - tristate "R-Car DU LVDS Encoder Support" > - depends on DRM && DRM_BRIDGE && OF > +config DRM_RCAR_USE_LVDS > + bool "R-Car DU LVDS Encoder Support" > + depends on DRM_BRIDGE && OF > + default DRM_RCAR_DU > select DRM_PANEL > select OF_FLATTREE > select OF_OVERLAY > help > Enable support for the R-Car Display Unit embedded LVDS encoders. > > +config DRM_RCAR_LVDS > + def_tristate DRM_RCAR_DU > + depends on DRM_RCAR_USE_LVDS > + > config DRM_RCAR_VSP > bool "R-Car DU VSP Compositor Support" if ARM > default y if ARM64 -- Regards, Laurent Pinchart