Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/i915: assign intel_gtt->vma_ops.set/clear_pages in gen6_gmch_probe
Fixes the following issue on Haswell: [ 38.442136] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 38.450485] #PF: supervisor instruction fetch in kernel mode [ 38.456171] #PF: error_code(0x0010) - not-present page [ 38.462750] PGD 0 P4D 0 [ 38.465317] Oops: 0010 [#1] SMP NOPTI [ 38.469035] CPU: 1 PID: 4450 Comm: modprobe Tainted: G OE 5.10.55+ #69057 [ 38.477136] Hardware name: Gigabyte Technology Co., Ltd. Z87N-WIFI/Z87N-WIFI, BIOS F6 08/12/2014 [ 38.486024] RIP: 0010:0x0 [ 38.488683] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. [ 38.495622] RSP: 0018:ffffc9000064f9f8 EFLAGS: 00010246 [ 38.500909] RAX: 0000000000000000 RBX: ffff88810f7d0000 RCX: 0000000000001000 [ 38.508101] RDX: ffff888101153c00 RSI: 0000000000000527 RDI: ffff88810f7d0000 [ 38.515302] RBP: 0000000000000000 R08: 000000ffffffffff R09: 0000000000000000 [ 38.522512] R10: 0000000101aebfff R11: 0000000000000000 R12: ffff88810f7d01c0 [ 38.529716] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000400 [ 38.536926] FS: 00007f4b7c453740(0000) GS:ffff888401a80000(0000) knlGS:0000000000000000 [ 38.545064] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 38.550888] CR2: ffffffffffffffd6 CR3: 000000010f4be002 CR4: 00000000001706e0 [ 38.558099] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 38.565302] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 38.572503] Call Trace: [ 38.575203] [<ffffffffa0281df5>] vma_get_pages+0x95/0x130 [i915] [ 38.582755] [<ffffffffa0284360>] ? i915_vma_pin_ww+0x370/0x9e0 [i915] [ 38.590526] [<ffffffff81226992>] ? __kmalloc+0x142/0x2e0 [ 38.596166] [<ffffffffa0284b24>] ? i915_ggtt_pin_for_gt+0x154/0x200 [i915] [ 38.604560] [<ffffffffa0218a5b>] ? intel_gt_init+0xab/0x930 [i915] [ 38.612298] [<ffffffffa01dde6e>] ? fwtable_read32+0x8e/0x210 [i915] [ 38.620072] [<ffffffffa01dd819>] ? gen6_write32+0x59/0x1e0 [i915] [ 38.627761] [<ffffffffa02772f8>] ? i915_gem_init+0x208/0x280 [i915] [ 38.635535] [<ffffffffa01b3a24>] ? i915_driver_probe+0x14f4/0x1d70 [i915] [ 38.643740] [<ffffffff8145360f>] ? create_pinctrl+0x2f/0x430 [ 38.649691] [<ffffffffa01c179b>] ? i915_pci_probe+0x9b/0x3d0 [i915] [ 38.657358] [<ffffffff8147062e>] ? local_pci_probe+0x3e/0x70 [ 38.663149] [<ffffffff814716f1>] ? pci_device_probe+0xd1/0x180 [ 38.669126] [<ffffffff81533c4d>] ? really_probe+0xed/0x420 [ 38.674783] [<ffffffff8153424e>] ? driver_probe_device+0x4e/0xa0 [ 38.680919] [<ffffffff81534521>] ? device_driver_attach+0xa1/0xb0 [ 38.687183] [<ffffffff81534530>] ? device_driver_attach+0xb0/0xb0 [ 38.693431] [<ffffffff815345a2>] ? __driver_attach+0x72/0x100 [ 38.699308] [<ffffffff81534530>] ? device_driver_attach+0xb0/0xb0 [ 38.705548] [<ffffffff81531aa1>] ? bus_for_each_dev+0x61/0x90 [ 38.711458] [<ffffffff81532faf>] ? bus_add_driver+0x10f/0x1c0 [ 38.717352] [<ffffffff81534e59>] ? driver_register+0x89/0xd0 [ 38.723329] [<ffffffffa047c033>] ? __init_backport+0x33/0x8c [i915] [ 38.730959] [<ffffffffa047c000>] ? 0xffffffffa047c000 [ 38.736151] [<ffffffff81000bfd>] ? do_one_initcall+0x3d/0x1c0 [ 38.742043] [<ffffffff810ff5d2>] ? do_init_module+0x22/0x250 [ 38.747869] [<ffffffff81227b5e>] ? kmem_cache_alloc_trace+0x12e/0x2a0 [ 38.754453] [<ffffffff810ff60a>] ? do_init_module+0x5a/0x250 [ 38.760268] [<ffffffff811023f8>] ? __do_sys_finit_module+0x88/0xb0 [ 38.766627] [<ffffffff81787853>] ? do_syscall_64+0x33/0x40 [ 38.772267] [<ffffffff8180007c>] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
- Loading branch information
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PeterSuh-Q3 plz try this test build on haswell https://github.com/MoetaYuko/intel-gpu-i915-backports/actions/runs/6966190384
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moetayuko
This is Haswell's log tested again with this release version.
[ 36.871436] DMABUF-COMPAT BACKPORTED INIT
[ 36.876531] DMAHEAP BACKPORTED INIT
[ 36.881437] Loading dma-buf modules backported from I915-23.8.20
[ 36.888913] DMA BUF backport generated by backports.git RHEL_88_23.8.20_PSB_230810.24
[ 36.901412] [drm] DRM BACKPORTED INIT
[ 36.908514] [drm] DRM_KMS_HELPER BACKPORTED INIT
[ 36.914814] I915 COMPAT BACKPORTED INIT
[ 36.918800] Loading I915 modules backported from I915-23.8.20
[ 36.926005] I915 Backport generated by backports.git RHEL_88_23.8.20_PSB_230810.24
[ 36.956172] [drm] I915 BACKPORTED INIT
[ 36.961876] i915 0000:00:02.0: [drm] GT count: 1, enabled: 1
[ 36.968428] i915 0000:00:02.0: [drm] VT-d active for gfx access
[ 36.976101] type mismatch for e0000000,10000000 old: write-back new: write-combining
[ 36.984854] Failed to add WC MTRR for [00000000ca4cd3dc-00000000d9920a98]; performance may suffer.
[ 36.984903] i915 0000:00:02.0: [drm] Transparent Hugepage support is recommended for optimal performance when IOMMU is enabled!
[ 37.006974] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory
[ 37.017187] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 37.044276] BUG: kernel NULL pointer dereference, address: 00000000000000f8
[ 37.051836] #PF: supervisor read access in kernel mode
[ 37.057026] #PF: error_code(0x0000) - not-present page
[ 37.062217] PGD 0 P4D 0
[ 37.064777] Oops: 0000 [#1] SMP NOPTI
[ 37.068486] CPU: 3 PID: 4426 Comm: modprobe Tainted: G OE 5.10.55+ #69057
[ 37.076569] Hardware name: Gigabyte Technology Co., Ltd. Z87N-WIFI/Z87N-WIFI, BIOS F6 08/12/2014
[ 37.085647] RIP: 0010:i915_init_ggtt+0x42b/0x640 [i915]
[ 37.090948] Code: 00 0f 82 df 00 00 00 48 8d 75 b0 48 89 c7 e8 8c 5b 01 00 41 89 c4 85 c0 0f 85 ce 00 00 00 48 8b 83 38 04 00 00 31 f6 4c 8b 20 <49> 8b bc 24 f8 00 00 00 e8 28 26 57 e1 83 f8 8e 0f 84 01 01 00 00
[ 37.109918] RSP: 0018:ffffc9000065fb10 EFLAGS: 00010246
[ 37.115222] RAX: ffff888100f31e00 RBX: ffff88810e290800 RCX: ffff88810e308000
[ 37.122443] RDX: ffff88810e31c650 RSI: 0000000000000000 RDI: ffff888107790460
[ 37.129661] RBP: ffffc9000065fb70 R08: 0000000000000060 R09: ffff88810e3b4b00
[ 37.136879] R10: 000000000002e580 R11: ffff88841d5f7000 R12: 0000000000000000
[ 37.144092] R13: ffff88810e308000 R14: ffff88810e301800 R15: 0000000000000001
[ 37.151294] FS: 00007f9114026740(0000) GS:ffff888401b80000(0000) knlGS:0000000000000000
[ 37.159467] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 37.165280] CR2: 00000000000000f8 CR3: 000000010e06e004 CR4: 00000000001706e0
[ 37.172501] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 37.179710] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 37.186930] Call Trace:
[ 37.189616] [] i915_gem_init+0x7f/0x280 [i915]
[ 37.195988] [] ? i915_gem_init+0x7f/0x280 [i915]
[ 37.202473] [] ? i915_driver_probe+0x14f4/0x1d70 [i915]
[ 37.209426] [] ? create_pinctrl+0x2f/0x430
[ 37.215407] [] ? i915_pci_probe+0x9b/0x3d0 [i915]
[ 37.221830] [] ? local_pci_probe+0x3e/0x70
[ 37.227649] [] ? pci_device_probe+0xd1/0x180
[ 37.233649] [] ? really_probe+0xed/0x420
[ 37.239299] [] ? driver_probe_device+0x4e/0xa0
[ 37.245458] [] ? device_driver_attach+0xa1/0xb0
[ 37.251708] [] ? device_driver_attach+0xb0/0xb0
[ 37.257964] [] ? __driver_attach+0x72/0x100
[ 37.263866] [] ? device_driver_attach+0xb0/0xb0
[ 37.270107] [] ? bus_for_each_dev+0x61/0x90
[ 37.276027] [] ? bus_add_driver+0x10f/0x1c0
[ 37.281931] [] ? driver_register+0x89/0xd0
[ 37.287906] [] ? __init_backport+0x33/0x8c [i915]
[ 37.294334] [] ? 0xffffffffa0483000
[ 37.299531] [] ? do_one_initcall+0x3d/0x1c0
[ 37.305433] [] ? do_init_module+0x22/0x250
[ 37.311251] [] ? kmem_cache_alloc_trace+0x12e/0x2a0
[ 37.317851] [] ? do_init_module+0x5a/0x250
[ 37.323666] [] ? __do_sys_finit_module+0x88/0xb0
[ 37.330009] [] ? do_syscall_64+0x33/0x40
[ 37.335648] [] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 37.342768] Modules linked in: i915(OE+) i2c_algo_bit i915_compat(OE) drm_mipi_dsi(OE) intel_gtt(OE) drm_kms_helper(OE) drm(OE) drm_panel_orientation_quirks(OE) hdmi(OE) dmabuf(OE) xhci_pci xhci_hcd usbcore usb_common
[ 37.362269] CR2: 00000000000000f8
[ 37.365697] ---[ end trace f3a4c87981719763 ]---
[ 37.371914] RIP: 0010:i915_init_ggtt+0x42b/0x640 [i915]
[ 37.378405] Code: 00 0f 82 df 00 00 00 48 8d 75 b0 48 89 c7 e8 8c 5b 01 00 41 89 c4 85 c0 0f 85 ce 00 00 00 48 8b 83 38 04 00 00 31 f6 4c 8b 20 <49> 8b bc 24 f8 00 00 00 e8 28 26 57 e1 83 f8 8e 0f 84 01 01 00 00
[ 37.398769] RSP: 0018:ffffc9000065fb10 EFLAGS: 00010246
[ 37.405442] RAX: ffff888100f31e00 RBX: ffff88810e290800 RCX: ffff88810e308000
[ 37.414055] RDX: ffff88810e31c650 RSI: 0000000000000000 RDI: ffff888107790460
[ 37.422661] RBP: ffffc9000065fb70 R08: 0000000000000060 R09: ffff88810e3b4b00
[ 37.431277] R10: 000000000002e580 R11: ffff88841d5f7000 R12: 0000000000000000
[ 37.439853] R13: ffff88810e308000 R14: ffff88810e301800 R15: 0000000000000001
[ 37.447742] FS: 00007f9114026740(0000) GS:ffff888401b80000(0000) knlGS:0000000000000000
[ 37.455922] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 37.461745] CR2: 00000000000000f8 CR3: 000000010e06e004 CR4: 00000000001706e0
[ 37.468965] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 37.476185] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned two days ago, I also tested the i915 on a discharged 11th generation Lenovo Thinkbook upon returning from vacation.
I used this i915.ko modified for Haswell,
In the 11th generation, i915 does not respond at all.
I checked /var/log/linuxrc.syno.log in DSM Junior.
I even copied and mounted the module, but loading does not proceed.
SynologyNAS> cat linuxrc.syno.log | grep i915
i915-compat.ko
i915.ko
./i915/
./i915/pvc_huc_7.8.7.bin
./i915/skl_guc_ver9_33.bin
./i915/cnl_dmc_ver1_06.bin
./i915/pvc_guc_70.9.1.bin
./i915/mtl_gsc_102.0.0.7366.bin
./i915/kbl_dmc_ver1_01.bin
./i915/icl_guc_70.9.1.bin
./i915/bxt_dmc_ver1_07.bin
./i915/dg2_huc_7.10.3_gsc.bin
./i915/dg2_dmc_ver2_07.bin
./i915/skl_dmc_ver1_26.bin
./i915/icl_dmc_ver1_09.bin
./i915/dg1_dmc_ver2_02.bin
./i915/bxt_huc_ver01_07_1398.bin
./i915/kbl_huc_4.0.0.bin
./i915/dg2_guc_70.9.1.bin
./i915/cml_guc_70.9.1.bin
./i915/adls_dmc_ver2_01.bin
./i915/mtl_guc_70.6.8.bin
./i915/kbl_huc_ver02_00_1810.bin
./i915/dg1_huc_7.9.3.bin
./i915/skl_guc_70.9.1.bin
./i915/bxt_huc_2.0.0.bin
./i915/bxt_guc_70.9.1.bin
./i915/cml_huc_4.0.0.bin
./i915/rkl_dmc_ver2_03.bin
./i915/mtl_huc_8.3.7_gsc.bin
./i915/dg1_guc_70.9.1.bin
./i915/mtl_guc_70.9.1.bin
./i915/tgl_guc_70.9.1.bin
./i915/tgl_dmc_ver2_12.bin
./i915/glk_huc_4.0.0.bin
./i915/glk_dmc_ver1_04.bin
./i915/xehpsdv_guc_70.9.1.bin
./i915/ehl_huc_9.0.0.bin
./i915/bxt_guc_ver9_29.bin
./i915/kbl_guc_ver9_39.bin
./i915/adlp_guc_70.9.1.bin
./i915/kbl_guc_70.9.1.bin
./i915/skl_huc_ver01_07_1398.bin
./i915/adlp_dmc_ver2_16.bin
./i915/glk_guc_70.9.1.bin
./i915/icl_huc_9.0.0.bin
./i915/skl_dmc_ver1_27.bin
./i915/ehl_guc_70.9.1.bin
./i915/mtl_dmc_ver2_12.bin
./i915/skl_huc_2.0.0.bin
./i915/tgl_huc_7.9.3.bin
./i915/kbl_dmc_ver1_04.bin
SynologyNAS> lspci -tvnnq
-[0000:00]-+-00.0 Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14]
+-02.0 Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49]
+-04.0 Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03]
+-06.0 Intel Corporation RST VMD Managed Controller [8086:09ab]
+-07.0-[01-2a]--
+-0d.0 Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13]
+-0d.2 Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b]
+-0e.0 Intel Corporation Volume Management Device NVMe RAID Controller [8086:9a0b]
+-14.0 Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed]
+-14.2 Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef]
+-14.3 Intel Corporation Wi-Fi 6 AX201 [8086:a0f0]
+-15.0 Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8]
+-15.3 Intel Corporation Tiger Lake-LP Serial IO I2C Controller #3 [8086:a0eb]
+-16.0 Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0]
+-17.0 Intel Corporation RST VMD Managed Controller [8086:09ab]
+-1d.0-[2b]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]
+-1d.1-[2c]----00.0 O2 Micro, Inc. SD/MMC Card Reader Controller [1217:8621]
+-1f.0 Intel Corporation Tiger Lake-LP LPC Controller [8086:a082]
+-1f.3 Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8]
+-1f.4 Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3]
-1f.5 Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4]
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz try https://github.com/MoetaYuko/intel-gpu-i915-backports/actions/runs/6989196331 on haswell
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you manually insmod? is i915 shown in lsmod after that?
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran modprobe i915 and succeeded in loading the module.
Let's look again for the cause of automatic loading.
SynologyNAS> cd /lib64
SynologyNAS> cd modules
SynologyNAS> ll i915.*
-rw-r--r-- 1 1001 127 5021176 Nov 25 07:34 i915.ko
SynologyNAS> insmod i915.ko
insmod: can't insert 'i915.ko': unknown symbol in module, or unknown parameter
SynologyNAS> modprobe i915
SynologyNAS> lsmod | grep i915
i915 2928640 0
i915_compat 16384 1 i915
drm_mipi_dsi 20480 1 i915,[permanent]
intel_gtt 20480 1 i915
drm_kms_helper 167936 1 i915
drm 376832 3 i915,drm_kms_helper
hdmi 24576 2 i915,drm
dmabuf 61440 5 i915,i915_compat,drm_mipi_dsi,drm_kms_helper,drm
i2c_algo_bit 16384 1 i915
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that there is a problem with ddsml (static module loading), tcrp-mshell's unique module loading method.
After processing the eudev module loading process like rr, we confirmed that the i915 module was loaded properly as shown below.
We will wrap up the issues of the 11th generation to this extent and continue with the testing of the 4th generation.
SynologyNAS> dmesg | grep i915
[ 3.330940] i915 0000:00:02.0: [drm] GT count: 1, enabled: 1
[ 3.331616] i915 0000:00:02.0: [drm] VT-d active for gfx access
[ 3.332729] i915 0000:00:02.0: [drm] Transparent Hugepage support is recommended for optimal performance on this platform!
[ 3.334266] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 3.335546] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12)
[ 3.346839] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.9.1.bin version 70.9.1
[ 3.347321] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3
[ 3.349249] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[3.351040] i915 0000:00:02.0: [drm] GT0: HuC: authenticated!
[ 3.351892] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[ 3.352221] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[ 3.352988] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled
[ 3.355645] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[ 3.356269] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[ 4.523638] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
385ea23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ee27806 works for haswell now.
Thanks @moetayuko !
admin2@SA6400:/$ dmesg | grep i915
[ 39.534015] i915 0000:00:02.0: [drm] GT count: 1, enabled: 1
[ 39.539959] i915 0000:00:02.0: [drm] VT-d active for gfx access
[ 39.554365] i915 0000:00:02.0: [drm] Transparent Hugepage support is recommended for optimal performance when IOMMU is enabled!
[ 39.575059] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory
[ 39.583895] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 39.818261] i915 0000:00:02.0: [drm:add_taint_for_CI [i915]] CI tainted:0x9 by intel_gt_init+0xe1/0x930 [i915]
[ 39.866835] i915 0000:00:02.0: [drm:add_taint_for_CI [i915]] CI tainted:0x9 by i915_gem_init+0x14b/0x280 [i915]
[ 39.883512] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
admin2@SA6400:/$ cd /dev/dri
admin2@SA6400:/dev/dri$