Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading i915kms in ThinkPad X13 Intel Gen2 will hang up. #159

Closed
takawata opened this issue Apr 16, 2022 · 8 comments
Closed

loading i915kms in ThinkPad X13 Intel Gen2 will hang up. #159

takawata opened this issue Apr 16, 2022 · 8 comments
Labels
bug Something isn't working i915 i915 related problems

Comments

@takawata
Copy link

Describe the bug
loading i915kms gets screen blackout. Try it from remote login, it probed that the initialization routine is hanging and did not return from kldload(8).
typing ^Z did not return to prompt, and ^T shows
load: 0x43 cmd:kldload 1762 [running] 8.54r 0.00u 8.50s 58% 2296k intel_ddi_compute_config+0x3f,intel_atomic_check+0x65a, drm_atomic_check_only+0x400, drm_atomic_commit+0x13 intel_modeset_init+0x1e28 i915_driver_probe+0xe39 i915_probe+0x42 linux_pci_attach_device+0x43b device_attach+0x3c3 bus_generic_driver_added+0xa1 devclass_driver_added+0x39 devclass_add_driver+0x13d _linux_pci_register_driver+0xcc i915kms_evh+0x39 module_register_init+0xa4 linker_load_module+0xbad kern_kldload=0x16a sys_kldload+0x5b
FreeBSD version
Paste the output of uname -a
FreeBSD 14.0-CURRENT #12 takawata-wip-n254513-7a473c2ec3b9-dirty: Fri Apr 8 22:
37:25 JST 2022

PCI Info
vgapci0@pci0:0:2:0: class=0x030000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x9a49 subvendor=0x17aa subdevice=0x22d1
vendor = 'Intel Corporation'
device = 'TigerLake-LP GT2 [Iris Xe Graphics]'
class = display
subclass = VGA
DRM KMOD version
master

To Reproduce
loading i915kms.ko

Screenshots
If applicable, add screenshots to help explain your problem.
DSC_0060

Additional context
Add any other context about the problem here.

@takawata
Copy link
Author

takawata commented Apr 18, 2022

The dmesg when the module is loaded is as follows.

iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
drmn0: on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm] Got stolen memory base 0x0, size 0x0
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
lkpi_iic0: on drmn0
iicbus2: on lkpi_iic0
iic2: <I2C generic I/O> on iicbus2
lkpi_iic1: on drmn0
iicbus3: on lkpi_iic1
iic3: <I2C generic I/O> on iicbus3
lkpi_iic2: on drmn0
iicbus4: on lkpi_iic2
iic4: <I2C generic I/O> on iicbus4
lkpi_iic3: on drmn0
iicbus5: on lkpi_iic3
iic5: <I2C generic I/O> on iicbus5
lkpi_iic4: on drmn0
iicbus6: on lkpi_iic4
iic6: <I2C generic I/O> on iicbus6
lkpi_iic5: on drmn0
iicbus7: on lkpi_iic5
iic7: <I2C generic I/O> on iicbus7
lkpi_iic6: on drmn0
iicbus8: on lkpi_iic6
iic8: <I2C generic I/O> on iicbus8
lkpi_iic7: on drmn0
iicbus9: on lkpi_iic7
iic9: <I2C generic I/O> on iicbus9
lkpi_iic8: on drmn0
iicbus10: on lkpi_iic8
iic10: <I2C generic I/O> on iicbus10
[drm] Connector eDP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.eDP-1
[drm] - kern.vt.fb.default_mode
drmn0: successfully loaded firmware image 'i915/tgl_dmc_ver2_06.bin'
drmn0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_06.bin (v2.6)
[drm] Connector HDMI-A-1: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-2
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-3
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-4: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-4
[drm] - kern.vt.fb.default_mode
drmn drmn0: drm_WARN_ON(common_len <= 0)

@evadot
Copy link
Contributor

evadot commented Apr 19, 2022

Did it worked before ?
If yes could you bisect ?
Thanks

@takawata
Copy link
Author

Never. I tried drm-kmod-current ports and did not work , then I try the master .

@evadot
Copy link
Contributor

evadot commented Apr 19, 2022

drmn drmn0: drm_WARN_ON(common_len <= 0) seems to be displayport related.
Can you try without external screen/dock etc ... ?

@takawata
Copy link
Author

I don't connect anything but ethernet cable when I got the message.

@takawata
Copy link
Author

Ignoreing DP initialization after common_len <= 0 then module loading success and seems to X work, though non-X console resolution did not change as usual.

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c

index 70831e738f..7ef06791e8 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2355,7 +2355,10 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
        common_len = intel_dp_common_len_rate_limit(intel_dp,
                                                   intel_dp->max_link_rate);
-
+       if(common_len <= 0)
+       {
+               return -EINVAL;
+       }
       /* No common link rates between source and sink */             
drm_WARN_ON(encoder->base.dev, common_len <= 0);

Xorg.0.log

@evadot evadot added bug Something isn't working i915 i915 related problems labels May 2, 2022
@takawata
Copy link
Author

takawata commented Jan 9, 2023

drm-510-kmod still hang up, This patch is still needed, it seems.

@evadot
Copy link
Contributor

evadot commented Jan 5, 2024

Using 5.15-lts or 6.1-lts will fix this.

@evadot evadot closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working i915 i915 related problems
Projects
None yet
Development

No branches or pull requests

2 participants