Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp345728rdb; Thu, 2 Nov 2023 05:38:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7f0U7BKkx1tkeDvpy/wFdDsmqO0LubNQc1w4+ShuX91XkXiesB4Y+v5UEvLlqFSNo54j/ X-Received: by 2002:a05:6358:c381:b0:168:d12b:a166 with SMTP id fl1-20020a056358c38100b00168d12ba166mr16708614rwb.17.1698928730203; Thu, 02 Nov 2023 05:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698928730; cv=none; d=google.com; s=arc-20160816; b=P5mbs0ZCJifMgPzFPQK9k3JlWLMtZgsGfm8MwwitMcUfWC3mV96u2TzZx4NKObyteX YhsMbWZqg4/bbDl4OMARxtjJoMmQngXMMNJ6Ajk7vzk39cNmn57jJAy4BQ2WK/uAE5I2 CZVMoKAtkfQqJ9xcacLtlcncOLmmsXiKKZCll1stekI6OotVUxT1LrI7sFbOi6an6tHR fFPzPJARN0MLzXFSnKZQOAWqZk9vHewbZZ5trPsADh/r38dcqtsFPR/R1Hd8rdDy4wI7 LP0YN/xDh7tHi29/jPygSCwfZ53Wec0A3gDdae4OeWT8AU5lw2GhFW3x36PbcPMlfyPg c7gw== 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=O+KvYSdW9cqnlBZAAtNBM6zR/e0oHq/DevdtTrAGFCQ=; fh=Jxrfpo8S6Svcjb7P1fe11OO3TrFlFJU7MLyiJ70iJNQ=; b=vkubcNGfPbab90dGni2fAnJYK4emwsav7Ox3DzqL+sbEg5pWtuuJfhacs95KsnPo3W zcHOPACuHehiZ2DFKjGVFFwQx7srFuj5UTsaK6e23UeLq7sysD0mM5IsWZmYmh5lCLZ2 ZgiPx1s5qzEUlWwDQQ8s5ZLpCmixVT6PdV95Sw+jzO/EQODvwnvbjRd38zEVfVZGh+QJ 2Wr7Avq0wT0U2IEhGV3hlygJ3T9eL28mIEIZhiGQwr8EYytcCOzf6xXZQJpwdhEj1/o7 B++fYNDXn+jwB+yJOh+AHMJiF2omiyBURRVaPofzYan8co8K7Gr9Z4vw73TaWQYUnw1h qKbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CGQ5Mw9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cl20-20020a056a02099400b0058a4883e6casi2146787pgb.225.2023.11.02.05.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 05:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CGQ5Mw9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E903D8218E53; Thu, 2 Nov 2023 05:38:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376372AbjKBMio (ORCPT + 99 others); Thu, 2 Nov 2023 08:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347444AbjKBMim (ORCPT ); Thu, 2 Nov 2023 08:38:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B208913D for ; Thu, 2 Nov 2023 05:38:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D506C43391 for ; Thu, 2 Nov 2023 12:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698928710; bh=ODmxgaPCW3o20t0EE5335siDRe/G6d3/sBppTZyOmJY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CGQ5Mw9LwNieWV8AZ0DCKFMSHkzB3AeQ8ykOImYit9Ox14xQTbSz7hVTnR9IL2GM5 Wuu3STdyRAg41A7QA+C6PmiQVymyK13SZrzT4fekyR6+wPHz27//mhH2ctN6EVTz4z Tfcp2xzYJ79qHtUQ1AASRDPIlz1dJlNpTnUja/PqSmj/tu/io/F3CW7K0c4pSOx1My jdknSffKPhCa1ZJjxLM0ru6lmOQ9HcBtVWefs3A72hSwiAE2M/wr8Nla1Xc53UUjOF porWdxZMFnfR8Xr6wJneMa4Q39wPx8lb4q+ZodKpacojJWneoSZrUXebd2TlRXgXxJ pBiS35M3I69Nw== Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5435336ab0bso1469749a12.1 for ; Thu, 02 Nov 2023 05:38:30 -0700 (PDT) X-Gm-Message-State: AOJu0YyiWpIfPu2UFVfisFjCoZLdzAeS3pd+xkoHlNYkvnde2BK4Hv11 R6U2XJusL6hluW6+LRQrUBC9Vipxd/VQ+BeZU6E= X-Received: by 2002:a17:906:fe41:b0:9b6:aac1:6fa5 with SMTP id wz1-20020a170906fe4100b009b6aac16fa5mr4450693ejb.55.1698928708561; Thu, 02 Nov 2023 05:38:28 -0700 (PDT) MIME-Version: 1.0 References: <7c50e051-eba2-09fc-da9f-023d592de457@ristioja.ee> <31bdf7b1-0ed9-4217-b459-1d857e53120b@leemhuis.info> <82f1b533-3bd8-4418-843a-718d9a6b5786@leemhuis.info> <31ed0db1-9398-4c46-a391-fc644ec49268@ristioja.ee> In-Reply-To: <31ed0db1-9398-4c46-a391-fc644ec49268@ristioja.ee> From: Huacai Chen Date: Thu, 2 Nov 2023 20:38:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Blank screen on boot of Linux 6.5 and later on Lenovo ThinkPad L570 To: Jaak Ristioja Cc: Linux regressions mailing list , Linux Kernel Mailing List , Linux DRI Development , Javier Martinez Canillas , Thorsten Leemhuis , Thomas Zimmermann , Bagas Sanjaya , Evan Preston Content-Type: multipart/mixed; boundary="0000000000002c605e06092aaaa3" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED,WEIRD_PORT autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 05:38:49 -0700 (PDT) --0000000000002c605e06092aaaa3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Jaak, On Wed, Nov 1, 2023 at 7:52=E2=80=AFPM Jaak Ristioja wro= te: > > On 31.10.23 14:17, Huacai Chen wrote: > > Hi, Jaak and Evan, > > > > On Sun, Oct 29, 2023 at 9:42=E2=80=AFAM Huacai Chen wrote: > >> > >> On Sat, Oct 28, 2023 at 7:06=E2=80=AFPM Jaak Ristioja wrote: > >>> > >>> On 26.10.23 03:58, Huacai Chen wrote: > >>>> Hi, Jaak, > >>>> > >>>> On Thu, Oct 26, 2023 at 2:49=E2=80=AFAM Jaak Ristioja wrote: > >>>>> > >>>>> On 25.10.23 16:23, Huacai Chen wrote: > >>>>>> On Wed, Oct 25, 2023 at 6:08=E2=80=AFPM Thorsten Leemhuis > >>>>>> wrote: > >>>>>>> > >>>>>>> Javier, Dave, Sima, > >>>>>>> > >>>>>>> On 23.10.23 00:54, Evan Preston wrote: > >>>>>>>> On 2023-10-20 Fri 05:48pm, Huacai Chen wrote: > >>>>>>>>> On Fri, Oct 20, 2023 at 5:35=E2=80=AFPM Linux regression tracki= ng (Thorsten > >>>>>>>>> Leemhuis) wrote: > >>>>>>>>>> On 09.10.23 10:54, Huacai Chen wrote: > >>>>>>>>>>> On Mon, Oct 9, 2023 at 4:45=E2=80=AFPM Bagas Sanjaya wrote: > >>>>>>>>>>>> On Mon, Oct 09, 2023 at 09:27:02AM +0800, Huacai Chen wrote: > >>>>>>>>>>>>> On Tue, Sep 26, 2023 at 10:31=E2=80=AFPM Huacai Chen wrote: > >>>>>>>>>>>>>> On Tue, Sep 26, 2023 at 7:15=E2=80=AFPM Linux regression t= racking (Thorsten > >>>>>>>>>>>>>> Leemhuis) wrote: > >>>>>>>>>>>>>>> On 13.09.23 14:02, Jaak Ristioja wrote: > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Upgrading to Linux 6.5 on a Lenovo ThinkPad L570 (Integr= ated Intel HD > >>>>>>>>>>>>>>>> Graphics 620 (rev 02), Intel(R) Core(TM) i7-7500U) resul= ts in a blank > >>>>>>>>>>>>>>>> screen after boot until the display manager starts... if= it does start > >>>>>>>>>>>>>>>> at all. Using the nomodeset kernel parameter seems to be= a workaround. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I've bisected this to commit 60aebc9559492cea6a9625f514a= 8041717e3a2e4 > >>>>>>>>>>>>>>>> ("drivers/firmware: Move sysfb_init() from device_initca= ll to > >>>>>>>>>>>>>>>> subsys_initcall_sync"). > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> As confirmed by Jaak, disabling DRM_SIMPLEDRM makes things = work fine > >>>>>>>>>>>>> again. So I guess the reason: > >>>>>>>>>> > >>>>>>>>>> Well, this to me still looks a lot (please correct me if I'm w= rong) like > >>>>>>>>>> regression that should be fixed, as DRM_SIMPLEDRM was enabled = beforehand > >>>>>>>>>> if I understood things correctly. Or is there a proper fix for= this > >>>>>>>>>> already in the works and I just missed this? Or is there some = good > >>>>>>>>>> reason why this won't/can't be fixed? > >>>>>>>>> > >>>>>>>>> DRM_SIMPLEDRM was enabled but it didn't work at all because the= re was > >>>>>>>>> no corresponding platform device. Now DRM_SIMPLEDRM works but i= t has a > >>>>>>>>> blank screen. Of course it is valuable to investigate further a= bout > >>>>>>>>> DRM_SIMPLEDRM on Jaak's machine, but that needs Jaak's effort b= ecause > >>>>>>>>> I don't have a same machine. > >>>>>>> > >>>>>>> Side note: Huacai, have you tried working with Jaak to get down t= o the > >>>>>>> real problem? Evan, might you be able to help out here? > >>>>>> No, Jaak has no response after he 'fixed' his problem by disabling= SIMPLEDRM. > >>>>>> > >>>>> > >>>>> I'm sorry, what was it exactly you want me to do? Please be mindful= that > >>>>> I'm not familiar with the internals of the Linux kernel and DRI, an= d it > >>>>> might sometimes take weeks before I have time to work and respond o= n this. > >>>> It doesn't matter. I hope you can do some experiments to investigate > >>>> deeper. The first experiment you can do is enabling SIMPLEFB (i.e. > >>>> CONFIG_FB_SIMPLE) instead of SIMPLEDRM (CONFIG_DRM_SIMPLEDRM) to see > >>>> whether there is also a blank screen. If no blank screen, that > >>>> probably means SIMPLEDRM has a bug, if still blank screen, that mean= s > >>>> the firmware may pass wrong screen information. > >>> > >>> Testing with 6.5.9 I get a blank screen with CONFIG_DRM_SIMPLEDRM=3Dy= and > >>> get no blank screen with CONFIG_FB_SIMPLE=3Dy and CONFIG_DRM_SIMPLEDR= M unset. > >> CONFIG_FB_SIMPLE and CONFIG_DRM_SIMPLEDRM use the same device created > >> by sysfb_init(). Since FB_SIMPLE works fine, I think the real problem > >> is that DRM_SIMPLEDRM has a bug. The next step is to enable > >> CONFIG_DRM_SIMPLEDRM and trace its initialization. In detail, adding > >> some printk() in simpledrm_probe() and its sub-routines to see where > >> the driver fails. The output of these printk() can be seen by the > >> 'dmesg' command after boot. > > I need your help. I tried with my laptop (ThinkPad E490, Intel Core > > i3-8145U, UHD Graphics 620) but I can't reproduce your problem. So > > please patch your 6.5.x kernel with this temporary patch [1], then > > build a "bad kernel" with SIMPLEDRM enabled. And after booting your > > machine with this "bad kernel", please give me the dmesg output. Thank > > you very much. > > > > [1] http://ddns.miaomiaomiao.top:9000/download/kernel/patch-6.5.9 > > I'm unable to download it. Can you please send it by e-mail? I'm sorry, please download from attachment. Huacai > > Jaak > > > > > > > Huacai > > > >> > >> Huacai > >> > >>> > >>> Jaak > >>> > >>>> > >>>> Huacai > >>>> > >>>>> > >>>>> Jaak > >>>>> > >>>>>>> > >>>>>>> But I write this mail for a different reason: > >>>>>>> > >>>>>>>> I am having the same issue on a Lenovo Thinkpad P70 (Intel > >>>>>>>> Corporation HD Graphics 530 (rev 06), Intel(R) Core(TM) i7-6700H= Q). > >>>>>>>> Upgrading from Linux 6.4.12 to 6.5 and later results in only a b= lank > >>>>>>>> screen after boot and a rapidly flashing device-access-status > >>>>>>>> indicator. > >>>>>>> > >>>>>>> This additional report makes me wonder if we should revert the cu= lprit > >>>>>>> (60aebc9559492c ("drivers/firmware: Move sysfb_init() from > >>>>>>> device_initcall to subsys_initcall_sync") [v6.5-rc1]). But I gues= s that > >>>>>>> might lead to regressions for some users? But the patch descripti= on says > >>>>>>> that this is not a common configuration, so can we maybe get away= with that? > >>>>>> From my point of view, this is not a regression, 60aebc9559492c > >>>>>> doesn't cause a problem, but exposes a problem. So we need to fix = the > >>>>>> real problem (SIMPLEDRM has a blank screen on some conditions). Th= is > >>>>>> needs Jaak or Evan's help. > >>>>>> > >>>>>> Huacai > >>>>>>> > >>>>>>> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracke= r' hat) > >>>>>>> -- > >>>>>>> Everything you wanna know about Linux kernel regression tracking: > >>>>>>> https://linux-regtracking.leemhuis.info/about/#tldr > >>>>>>> If I did something stupid, please tell me, as explained on that p= age. > >>>>>>> > >>>>>>>>>>>>> When SIMPLEDRM takes over the framebuffer, the screen is bl= ank (don't > >>>>>>>>>>>>> know why). And before 60aebc9559492cea6a9625f ("drivers/fir= mware: Move > >>>>>>>>>>>>> sysfb_init() from device_initcall to subsys_initcall_sync")= there is > >>>>>>>>>>>>> no platform device created for SIMPLEDRM at early stage, so= it seems > >>>>>>>>>>>>> also "no problem". > >>>>>>>>>>>> I don't understand above. You mean that after that commit th= e platform > >>>>>>>>>>>> device is also none, right? > >>>>>>>>>>> No. The SIMPLEDRM driver needs a platform device to work, and= that > >>>>>>>>>>> commit makes the platform device created earlier. So, before = that > >>>>>>>>>>> commit, SIMPLEDRM doesn't work, but the screen isn't blank; a= fter that > >>>>>>>>>>> commit, SIMPLEDRM works, but the screen is blank. > >>>>>>>>>>> > >>>>>>>>>>> Huacai > >>>>>>>>>>>> > >>>>>>>>>>>> Confused... > >>>>>>>>>>>> > >>>>>>>>>>>> -- > >>>>>>>>>>>> An old man doll... just what I always wanted! - Clara > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>> > >>> > --0000000000002c605e06092aaaa3 Content-Type: application/octet-stream; name="patch-6.5.9" Content-Disposition: attachment; filename="patch-6.5.9" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_loh69tyi0 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvZmlybXdhcmUvc3lzZmIuYyBiL2RyaXZlcnMvZmlybXdhcmUv c3lzZmIuYwppbmRleCA4MmZjZmQyOWIuLjVmMjlhYjJiYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9m aXJtd2FyZS9zeXNmYi5jCisrKyBiL2RyaXZlcnMvZm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