Project

General

Profile

Actions

Bug #3280

open

KMS console and i915(4) not working in 6.0

Added by cmusser almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Driver
Target version:
Start date:
06/01/2021
Due date:
% Done:

0%

Estimated time:

Description

I have a ThinkPad x220 laptop with i915 integrated graphics that had a working KMS console in 5.8, but in 6.0, it doesn't work anymore. Loading the i915 module causes the screen to stop updating after a couple of initialization messages. The system still runs: I can log into it via SSH, retrieve the logs, recompile kernels and such.

I attached the dmesg logs from both 5.8 and 6.0. In 5.8, you can see it assigning a framebuffer to a CRTC and proceeding normally through startup, whereas in 6.0, all the framebuffers are marked NOFB and eventually you see this error:

WARNING !set->fb failed at /usr/src/sys/dev/drm/drm/../drm_atomic_helper.c:2750

Later, the driver attempts a verification and prints this:

WARNING state->crtc && !state->fb failed at /usr/src/sys/dev/drm/drm/../drm_atomic.c:862
[drm:pid938:drm_atomic_plane_check] CRTC set but no FB

In very general terms, it looks like a framebuffer gets allocated, but never set into a field where it gets read later in the setup process. I read through the drm code and put some tracing statements in various functions to try to understand the execution path.

- At some point in the startup, drm_fb_helper_single_fb_probe() is entered and it uses intelfb_create() to allocate a framebuffer.

- Later, fb_probe() winds up calling restore_fbdev_mode_atomic(), which loops through all the fb_helper struct's crtc_info fields, extracting a drm_mode_set struct.

- The drm_mode_set is passed to __drm_atomic_helper_set_config, which checks to see if the fb field in the drm_mode_set structure is non-NULL, which fails (it is NULL) This results in the warning message mentioned earlier.

- I could only find one place that this fb field was populated, drm_setup_crtcs_fb(), and this function doesn't get called.

- drm_setup_crtcs_fb() is called from two places that I could find: __drm_fb_helper_initial_config_and_unlock() and drm_fb_helper_hotplug_event. That first one doesn't get called, and the second one gets called later, but does not end up calling drm_setup_crtcs_fb().


Files

5.8-dmesg-after (63.7 KB) 5.8-dmesg-after 5.8 dmesg, including after kldload i915 cmusser, 06/01/2021 09:25 AM
6.0-dmesg-after (108 KB) 6.0-dmesg-after 6.0 dmesg, including after kldload i915 cmusser, 06/01/2021 09:25 AM
6.1-messages-truncated (50.9 KB) 6.1-messages-truncated i915-ironlake-successful-drm.debug peeter, 06/06/2021 12:50 AM
6.1-var_log_messages (51.6 KB) 6.1-var_log_messages cmusser, 06/06/2021 01:02 PM
Actions

Also available in: Atom PDF