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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 B8BFDC4338F for ; Mon, 16 Aug 2021 09:49: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 45FA561B7B for ; Mon, 16 Aug 2021 09:49:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 45FA561B7B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev 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 5FC3389B01; Mon, 16 Aug 2021 09:49:46 +0000 (UTC) Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by gabe.freedesktop.org (Postfix) with ESMTPS id E053C89B01 for ; Mon, 16 Aug 2021 09:49:43 +0000 (UTC) Subject: Re: [PATCH] drm/fb: Fix randconfig builds DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1629107382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xNBwkCV0/SazMsIdGtsb/ceekMmIeGCq8K8pfq0U4YU=; b=xZMSupzSo7ld9hJePMRjhOEan18CIQDwo/F02iI0YqISQO37Yxd5egbw4FlTgz1XQnLdgt nEr6ZYEnrVzDcAH0CVZzStAbCix1lAC0miv758QJcSJwAm8O2+v/Quck2lPUhLN7qap615 yhaYRC05eK7W9El++O4P7jxhjeoyGHc= To: Jani Nikula , daniel@ffwll.ch, mripard@kernel.org Cc: dri-devel@lists.freedesktop.org, liuyun01@kylinos.cn 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> <87eeatkbuv.fsf@intel.com> <87bl5xkbst.fsf@intel.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jackie Liu Message-ID: <1355bdec-56ff-c6be-844f-efc792ad622b@linux.dev> Date: Mon, 16 Aug 2021 17:49:36 +0800 MIME-Version: 1.0 In-Reply-To: <87bl5xkbst.fsf@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: liu.yun@linux.dev 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" 在 2021/8/16 下午4:56, Jani Nikula 写道: > On Mon, 16 Aug 2021, Jani Nikula wrote: >> 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=n > > Or this monster: > > depends on FB || DRM_FBDEV_EMULATION=n Hi Jani, depends on FB || DRM_FBDEV_EMULATION=n Will cause the following warnings. WARNING: unmet direct dependencies detected for DRM_KMS_HELPER Depends on [m]: HAS_IOMEM [=y] && DRM [=y] && (FB [=m] || !DRM_FBDEV_EMULATION [=y]) Selected by [y]: - DRM_DEBUG_SELFTEST [=y] && HAS_IOMEM [=y] && DRM [=y] && DEBUG_KERNEL [=y] - DRM_VKMS [=y] && HAS_IOMEM [=y] && DRM [=y] - TINYDRM_ILI9341 [=y] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] - TINYDRM_MI0283QT [=y] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] - TINYDRM_ST7586 [=y] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] - TINYDRM_ST7735R [=y] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] - DRM_ANALOGIX_ANX78XX [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_BRIDGE [=y] Selected by [m]: - DRM_FBDEV_EMULATION [=y] && HAS_IOMEM [=y] && DRM [=y] && FB [=m] - DRM_SIMPLEDRM [=m] && HAS_IOMEM [=y] && DRM [=y] - TINYDRM_HX8357D [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] - TINYDRM_REPAPER [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y] configuration written to .config How about this? diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 7ff89690a976..797eeea9cbbe 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -98,8 +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 DRM_KMS_HELPER + depends on (FB=y && DRM_KMS_HELPER) || (FB=m && DRM_KMS_HELPER=m) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT -- BR, Jackie Liu > > >> >>> >>> -- >>> Thanks, BR, Jackie Liu >>> >>> 在 2021/8/16 下午4:33, Jani Nikula 写道: >>>> 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_framebuffer' >>>>> drm_fb_helper.c:(.text+0x1dcc): undefined reference to `framebuffer_alloc' >>>>> ld: drm_fb_helper.c:(.text+0x1dea): undefined reference to `fb_alloc_cmap' >>>>> 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. >>>> >>>> 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. >>>> >>>> This might help in config DRM_KMS_HELPER, and it might help the reader >>>> because it's factual: >>>> >>>> depends on FB if DRM_FBDEV_EMULATION >>>> >>>> >>>> BR, >>>> Jani. >>>> >>>> >>>> >>>> >>>> >>>>> >>>>> -- >>>>> Jackie Liu >>>>> >>>>> 在 2021/8/16 下午3:01, Jani Nikula 写道: >>>>>> 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 >>>>>> >>>> >