Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2609813pxb; Sun, 17 Oct 2021 20:24:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ1Uh0k53WQ6iv2Tc6C3lQ6Qm9KXRpok1qpnhsa3d5Lu1haH/83d+T4w5g+FSh/Ce7eAFG X-Received: by 2002:a17:902:e5d2:b0:13f:21c1:b44f with SMTP id u18-20020a170902e5d200b0013f21c1b44fmr24808242plf.30.1634527491787; Sun, 17 Oct 2021 20:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527491; cv=none; d=google.com; s=arc-20160816; b=BGa2yvsAyG2hRVOp6MYxQpFtunzgkQkcRnBeup9GLn/V9/WYLvoAjGyhcfjRl04BCQ SxvIhkW8eo4vzam0Kl0IbGYNcKIH9jFiqBfXDySpKVU7/elRj0ePxwbhhzBHnguaijEc tvCFpV2Gvoxrs891ycNNknvusuhFQKuaYlPaGtHv4F6Cz1Lb8WjTGzky0ZLG2SxVJcJz wB06UORJ8XeVj9s1g4u544iGYbzjcE1HnbiMLrtPKO6ZZ7qPSQbMYJjc1BFswXhhNUkT lVJbUtQWCcxhxaJ+vjd/GIQq7JQ8TNzB2UAw6c0w9WSLSxDlO0jB7SaGQdCxCB3nahxZ 2hqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B7b8oVDLlXHFOsz7boYsyR3zpm2QsdeBLE8Yv3vxVY8=; b=ykXbGsHeG1rGRd7ZazFVbMsYAarvxJiFsJtoo1sJXnyYOAwaavaIX1kut71/59UKa6 b2y/6xMo43WJp7QCmaYX/L1qROQvM4afKDWOm43c1U7LjjOZx+xiW4TITNHZGVzaimel T13pzOY1POM64JE6+14aAZkcqU7zdG9mtX15R/x+p9DeY5+uEDppZI6W4+5Ow2mx5VPI 1l4sb4cEx7y6vXLK6Opm6h3SG1EY0Kxf3huk8t04AP4HSvXa86yuzgt4RmXqtLtJ/zBV f1retCcZB9SZXgwiOKTqkGxM4N9YjyFvU/HLymG9pX1gxsmiKUB+niNr+ji8yCupLm7n +uuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="tx/sg4oj"; 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 d7si18917233pln.282.2021.10.17.20.24.39; Sun, 17 Oct 2021 20:24:51 -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="tx/sg4oj"; 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 S238946AbhJPAAt (ORCPT + 98 others); Fri, 15 Oct 2021 20:00:49 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:35300 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235896AbhJPAAs (ORCPT ); Fri, 15 Oct 2021 20:00:48 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1EA3429B; Sat, 16 Oct 2021 01:58:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1634342320; bh=BzLBS8UmTthXP7ryl5Pf+TC1GM1HHtLkkNry3SWtiRc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tx/sg4ojtcVwZsE4E2BGiXdx/R84Cuf67XmYSqpXxutIQRYS3I5/N4baO6PGJ1ySL vbuEFXgiYhPxHk58Urd/v0jxLh1+MeZI+i+3Jw3hK+TbpmUmWsi7oak5cnu/R+iTaK 3MS5rfcAy/7Ld0O08Ei+kVBr7R923v1gW3bcfeMs= Date: Sat, 16 Oct 2021 02:58:24 +0300 From: Laurent Pinchart To: Arnd Bergmann Cc: Kieran Bingham , David Airlie , Daniel Vetter , Arnd Bergmann , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [RESEND] drm/rcar: stop using 'imply' for dependencies Message-ID: References: <20210927142629.2016647-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210927142629.2016647-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Thank you for the patch. On Mon, Sep 27, 2021 at 04:26:23PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The meaning of the 'imply' keyword has changed recently, and neither the > old meaning (select the symbol if its dependencies are met) nor the new > meaning (enable it by default, but let the user set any other setting) > is what we want here. > > Work around this by adding two more Kconfig options that lead to > the correct behavior: if DRM_RCAR_USE_CMM and DRM_RCAR_USE_LVDS > are enabled, that portion of the driver becomes usable, and no > configuration results in a link error. > > This avoids a link failure: > > arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_begin': > rcar_du_crtc.c:(.text+0x1444): undefined reference to `rcar_cmm_setup' > arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable': > rcar_du_crtc.c:(.text+0x14d4): undefined reference to `rcar_cmm_enable' > arm-linux-gnueabi-ld: rcar_du_crtc.c:(.text+0x1548): undefined reference to `rcar_cmm_setup' > arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable': > rcar_du_crtc.c:(.text+0x18b8): undefined reference to `rcar_cmm_disable' > arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_kms.o: in function `rcar_du_modeset_init': > > Link: https://lore.kernel.org/all/20200417155553.675905-5-arnd@arndb.de/ > Signed-off-by: Arnd Bergmann > --- > This was last posted as part of a longer series to rework the > DRM dependencies in a more logical way. The rest of the series > is still open, but this one is needed as a bug fix regardless of > the rest. This looks a bit complicated, but at the same time probably as clean as it can get with the existing Kconfig grammar. I don't believe the needs of the rcar-du driver are really exotic, so better support for this in Kconfig would be nice. Until that happens, Reviewed-by: Laurent Pinchart Dave or Daniel, I don't have other pending patches for v5.16, could you pick this one up ? It fixes a build failure in -next. > --- > drivers/gpu/drm/rcar-du/Kconfig | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig > index b47e74421e34..3e588ddba245 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 Gen3 and RZ/G2 DU HDMI Encoder Support" > depends on DRM && OF > @@ -28,15 +30,20 @@ config DRM_RCAR_DW_HDMI > help > Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder. > > +config DRM_RCAR_USE_LVDS > + bool "R-Car DU LVDS Encoder Support" > + depends on DRM_BRIDGE && OF > + default DRM_RCAR_DU > + help > + Enable support for the R-Car Display Unit embedded LVDS encoders. > + > config DRM_RCAR_LVDS > - tristate "R-Car DU LVDS Encoder Support" > - depends on DRM && DRM_BRIDGE && OF > + def_tristate DRM_RCAR_DU > + depends on DRM_RCAR_USE_LVDS > select DRM_KMS_HELPER > select DRM_PANEL > select OF_FLATTREE > select OF_OVERLAY > - help > - Enable support for the R-Car Display Unit embedded LVDS encoders. > > config DRM_RCAR_VSP > bool "R-Car DU VSP Compositor Support" if ARM -- Regards, Laurent Pinchart