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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 75C1EC4338F for ; Mon, 16 Aug 2021 08:55:30 +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 274BA61B3B for ; Mon, 16 Aug 2021 08:55:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 274BA61B3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FE29895A8; Mon, 16 Aug 2021 08:55:29 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A73B895A8 for ; Mon, 16 Aug 2021 08:55:26 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="215550233" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="215550233" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 01:55:25 -0700 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="519483316" Received: from ifridman-mobl.ger.corp.intel.com (HELO localhost) ([10.251.210.77]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 01:55:23 -0700 From: Jani Nikula To: Jackie Liu , daniel@ffwll.ch, mripard@kernel.org Cc: dri-devel@lists.freedesktop.org, liuyun01@kylinos.cn Subject: Re: [PATCH] drm/fb: Fix randconfig builds In-Reply-To: <6fd6b18a-332b-a573-ecd2-51b6a5dd042f@linux.dev> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210816064835.332785-1-liu.yun@linux.dev> <87y291kh4c.fsf@intel.com> <9dd92929-24e9-e9e4-b78a-31da3c3ed77d@linux.dev> <87mtphkcv5.fsf@intel.com> <6fd6b18a-332b-a573-ecd2-51b6a5dd042f@linux.dev> Date: Mon, 16 Aug 2021 11:55:20 +0300 Message-ID: <87eeatkbuv.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 16 Aug 2021, Jackie Liu wrote: > Hi Jani. > > Your suggestion is that? > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 7ff89690a976..ba179a539497 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -77,6 +77,7 @@ config DRM_DEBUG_SELFTEST > config DRM_KMS_HELPER > tristate > depends on DRM > + depends on FB if DRM_FBDEV_EMULATION > help > CRTC helpers for KMS drivers. > > > But it has a syntax error. Ah, try this then: depends on FB || FB=3Dn > > -- > Thanks, BR, Jackie Liu > > =E5=9C=A8 2021/8/16 =E4=B8=8B=E5=8D=884:33, Jani Nikula =E5=86=99=E9=81= =93: >> On Mon, 16 Aug 2021, Jackie Liu wrote: >>> Hi Jani. >>> >>> My CI report an randconfigs build failed. there are: >>> >>> drm_fb_helper.c:(.text+0x302): undefined reference to `fb_set_suspend' >>> drm_fb_helper.c:(.text+0xaea): undefined reference to `register_framebu= ffer' >>> drm_fb_helper.c:(.text+0x1dcc): undefined reference to `framebuffer_all= oc' >>> ld: drm_fb_helper.c:(.text+0x1dea): undefined reference to `fb_alloc_cm= ap' >>> ld: drm_fb_helper.c:(.text+0x1e2f): undefined reference to `fb_dealloc_= cmap' >>> ld: drm_fb_helper.c:(.text+0x1e5b): undefined reference to >>> `framebuffer_release' >>> drm_fb_helper.c:(.text+0x1e85): undefined reference to >>> `unregister_framebuffer' >>> drm_fb_helper.c:(.text+0x1ee9): undefined reference to `fb_dealloc_cmap' >>> ld: drm_fb_helper.c:(.text+0x1ef0): undefined reference to >>> `framebuffer_release' >>> drm_fb_helper.c:(.text+0x1f96): undefined reference to >>> `fb_deferred_io_cleanup' >>> drm_fb_helper.c:(.text+0x203b): undefined reference to `fb_sys_read' >>> drm_fb_helper.c:(.text+0x2051): undefined reference to `fb_sys_write' >>> drm_fb_helper.c:(.text+0x208d): undefined reference to `sys_fillrect' >>> drm_fb_helper.c:(.text+0x20bb): undefined reference to `sys_copyarea' >>> drm_fb_helper.c:(.text+0x20e9): undefined reference to `sys_imageblit' >>> drm_fb_helper.c:(.text+0x2117): undefined reference to `cfb_fillrect' >>> drm_fb_helper.c:(.text+0x2172): undefined reference to `cfb_copyarea' >>> drm_fb_helper.c:(.text+0x21cd): undefined reference to `cfb_imageblit' >>> drm_fb_helper.c:(.text+0x2233): undefined reference to `fb_set_suspend' >>> drm_fb_helper.c:(.text+0x22b0): undefined reference to `fb_set_suspend' >>> drm_fb_helper.c:(.text+0x250f): undefined reference to `fb_deferred_io_= init' >>> >>> The main reason is because DRM_FBDEV_EMULATION is built-in, and >>> CONFIG_FB is compiled as a module. >>=20 >> DRM_FBDEV_EMULATION is not a module, it's just a config >> knob. drm_fb_helper.ko is the module, enabled via DRM_KMS_HELPER, and it >> has an implicit dependency on FB, and DRM_FBDEV_EMULATION selects >> DRM_KMS_HELPER. Select just breaks dependencies in all kinds of ways. >>=20 >> This might help in config DRM_KMS_HELPER, and it might help the reader >> because it's factual: >>=20 >> depends on FB if DRM_FBDEV_EMULATION >>=20 >>=20 >> BR, >> Jani. >>=20 >>=20 >>=20 >>=20 >>=20 >>> >>> -- >>> Jackie Liu >>> >>> =E5=9C=A8 2021/8/16 =E4=B8=8B=E5=8D=883:01, Jani Nikula =E5=86=99=E9=81= =93: >>>> On Mon, 16 Aug 2021, Jackie Liu wrote: >>>>> From: Jackie Liu >>>>> >>>>> When CONFIG_DRM_FBDEV_EMULATION is compiled to y and CONFIG_FB is m, = the >>>>> compilation will fail. we need make that dependency explicit. >>>> >>>> What's the failure mode? Using select here is a bad idea. >>>> >>>> BR, >>>> Jani. >>>> >>>>> >>>>> Reported-by: k2ci >>>>> Signed-off-by: Jackie Liu >>>>> --- >>>>> drivers/gpu/drm/Kconfig | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig >>>>> index 7ff89690a976..346a518b5119 100644 >>>>> --- a/drivers/gpu/drm/Kconfig >>>>> +++ b/drivers/gpu/drm/Kconfig >>>>> @@ -98,7 +98,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS >>>>> config DRM_FBDEV_EMULATION >>>>> bool "Enable legacy fbdev support for your modesetting driver" >>>>> depends on DRM >>>>> - depends on FB >>>>> + select FB >>>>> select DRM_KMS_HELPER >>>>> select FB_CFB_FILLRECT >>>>> select FB_CFB_COPYAREA >>>> >>=20 --=20 Jani Nikula, Intel Open Source Graphics Center