git: kernel/apple_gmux: Unbreak loading i915.

Peeter Must peeterm at crater.dragonflybsd.org
Tue Aug 28 06:28:17 PDT 2018


commit 0e1e180184c0a0a318f2c30138422cbb76f13e32
Author: Peeter Must <karu.pruun at gmail.com>
Date:   Tue Aug 28 16:26:05 2018 +0300

    kernel/apple_gmux: Unbreak loading i915.
    
    * Commit 183e2373896e4ea605435a6bd8f943e8273bf8cd broke loading i915
      on Apple MacBookPro laptops with dual GPUs and the gmux chip. The
      reason is that whereas formely drm_init_pdev() and drm_fill_pdev()
      where mere bookkeeping routines, the above commit relocates
      assignment of irq from drm_drv.c:drm_attach() to drm_fill_pdev().
      Since apple_gmux is loaded before i915, and apple_gmux initializes
      a pdev structure including an irq for the graphics pci device, the
      i915 which is loaded afterwards will get zero for an irq and hence
      fails to attach.
    
    * The temporary fix is to disable apple_gmux initializing a pci_dev
      structure for bookkeeping purposes. This is not needed at the
      moment since the primary purpose of apple_gmux is to switch to iGPU
      so the user is not left with a frozen screen after loading i915. We
      do not support switching between GPUs yet.
    
    * When and if the initialization of graphics pci devices becomes
      independent from the drm subsystem, we can make apple_gmux aware of
      the various GPUs in the system.

Summary of changes:
 sys/gnu/dev/misc/apple_gmux/apple-gmux.c | 7 +++++++
 1 file changed, 7 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0e1e180184c0a0a318f2c30138422cbb76f13e32


-- 
DragonFly BSD source repository



More information about the Commits mailing list