Simpledrm driver conflicts with i915drmfb resulting in black screen on TTY
If CONFIG_DRM_SIMPLEDRM=Y is being build into the kernel, i915drmfb will not be able to attach and creates instead a new framebuffer device, which results in having a black screen on TTY. Only after X11 is being started, video output starts in this case.
This can be only reproduced, if all options are build into kernel and not used as a module.
From what I understand, this seems to be some timing issue, as the driver tried (to late?) to attach to simpledrm and fails as a result.
This issue has been also reported on the mailing list some time ago, but AFAIK, without commting any fix for this issue. See 1 for more information.
The following patch fixes the issue for me, but I understand, that this is not really a fix, but instead, i915drmfb must be fixed. This goes beyong my knowledge. You can see, where it fails, that i915drmfb is being registered as a second framebuffer fb1 instead attaching (or taking over?) to fb0.
---
drivers/gpu/drm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 8e1bde059170..db0f3d3aff43 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -141,6 +141,7 @@ obj-y += arm/
obj-y += display/
obj-$(CONFIG_DRM_TTM) += ttm/
obj-$(CONFIG_DRM_SCHED) += scheduler/
+obj-y += tiny/
obj-$(CONFIG_DRM_RADEON)+= radeon/
obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
obj-$(CONFIG_DRM_AMDGPU)+= amd/amdxcp/
@@ -182,7 +183,6 @@ obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/
obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/
obj-y += hisilicon/
obj-y += mxsfb/
-obj-y += tiny/
obj-$(CONFIG_DRM_PL111) += pl111/
obj-$(CONFIG_DRM_TVE200) += tve200/
obj-$(CONFIG_DRM_XEN) += xen/
--
2.39.3
Steps to reproduce:
- I am using a Lenovo ThinkPad X260 (Intel HD Graphics 520)
- Build kernel with CONFIG_DRM_SIMPLEDRM=Y, CONFIG_FB_SIMPLE=N and CONFIG_DRM_I915=Y
- Note: All options are build into kernel, no modules are being used.
WORKS: (CONFIG_DRM_SIMPLEDRM=N && CONFIG_FB_SIMPLE=Y) + i915drmfb
[ 5.192071] signal: max sigframe size: 2032
[ 6.118531] simple-framebuffer simple-framebuffer.0: framebuffer at 0xc0000000, 0x7e9000 bytes
[ 6.118538] simple-framebuffer simple-framebuffer.0: format=x8r8g8b8, mode=1920x1080x32, linelength=7680
[ 6.118647] Console: switching to colour frame buffer device 240x67
[ 6.120312] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!
[ 6.243506] ACPI: bus type drm_connector registered
[ 6.246546] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
[ 6.291369] i915 0000:00:02.0: [drm] [CONNECTOR:95:eDP-1] Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=3. needs this, please file a _new_ bug report on drm/i915, see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
[ 6.296213] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/skl_guc_70.1.1.bin version 70.1.1
[ 6.296226] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/skl_huc_2.0.0.bin version 2.0.0
[ 6.320862] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[ 6.320871] i915 0000:00:02.0: [drm] GT0: GUC: submission disabled
[ 6.320876] i915 0000:00:02.0: [drm] GT0: GUC: SLPC disabled
[ 7.453615] [drm] Initialized i915 1.6.0 20230929 for 0000:00:02.0 on minor 0
[ 7.687462] Console: switching to colour frame buffer device 240x67
[ 7.710428] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
FAILS: (CONFIG_DRM_SIMPLEDRM=Y && CONFIG_FB_SIMPLE=N) + i915drmfb
[ 5.196592] signal: max sigframe size: 2032
[ 6.273759] ACPI: bus type drm_connector registered
[ 6.276808] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
[ 6.321368] i915 0000:00:02.0: [drm] [CONNECTOR:95:eDP-1] Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=3. needs this, please file a _new_ bug report on drm/i915, see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
[ 6.326166] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/skl_guc_70.1.1.bin version 70.1.1
[ 6.326180] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/skl_huc_2.0.0.bin version 2.0.0
[ 6.350859] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[ 6.350869] i915 0000:00:02.0: [drm] GT0: GUC: submission disabled
[ 6.350874] i915 0000:00:02.0: [drm] GT0: GUC: SLPC disabled
[ 7.483519] [drm] Initialized i915 1.6.0 20230929 for 0000:00:02.0 on minor 0
[ 7.486391] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 1
[ 7.494265] Console: switching to colour frame buffer device 240x67
[ 7.497113] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[ 7.698921] i915 0000:00:02.0: [drm] fb1: i915drmfb frame buffer device
WORKS WITH PATCH: (CONFIG_DRM_SIMPLEDRM=Y && CONFIG_FB_SIMPLE=N) + i915drmfb
[ 5.189922] signal: max sigframe size: 2032
[ 6.263680] ACPI: bus type drm_connector registered
[ 6.264141] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
[ 6.273070] Console: switching to colour frame buffer device 240x67
[ 6.277028] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[ 6.289748] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
[ 6.341361] i915 0000:00:02.0: [drm] [CONNECTOR:95:eDP-1] Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=3. needs this, please file a _new_ bug report on drm/i915, see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
[ 6.346164] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/skl_guc_70.1.1.bin version 70.1.1
[ 6.346179] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/skl_huc_2.0.0.bin version 2.0.0
[ 6.370842] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[ 6.370874] i915 0000:00:02.0: [drm] GT0: GUC: submission disabled
[ 6.370879] i915 0000:00:02.0: [drm] GT0: GUC: SLPC disabled
[ 7.513631] [drm] Initialized i915 1.6.0 20230929 for 0000:00:02.0 on minor 1
[ 7.748134] Console: switching to colour frame buffer device 240x67
[ 7.769844] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device