From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4485CC00523 for ; Wed, 8 Jan 2020 09:55:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 224AC20705 for ; Wed, 8 Jan 2020 09:55:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 224AC20705 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 021C46E1AA; Wed, 8 Jan 2020 09:55:45 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D80E26E1A7 for ; Wed, 8 Jan 2020 09:55:42 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 01:55:42 -0800 X-IronPort-AV: E=Sophos;i="5.69,409,1571727600"; d="scan'208";a="211490674" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 01:55:33 -0800 From: Jani Nikula To: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thierry Reding , David Airlie , Daniel Vetter , Andy Shevchenko , Randy Dunlap , Sam Ravnborg , Linus Walleij , Laurent Pinchart Subject: Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3 In-Reply-To: <20200107203231.920256-1-arnd@arndb.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200107203231.920256-1-arnd@arndb.de> Date: Wed, 08 Jan 2020 11:55:29 +0200 Message-ID: <87zheyqnla.fsf@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Maxime Ripard , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Boris Brezillon , Sean Paul , Emil Velikov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 07 Jan 2020, Arnd Bergmann wrote: > Making this IS_REACHABLE() was still wrong, as that just determines > whether the lower-level backlight code would be reachable from the panel > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m, > the drm_panel_of_backlight is left out of drm_panel.o but the condition > tells the driver that it is there, leading to multiple link errors such as > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined! > > Change the condition to check for whether the function was actually part > of the drm module. This version of the patch survived a few hundred > randconfig builds, so I have a good feeling this might be the last > one for the export. Broken record, this will still be wrong, even if it builds and links. No backlight support for panel despite expectations. See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com All of this is just another hack until the backlight config usage is fixed for good. Do we really want to make this the example to copy paste wherever we hit the issue next? I'm not naking, but I'm not acking either. BR, Jani. > > Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time") > Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight") > Fixes: 152dbdeab1b2 ("drm/panel: add backlight support") > Signed-off-by: Arnd Bergmann > --- > include/drm/drm_panel.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h > index 121f7aabccd1..6193cb555acc 100644 > --- a/include/drm/drm_panel.h > +++ b/include/drm/drm_panel.h > @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) > } > #endif > > -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE) > +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \ > + (IS_MODULE(CONFIG_DRM) && IS_MODULE(CONFIG_BACKLIGHT_CLASS_DEVICE))) > int drm_panel_of_backlight(struct drm_panel *panel); > #else > static inline int drm_panel_of_backlight(struct drm_panel *panel) -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEE38C00523 for ; Wed, 8 Jan 2020 09:55:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C917220705 for ; Wed, 8 Jan 2020 09:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727502AbgAHJzn (ORCPT ); Wed, 8 Jan 2020 04:55:43 -0500 Received: from mga02.intel.com ([134.134.136.20]:56575 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgAHJzm (ORCPT ); Wed, 8 Jan 2020 04:55:42 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 01:55:42 -0800 X-IronPort-AV: E=Sophos;i="5.69,409,1571727600"; d="scan'208";a="211490674" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 01:55:33 -0800 From: Jani Nikula To: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thierry Reding , David Airlie , Daniel Vetter , Andy Shevchenko , Randy Dunlap , Sam Ravnborg , Linus Walleij , Laurent Pinchart Cc: Arnd Bergmann , Sean Paul , dri-devel@lists.freedesktop.org, Maxime Ripard , Emil Velikov , Boris Brezillon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/drm_panel: fix export of drm_panel_of_backlight, try #3 In-Reply-To: <20200107203231.920256-1-arnd@arndb.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200107203231.920256-1-arnd@arndb.de> Date: Wed, 08 Jan 2020 11:55:29 +0200 Message-ID: <87zheyqnla.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 07 Jan 2020, Arnd Bergmann wrote: > Making this IS_REACHABLE() was still wrong, as that just determines > whether the lower-level backlight code would be reachable from the panel > driver. However, with CONFIG_DRM=y and CONFIG_BACKLIGHT_CLASS_DEVICE=m, > the drm_panel_of_backlight is left out of drm_panel.o but the condition > tells the driver that it is there, leading to multiple link errors such as > > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sitronix-st7701.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-sharp-ls043t1le01.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-seiko-43wvf1g.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-ronbo-rb070d30.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-rocktech-jh057n00900.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.ko] undefined! > ERROR: "drm_panel_of_backlight" [drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.ko] undefined! > > Change the condition to check for whether the function was actually part > of the drm module. This version of the patch survived a few hundred > randconfig builds, so I have a good feeling this might be the last > one for the export. Broken record, this will still be wrong, even if it builds and links. No backlight support for panel despite expectations. See http://mid.mail-archive.com/87d0cnynst.fsf@intel.com All of this is just another hack until the backlight config usage is fixed for good. Do we really want to make this the example to copy paste wherever we hit the issue next? I'm not naking, but I'm not acking either. BR, Jani. > > Fixes: 4a34a9dcec94 ("drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time") > Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight") > Fixes: 152dbdeab1b2 ("drm/panel: add backlight support") > Signed-off-by: Arnd Bergmann > --- > include/drm/drm_panel.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h > index 121f7aabccd1..6193cb555acc 100644 > --- a/include/drm/drm_panel.h > +++ b/include/drm/drm_panel.h > @@ -198,7 +198,8 @@ static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) > } > #endif > > -#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE) > +#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \ > + (IS_MODULE(CONFIG_DRM) && IS_MODULE(CONFIG_BACKLIGHT_CLASS_DEVICE))) > int drm_panel_of_backlight(struct drm_panel *panel); > #else > static inline int drm_panel_of_backlight(struct drm_panel *panel) -- Jani Nikula, Intel Open Source Graphics Center