Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp11131pxv; Wed, 21 Jul 2021 14:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE8pXunOPD8wy93bgk26nP9yLLJ9zr47K2yAlxu26SYtJM3H6aLRqdOoyAUJ3YqIE8u31A X-Received: by 2002:a92:8e44:: with SMTP id k4mr13822684ilh.305.1626901450656; Wed, 21 Jul 2021 14:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901450; cv=none; d=google.com; s=arc-20160816; b=XUA1wzJj+l++njJ41OFZhhWC6XMgVKAyGB+gFwIk57DnhTDRsWUa9e4hpsTb+e+ItJ 5TZwOMk+Pyk3v+Ktd+/LnYVCyxhHiGm2AfKXsLgDXPvoysCcEobvZpLOUcxd4O6Ou3e1 1HAKSnZZLQBz9DWQobFqZcCC77V72lMBEVTvHy8IJ2gUgCH0BC8vbbX9x+ktMS5r2R62 r2xcA7stP1T8ffO0mC20kkRCBdajtG2oGw34EuRCyH9E/sbvOfxn61sGpFfmS9egLfe5 47eFOYFFYpVOM/9Z90MARnMwsd2M25UVjUqxtitP8ALq6ch9aMSZSRTTtHsOhii+mYGm ILyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ySEdc7ofHUc2Bwln+nppe3eGomnh68pe/aXUwRiZG2c=; b=iYyt3MjxumsjofkzP/D82uHy+z9KPhDJbYcWTsejbKp4CwL7HC8mtBAOjFYC6BJsMT yxuEJyQOm1ugAwv432BZl3QlcS2M4DwK3DogDvJA8aT9ld2yG6ghIrgxIaqyTxAqVamr jMqKhjc7E0tmKPJgNlIEbm2w2OCGdhSqKDv5guZEyhdZEpSOp06WYfJm5u2ubFwxunIH vbHF4xyDvhEXTljNTt6pmcRyzAIZ7fPAAhLa9EmnfoSVEFXTD1w2ITX7/1xCFbPJjYsU 2TFevsvks7GkaCUVXYSxj02MWOR0vPkjs2jY5lwbJKDo/fbGBwtARsuRYyPLcRF4z/Ja FgIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fyoek8Bq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si29493316ilh.42.2021.07.21.14.03.59; Wed, 21 Jul 2021 14:04: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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fyoek8Bq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233110AbhGUPtw (ORCPT + 99 others); Wed, 21 Jul 2021 11:49:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:60390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235501AbhGUPt3 (ORCPT ); Wed, 21 Jul 2021 11:49:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7678F61242; Wed, 21 Jul 2021 16:30:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626885005; bh=/yc+E0kAuhJRP5Rh3EmC/tYRFWNCrNcyKuD79ykVRyg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fyoek8Bqt1r6Z9RyyoyDYkx2SLZbxehZG0+ZpXG+dhtohk48n5YRCHWCTv22aqBpb VMNxImCHyu8s0asowGbJhIyevh6mfA3oobRdRne9ttQRpiTNCddxhU3QIX4ROYx8+O v8QhFy+YxssLxfvgpqaSkXbL3R/gl4aLnhyDdpKd/As9AuD4wRSa6T5ijR8Qp7STkY ICoqkA5i5l7bcW5lVmn+zea1xNvx1w9lKg+DSlCKww2PssF5xpFNQztWbgC7yQ7gzP LurS9Y/St4SxcR21Xl3GI/V2/c7OC9UVAIVEGVLg+4PVq3ZcABaPYhX5D9d74MWsQ4 GJD7fXFFVChsQ== Received: by mail-ed1-f48.google.com with SMTP id ee25so3145395edb.5; Wed, 21 Jul 2021 09:30:05 -0700 (PDT) X-Gm-Message-State: AOAM5308FcPqmoslHCXpkq6ss6T7Z9LNyI8zRpXPg3zf9+XIRmXT9m4Q Xr0QVvnFMIoASPJv7Bi4H2CfyLunVllb9Lhadg== X-Received: by 2002:aa7:df12:: with SMTP id c18mr49131896edy.62.1626885004024; Wed, 21 Jul 2021 09:30:04 -0700 (PDT) MIME-Version: 1.0 References: <20210721151839.2484245-1-arnd@kernel.org> In-Reply-To: <20210721151839.2484245-1-arnd@kernel.org> From: Rob Herring Date: Wed, 21 Jul 2021 10:29:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] fbdev: simplefb: fix Kconfig dependencies To: Arnd Bergmann Cc: Thomas Zimmermann , Daniel Vetter , Maxime Ripard , Arnd Bergmann , Frank Rowand , Mauro Carvalho Chehab , Lorenzo Pieralisi , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , dri-devel , Linux Fbdev development list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2021 at 9:18 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Configurations with both CONFIG_FB_SIMPLE=y and CONFIG_DRM_SIMPLEDRM=m > are allowed by Kconfig because the 'depends on !DRM_SIMPLEDRM' dependency > does not disallow FB_SIMPLE as long as SIMPLEDRM is not built-in. This Double negative. How about: allows FB_SIMPLE as long as SIMPLEDRM is not built-in. > can however result in a build failure when cfb_fillrect() etc are then > also in loadable modules: > > x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x1f8): undefined reference to `cfb_fillrect' > x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x200): undefined reference to `cfb_copyarea' > x86_64-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x208): undefined reference to `cfb_imageblit' > > To work around this, change FB_SIMPLE to be a 'tristate' symbol, > which still allows both to be =m together, but not one of them to > be =y if the other one is =m. If a distro kernel picks this > configuration, it can be determined by local policy which of > the two modules gets loaded. The 'of_chosen' export is needed > as this is the first loadable module referencing it. > > Alternatively, the Kconfig dependency could be changed to > 'depends on DRM_SIMPLEDRM=n', which would forbid the configuration > with both drivers. > > Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") > Signed-off-by: Arnd Bergmann > --- > drivers/of/base.c | 1 + > drivers/video/fbdev/Kconfig | 5 +++-- > 2 files changed, 4 insertions(+), 2 deletions(-) For the DT change: Acked-by: Rob Herring