• Jesse Barnes's avatar
    drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12 · d978ef14
    Jesse Barnes authored
    Retrieve current framebuffer config info from the regs and create an fb
    object for the buffer the BIOS or boot loader left us.  This should
    allow for smooth transitions to userspace apps once we finish the
    initial configuration construction.
    
    v2: check for non-native modes and adjust (Jesse)
        fixup aperture and cmap frees (Imre)
        use unlocked unref if init_bios fails (Jesse)
        fix curly brace around DSPADDR check (Imre)
        comment failure path for pin_and_fence (Imre)
    v3: fixup fixup of aperture frees (Chris)
    v4: update to current bits (locking & pin_and_fence hack) (Jesse)
    v5: move fb config fetch to display code (Jesse)
        re-order hw state readout on initial load to suit fb inherit (Jesse)
        re-add pin_and_fence in fbdev code to make sure we refcount properly (Je
    v6: rename to plane_config (Daniel)
        check for valid object when initializing BIOS fb (Jesse)
        split from plane_config readout and other display changes (Jesse)
        drop use_bios_fb option (Chris)
        update comments (Jesse)
        rework fbdev_init_bios for clarity (Jesse)
        drop fb obj ref under lock (Chris)
    v7: use fb object from plane_config instead (Ville)
        take ref on fb object (Jesse)
    v8: put under i915_fastboot option (Jesse)
        fix fb ptr checking (Jesse)
        inform drm_fb_helper if we fail to enable a connector (Jesse)
        drop unnecessary enabled[] modifications in failure cases (Chris)
        split from BIOS connector config readout (Daniel)
        don't memset the fb buffer if preallocated (Chris)
        alloc ifbdev up front and pass to init_bios (Chris)
        check for bad ifbdev in restore_mode too (Chris)
    v9: fix up !fastboot bpp setting (Jesse)
        fix up !fastboot helper alloc (Jesse)
        make sure BIOS fb is sufficient for biggest active pipe (Jesse)
    v10:fix up size calculation for proposed fbs (Chris)
        go back to two pass pipe fb assignment (Chris)
        add warning for active pipes w/o fbs (Chris)
        clean up num_pipes checks in fbdev_init and fbdev_restore_mode (Chris)
        move i915.fastboot into fbdev_init (Chris)
    v11:make BIOS connector config usage unconditional (Daniel)
    v12:fix up fb vs pipe size checking (Chris)
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    d978ef14
intel_display.c 329 KB