Skip to content

Commit

Permalink
drm/i915: assign intel_gtt->vma_ops.set/clear_pages in gen6_gmch_probe
Browse files Browse the repository at this point in the history
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
moetayuko committed Nov 26, 2023
1 parent db0c2d4 commit e765518
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_ggtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,8 @@ static int gen6_gmch_probe(struct i915_ggtt *ggtt)

ggtt->vm.vma_ops.bind_vma = intel_ggtt_bind_vma;
ggtt->vm.vma_ops.unbind_vma = intel_ggtt_unbind_vma;
ggtt->vm.vma_ops.set_pages = ggtt_set_pages;
ggtt->vm.vma_ops.clear_pages = clear_pages;

return ggtt_probe_common(ggtt, size);
}
Expand Down

0 comments on commit e765518

Please sign in to comment.