freebsd / drm-kmod

drm driver for FreeBSD
155 stars 69 forks source link

i915: RCS timing out when being idled #225

Open obiwac opened 1 year ago

obiwac commented 1 year ago

Hi

I initially posted this on the freebsd-current mailing list, before being redirected to this issue tracker.

I'm running what is essentially FreeBSD-CURRENT on an Asus C300 Chromebook (iGPU, gen 7, PCI info below).

Building branch 5.10-lts (or HEAD on master for that matter) of drm-kmod and loading i915kms results in a wedged GPU, after a call to intel_gt_wait_for_idle fails (returns -ETIME, timeout) in __engines_record_defaults in drivers/gpu/drm/i915/gt/intel_gt.c.

It fails waiting for the RCS0 engine; not loading a new context to it (i.e. adding a few if (id == RCS0) continue; lines to ignore it) allows the GPU to continue initialisation without wedging. This isn't ideal though because the RCS ends up unhappy after a bit of load and the GPU hangs (RCS engine crashes) :P

I guess the issues (the wedging and the hang) could be unrelated but I have a strong suspicion they are.

I've been trying to understand how the whole i915 stuff is architectured for a couple days now (Intel's vocabulary is very confusing ngl), but there are a few things I can't really wrap my head around, which leads me asking for help debugging here 😄

Is there anything else I can try in terms of troubleshooting/anyone else I can contact for help? If not I wouldn't really mind attempting to understand everything through-and-through and fix the issue myself, if there was someone I could ask for a couple short explanations on bits of the driver ;)

Last I checked, everything was working well with drm-tip on Linux.

PCI Info

pciconf -lv
hostb0@pci0:0:0:0:  class=0x060000 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f00 subvendor=0x8086 subdevice=0x0f31
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0: class=0x030000 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f31 subvendor=0x8086 subdevice=0x0f31
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx Series Graphics & Display'
    class      = display
    subclass   = VGA
xhci0@pci0:0:20:0:  class=0x0c0330 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f35 subvendor=0x8086 subdevice=0x0f35
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI'
    class      = serial bus
    subclass   = USB
hdac0@pci0:0:27:0:  class=0x040300 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f04 subvendor=0x8086 subdevice=0x0f04
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:28:0:  class=0x060400 rev=0x0e hdr=0x01 vendor=0x8086 device=0x0f48 subvendor=0x8086 subdevice=0x0f48
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor E3800 Series PCI Express Root Port 1'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:  class=0x060100 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f1c subvendor=0x0000 subdevice=0x0000
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx Series Power Control Unit'
    class      = bridge
    subclass   = PCI-ISA
iwm0@pci0:1:0:0:    class=0x028000 rev=0x6b hdr=0x00 vendor=0x8086 device=0x08b1 subvendor=0x8086 subdevice=0xc070
    vendor     = 'Intel Corporation'
    device     = 'Wireless 7260'
    class      = network