Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp743754ybz; Wed, 15 Apr 2020 18:01:10 -0700 (PDT) X-Google-Smtp-Source: APiQypIgov1Ml1g8oh2LqThpKNJdDTLB0I2dNV0BiEi+GgVXatyhEBkZlJPmuDm4rn0hIAeChFcd X-Received: by 2002:a05:6402:21d7:: with SMTP id bi23mr26890295edb.176.1586998870469; Wed, 15 Apr 2020 18:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586998870; cv=none; d=google.com; s=arc-20160816; b=nqBOWOMMsMeenFY8dGTO0U7e8EcqLiP7h2mXq50GJ4qDA2iYAE7BpkU8LW2UuKFIwV 6X5tEi0PEMSeQey/CgjYNMygxT3VTRNHZV+9mhim8XyTaCgWAkpMRxwB7brW9uARZSui FplEBcs7HdQ63ZPUiCLDtwQV0nTYKQWF5ZAYINy2aC7yDLWr0reJL7fzrBoMmDEfcENZ htNr9iEENDX8BGfB0pr+TTwKKyCH5AQE36pNPVSvdkufi6aGbdZpGKNzu5PbdfbGZ9S+ r080ut4vsp94G1N1nSDNODJnqC+RFxY9GhhGxMhtm3oZmucZnwtoliqoVobWyOtkPs3i st7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=xp+F1vqAcgcC5X6UFDP8GBEjrhVj4rDaf4X/MjuETTA=; b=mlHjbHgPHZXSDG+Swxw/qcYlmiF43e48JZtB/vjhVT/0OM9rBGsmONWWRShvuCUtQA 4MlxBbZy8qpkZDWHMc5puXUZKIljlabbjYwtvH5scq3BKlc9bI8jcxFtmfl9kVp8ZfxH P3wcjCkcCtCd4ppvHT3Z22meF4szkThtcZhXAQ4p0tkmeRyFeUZi8gqPZ+Ih7VGsvRoJ 14nmC7KosUgAsQdxW3lTaVsRD61CgMN4V9z3jmBJmBkPe7lDvX/yZMMsHtRP4ShUj6f9 kMu46sHx0vndVtKWJUqfzOYPFRF656MwwR5UoMd0WsBVlQ9NGClfU8PDK7C8ccnZsNyk MNRQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si12325395edq.453.2020.04.15.18.00.47; Wed, 15 Apr 2020 18:01:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441773AbgDOTQz (ORCPT + 99 others); Wed, 15 Apr 2020 15:16:55 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:40171 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440357AbgDOTHg (ORCPT ); Wed, 15 Apr 2020 15:07:36 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1M9nlN-1jJ0U50zTR-005qez; Wed, 15 Apr 2020 21:07:32 +0200 Received: by mail-qv1-f52.google.com with SMTP id v38so694771qvf.6; Wed, 15 Apr 2020 12:07:31 -0700 (PDT) X-Gm-Message-State: AGi0PuYqovIjqXz2qd1he3wjA1+p9EOIVHRC83vREbjlypu5Eij56d+6 aukOuawtA0X3gF5w3edRrX0Hr6K5E3UxaRccKh8= X-Received: by 2002:a0c:9e2f:: with SMTP id p47mr6000391qve.211.1586977650774; Wed, 15 Apr 2020 12:07:30 -0700 (PDT) MIME-Version: 1.0 References: <20200408202711.1198966-1-arnd@arndb.de> <20200408202711.1198966-6-arnd@arndb.de> <20200414201739.GJ19819@pendragon.ideasonboard.com> <20200414205158.GM19819@pendragon.ideasonboard.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 15 Apr 2020 21:07:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 5/6] drm/rcar-du: fix selection of CMM driver To: Geert Uytterhoeven Cc: Laurent Pinchart , "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 Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:4b8EYsOhlpxPK7pigxEr6ENytFkJTUlOn65DgSqaoGVE4mhFOVD QcxKAXWkIC/EjC2fjH2zFctAHyK6mjXQANuW5qhqhnOrB39r8JJVSe68xBi7ZSFf2mjAGxs VV9iaKU3flgC991QNdyH9+oukWipUW9v1tTl5jlCwT9gVLYyC/THngPjyw40G8b8DKccp41 EebvW/ikBPYtAFWcBr6DQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:s1iU6JwyX0k=:qF3wmkBt4XF94HD66/LOjx QQaUujg7RD8vwUT7IA4urdkYEgskCcbP4QA7rFWrrMbi8eKCfOezI/5sFlLCN5MXk10ru0rll GkGCENRfsLJbRHh/e4Wr2JzDuotT4oNh0K4KaiNl7aEi4rLRnSoET5mH20dC1zL0vpjtMNBfh /Q4ks7R/2rW+lgPXQnE2xO8L6uEqEiU+Xs1QqmhSBQTLsm0WGie40UfcmfYUII8FiWRsVR0xq kFA905uOMsrS6oJtJINFvcdEq6flmEFPaMMgG2xY7FT/CwxdYzCuU23LKWdw1SDwCg1KW4/sR SGSirwbzqoHKqhvoJ82BpZYql/nQ2kIqzF/0L1e6ghinNBQA0z5Rbq5m1sAUim6bODATFlAO2 a0ol9rIZ6lihW9det7W0z5ZptW42n1EZlcNgvMyFnMGHtrzAv5iyLtltrQyYbFITEZpoPAm0Z Zk7v4JwxtEZB+Os2TJztAcEpPpQig7/6m45cqhvTRNodywOKzAqkew5B6MsTQXnaApA06i0Ov A8A6o2AypYt2VK0Nm/PZSeIrtX9y2yN0TEn5+BVk4+VKW2Qfro6gvtWWzo1jVjSltcF48WM55 Tn/X8udAui6asxFoxR6D1WOADi7hCI0rCZK1Cd7N8J+9KLFSoT8u0kbIJT8p79CYpAsZCWnn4 2a+3NlqlITmkuSoIG+6kmlf61ktRhkr7S8Rca0bKhovGraT4PmQI9oKzSb3IJ+Z5UBNX7bCF2 VEwbPF6SvmUq3yOeYOu/WvuBUYTIqU7xL2JRi/aEytq3iOyBTA9m0pZt42g4tFKwMp148zBj0 +I7nj2DBc+euzSDrJvK0rBWrq6cA96QuD7Iv98+JEVNqHeJqnU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Arnd 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