Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1765409pxb; Wed, 9 Feb 2022 04:07:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJznv2PuecEMKUm1He6dNxielJ7q8ia63xlhpysy8z2gTAwouF/mk5RG4i8wPCRXrL6oW0G3 X-Received: by 2002:a17:90a:5d01:: with SMTP id s1mr2189737pji.154.1644408470777; Wed, 09 Feb 2022 04:07:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644408470; cv=none; d=google.com; s=arc-20160816; b=iNnluJupF9wP5m4rQApkO5cion6Yw8krzyMRBRSxbW68K+BU5/E+nuBR7EjzEGsp39 cp6IIFzoFKjiyNsR3gEZR5p0h6hdQU2zIoNE3bIfEmlK/nqqvwg4dX8DGzISSWYgNE+m tDtl6oF0uJOzhsGCliG/iAmwJ6ew7eg4HPhQy6zoETg9HLREMjO4zyf9H2ynQmIZ963R 9JZivLHGIGk1KwlLFpqh0jHQNPmKvyZgQNDW+Q9psLks2aSJ25kjdhH7toyy0PDRGQC1 2dLV+jfDrOkbnVigG9WbiR6mUcR2D07nChE3hLMZHyOaSqkClORRjNQsli84SUuP8EcN nddw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yF5UcKFGU/samSHsGDregSgKCpT7s6aDPXmfk7zYBtM=; b=cAXx2I9XUgsXg4Kreurv+oBNwusB4yyF/DqYXNi4UGBu9iXB5kFPlgjeXjdQ0JYDq4 6ozkNg3YoNxAWZbNAjAQmxCQnOJIt2F9mA/tTvSiPf01YuFo/YooHqp1dqtnDQLaaAtr 40mJ85kRRX39BqBWik9NpZFHeIJ3J5OVL3mkZj+/V0Y7ogD6zjGhG3uce0X9cbC4Wdtr q6pgmldG42ycQ+Vk5+p/gDRZJx1WTChk7yTI3ixdprjE5Fc0AFl20rNp1bbB/gSvZdcP 8h0hidJIz75HI2gvzIVMgVAK3aFXkXs5VyRFdPysQb2BXlf9mLfciUKaBlyMX1f1ytbr prYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=XzuhX99m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v64si2545971pgd.491.2022.02.09.04.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:07:50 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=XzuhX99m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DF48E0FBC27; Wed, 9 Feb 2022 02:06:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387304AbiBHWWH (ORCPT + 99 others); Tue, 8 Feb 2022 17:22:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386509AbiBHUqC (ORCPT ); Tue, 8 Feb 2022 15:46:02 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E88C0613CB for ; Tue, 8 Feb 2022 12:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=yF5UcKFGU/samSHsGDregSgKCpT7s6aDPXmfk7zYBtM=; b=XzuhX99mlQKkLO0D7MPlvbCNsT S3nvR89L000uXMP1dF73NgG5R/DKClIfbKDjATU8dyILBRZvZ7ciQBAR5zixVjJR//QA9YNHEx7Yn mMG9ZakZFzDUEw//XZ1DyFbHoG/noPZMwx7F7AE09AzErpwRW3Cw48kQJz1BvN69NncNAfPvHdfFC U3Vp9c/9pNtbRhVLp/PK/yw+/vED7AN+jdX6iw351ri8MOB/no/5JRjjX/DWGbZLp7JBsZhmOP+AM s80dMNqw0gY2sFrJbn8WAa/5fYfcl2foE6qCMRjfQ/D90FooMFBSmCVeLadar6siVCOjHEvcFhsHZ 1o4bKxlA==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHXMv-008DTy-C8; Tue, 08 Feb 2022 20:45:46 +0000 Message-ID: <2434f050-b82c-03e6-ee8f-8c8799119815@infradead.org> Date: Tue, 8 Feb 2022 12:45:38 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: Kconfig CONFIG_FB dependency regression Content-Language: en-US To: Thinh Nguyen , Arnd Bergmann Cc: Fabio Estevam , Kees Cook , Daniel Vetter , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , John Youn , Bing Yuan , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" References: <6fc4a81f-1a13-bff9-7b2e-d5bec382cb42@synopsys.com> <9bab4777-3034-b789-fdf6-ca8d7e6a8c35@infradead.org> <6743d6b1-13fe-9c83-f706-82338dd03897@synopsys.com> <7ed6137e-cf19-3614-9404-e89389411a8f@infradead.org> <992f01cc-eb0c-b503-f9b4-4a037c6cf67a@synopsys.com> From: Randy Dunlap In-Reply-To: <992f01cc-eb0c-b503-f9b4-4a037c6cf67a@synopsys.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- On 2/8/22 12:10, Thinh Nguyen wrote: > Randy Dunlap wrote: >> >> >> On 2/3/22 19:21, Thinh Nguyen wrote: >>> Arnd Bergmann wrote: >>>> On Thu, Feb 3, 2022 at 12:55 AM Thinh Nguyen wrote: >>>>> Arnd Bergmann wrote: >>>>>> On Wed, Feb 2, 2022 at 1:14 AM Thinh Nguyen wrote: >>>>>>> Fabio Estevam wrote: >>>>>> >>>>>> CONFIG_FB should not normally be needed for booting, so unless >>>>>> you have a graphical application in your initramfs that requires the /dev/fb0 >>>>>> device to work, it is not supposed to make a difference. >>>>>> >>>>> >>>>> I'm not sure, but it seems like the setup we have isn't the only one >>>>> that needed it. Fabio also noted that the imx_v6_v7_defconfig also needs >>>>> to have CONFIG_FB set. >>>> >>>> No, that one is different: the change for imx_v6_v7_defconfig was >>>> done because they actually use a framebuffer console on some devices, >>>> so the patch just adds the symbol to enable the drivers they are using. >>>> >>>> This is expected with my original patch that doesn't implicitly enable >>>> the framebuffer layer any more. What is not expected is for the kernel >>>> to hang during boot as you reported for your unidentified platform. >>>> >>>>>> Are there any other differences in your .config before and after the patch? >>>>>> It's possible that you use some other driver that in turn depends on >>>>>> CONFIG_FB. Does your machine have any graphical output device? >>>>>> If yes, which driver do you use? >>>>> >>>>> I don't have the answer to those questions yet. Need more investigation. >>>>> I'm new to this particular test setup. >>>> >>>> Do you mean you don't know if there is a screen attached to the system? >>>> >>> >>> It does have a graphical output device, but I didn't check what it is or >>> what driver is driving it. I just notice that after the reported commit, >>> something stopped working. >>> >>>>>> >>>>>> You may also want to make sure that you have 9d6366e743f3 ("drm: >>>>>> fb_helper: improve CONFIG_FB dependency") in your kernel, which >>>>>> fixes a minor problem with my original patch. >>>>>> >>>>> >>>>> The issue also occurs in mainline, which has your minor fix commit >>>>> above. The revert isn't clean for the latest kernel version. I also have >>>>> to revert some of the changes along with CONFIG_FB. The revert looks >>>>> more like this for the latest kernel: >>>>> >>>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig >>>>> index b1f22e457fd0..7cbc733a8569 100644 >>>>> --- a/drivers/gpu/drm/Kconfig >>>>> +++ b/drivers/gpu/drm/Kconfig >>>>> @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK >>>>> >>>>> config DRM_FBDEV_EMULATION >>>>> bool "Enable legacy fbdev support for your modesetting driver" >>>>> - depends on DRM_KMS_HELPER >>>>> - depends on FB=y || FB=DRM_KMS_HELPER >>>>> + depends on DRM >>>>> + select DRM_KMS_HELPER >>>>> + select FB >>>>> select FB_CFB_FILLRECT >>>>> select FB_CFB_COPYAREA >>>>> select FB_CFB_IMAGEBLIT >>>>> >>>>> >>>>> >>>>> I attached the configs for kernel v5.17-rc1. The "bad" config is without >>>>> any revert, the "good" config is with the change above. >>>> >>>> Looking at the config, I see that this is for an x86 machine, >>>> and you have the FB_EFI driver and EFI_EARLYCON enabled. >>>> >>>> What I suspec is going on is that you are looking at a screen rather >>>> than a serial console, and the kernel doesn't actually hang but you >>>> just don't see any more messages after the DRM driver takes >>>> over from EFI_EARLYCON because there is no console driver. >>>> >>>> In this case, what you see is the intended behavior, not a bug. >>>> If you want a graphical console in your system, you need to >>>> enable the support for this in your config. >>>> >>> >>> It sounds like that's the case. Unfortunately I'm not familiar with this >>> subsystem to say that's what happening. If there's nothing actually >>> broken from review, we can ignore this email thread. >> >> Hi, >> I don't know of anything that is broken... >> >> I am curious how CONFIG_FB_EFI came to be set when going from bad.config to >> good.config. Can you explain that? >> > > I just use the change above and "make" with olddefconfig option. Is it > not expected? Maybe I am not doing the same as you. If I take your previous bad.config with kernel v5.17-rc2 and use your Kconfig patch: diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index b1f22e457fd0..7cbc733a8569 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK config DRM_FBDEV_EMULATION bool "Enable legacy fbdev support for your modesetting driver" - depends on DRM_KMS_HELPER - depends on FB=y || FB=DRM_KMS_HELPER + depends on DRM + select DRM_KMS_HELPER + select FB select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT and then run 'make olddefconfig', I see: # CONFIG_FB_EFI is not set which is what I would expect to see. thanks. -- ~Randy