i915n: a display device without a display instead of a NULL display #17
Loading…
Reference in a new issue
No description provided.
Delete branch "x230-nodisplay-device"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The headless i915n build stubbed
intel_display_device_probe()to return NULL, soi915->displaywas NULL. Linux never has a NULLi915->display: a device without a display gets a display structure whose device info is the emptyno_display, and code outsidedisplay/reads it through macros and inlines.The first attach on real hardware (ThinkPad X230, HD 4000
8086:0166, illumos2053dc3e46) panicked on the first of them:The generated stub now does what Linux's
no_displaycase does: it allocates the structure, sets thedrmandparentback pointers and points the device info at an emptyno_display, so everyDISPLAY_INFO/DISPLAY_RUNTIME_INFOquestion (HAS_DISPLAY,DISPLAY_VER,has_fpga_dbg, ...) answers "no display".intel_display_device_remove()frees it.i915_nodisplay.cis regenerated withgen-nodisplay.pyagainst the pinned, patched tree; the unchanged generator reproduces the committed file.A survey of the 157 compiled TUs found no other direct dereference outside macros and inlines: every other use passes
displayto stubbed display functions. No glue relied on a NULL display.Tested on the X230 (together with the other x230-* fixes, branch
x230-test): the probe passesintel_uncore_init_mmio(), GGTT (2 GiB), stolen memory (64 MiB), GT and engine setup; i915n attaches,/dev/dri/card0andrenderD128exist, Mesa crocus renders on the render node. Build: oibuild, 157/157 TUs,-z defs0 unresolved.