Hi, Jaak, On Mon, Mar 18, 2024 at 11:42 PM Jaak Ristioja <jaak@xxxxxxxxxxx> wrote: > > Hi Huacai, > > Uh, no, sorry, I did not get to test such changes. From what Thomas > wrote I presumed that this got fixed and no further action would be > required. > > To speed things up I would appreciate it if you provided a patch. As I > worked around the problem for the end user by changing the kernel > configuration, I have long forgotten the exact details. It would > otherwise probably take me a while to understand what and where you > propose to change exactly. > > Also, do you want me to test it on some newer kernel or should I > re-download the 6.5.# version sources? Yes, it is better to use 6.5, you can simply change the last line of drivers/firmware/sysfb.c to fs_initcall(sysfb_init), So no patch needed. And to Thomas, I'm sorry that reverting 60aebc95594 solve Jaak's problem, but my original problem exist (at least in 6.5), and I want to know the result of the above experiment to understand what happens. Huacai > > > Best regards, > Jaak > > On 18.03.24 16:43, Huacai Chen wrote: > > Hi, Jaak, > > > > I'm still here as a boring man. :) > > Have you ever tested whether using "fs_initcall(sysfb_init)" works > > fine on your machine? > > > > Huacai > > > > On Wed, Jan 24, 2024 at 5:21 AM Jaak Ristioja <jaak@xxxxxxxxxxx> wrote: > >> > >> Hi, > >> > >> I apologize for not finding the time to test this earlier. > >> > >> On 11.12.23 05:08, Huacai Chen wrote: > >>> And Jaak, could you please test with the below patch (but keep the > >>> original order in Makefile) and then give me the dmesg output? > >>> > >>> diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c > >>> index 561be8feca96..cc2e39fb98f5 100644 > >>> --- a/drivers/video/aperture.c > >>> +++ b/drivers/video/aperture.c > >>> @@ -350,21 +350,29 @@ int > >>> aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const > >>> char *na > >>> resource_size_t base, size; > >>> int bar, ret = 0; > >>> > >>> - if (pdev == vga_default_device()) > >>> + printk("DEBUG: remove 1\n"); > >>> + > >>> + if (pdev == vga_default_device()) { > >>> + printk("DEBUG: primary = true\n"); > >>> primary = true; > >>> + } > >>> > >>> - if (primary) > >>> + if (primary) { > >>> + printk("DEBUG: disable sysfb\n"); > >>> sysfb_disable(); > >>> + } > >>> > >>> for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) { > >>> if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) > >>> continue; > >>> > >>> + printk("DEBUG: remove 2\n"); > >>> base = pci_resource_start(pdev, bar); > >>> size = pci_resource_len(pdev, bar); > >>> aperture_detach_devices(base, size); > >>> } > >>> > >>> + printk("DEBUG: remove 3\n"); > >>> /* > >>> * If this is the primary adapter, there could be a VGA device > >>> * that consumes the VGA framebuffer I/O range. Remove this > >>> > >>> [1] https://lore.kernel.org/lkml/170222766284.86103.11020060769330721008@xxxxxxxxxxxxx/T/#u > >> > >> Copy-pasting this from the e-mail body didn't work well, but I applied > >> the changes manually to a 6.5.9 kernel without any of the other patches. > >> Here's the relevant dmesg output on the Lenovo L570: > >> > >> ... > >> [ 2.953405] ACPI: bus type drm_connector registered > >> [ 2.954014] i915 0000:00:02.0: [drm] VT-d active for gfx access > >> [ 2.954018] DEBUG: remove 1 > >> [ 2.954020] DEBUG: remove 2 > >> [ 2.954021] DEBUG: remove 2 > >> [ 2.954023] DEBUG: remove 3 > >> [ 2.954029] resource: resource sanity check: requesting [mem > >> 0x00000000e0000000-0x00000000efffffff], which spans more than BOOTFB > >> [mem 0xe0000000-0xe012bfff] > >> [ 2.954035] caller i915_ggtt_init_hw+0x88/0x120 mapping multiple BARs > >> [ 2.954061] i915 0000:00:02.0: [drm] Using Transparent Hugepages > >> [ 2.955103] Loading firmware: i915/kbl_dmc_ver1_04.bin > >> [ 2.955384] i915 0000:00:02.0: [drm] Finished loading DMC firmware > >> i915/kbl_dmc_ver1_04.bin (v1.4) > >> ... > >> [ 4.145013] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on > >> minor 0 > >> [ 4.147101] ACPI: video: Video Device [GFX0] (multi-head: yes rom: > >> no post: no) > >> [ 4.147244] input: Video Bus as > >> /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4 > >> [ 4.147410] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 1 > >> [ 4.147420] usbcore: registered new interface driver udl > >> [ 4.147500] [drm] Initialized simpledrm 1.0.0 20200625 for > >> simple-framebuffer.0 on minor 2 > >> [ 4.148643] Console: switching to colour frame buffer device 80x30 > >> [ 4.153216] simple-framebuffer simple-framebuffer.0: [drm] fb0: > >> simpledrmdrmfb frame buffer device > >> [ 4.154043] loop: module loaded > >> [ 4.156017] ahci 0000:00:17.0: version 3.0 > >> [ 4.157373] i915 0000:00:02.0: [drm] fb1: i915drmfb frame buffer device > >> ... > >> > >> J > >> >