• C
    drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping · 0c82312f
    Chris Wilson 提交于
    A long time ago (before 3.14) we relied on a permanent pinning of the
    ifbdev to lock the fb in place inside the GGTT. However, the
    introduction of stealing the BIOS framebuffer and reusing its address in
    the GGTT for the fbdev has muddied waters and we use an inherited fb.
    However, the inherited fb is only pinned whilst it is active and we no
    longer have an explicit pin for the info->system_base mmapping used by
    the fbdev. The result is that after some aperture pressure the fbdev may
    be evicted, but we continue to write the fbcon into the same GGTT
    address - overwriting anything else that may be put into that offset.
    The effect is most pronounced across suspend/resume as
    intel_fbdev_set_suspend() does a full clear over the whole scanout.
    
    v2: Only unpin the intel_fb is we allocate it. If we inherit the fb from
    the BIOS, we do not own the pinned vma (except for the reference we add
    in this patch for our access via info->screen_base).
    
    v3: Finish balancing the vma pinning for the normal !preallocated case.
    
    v4: Try to simplify the pinning even further.
    v5: Leak the VMA (cleaned up by object-free) to avoid complicated error paths.
    Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
    Cc: "Goel, Akash" <akash.goel@intel.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    Cc: Lukas Wunner <lukas@wunner.de>
    Cc: drm-intel-fixes@lists.freedesktop.org
    Link: http://patchwork.freedesktop.org/patch/msgid/1449245126-26158-1-git-send-email-chris@chris-wilson.co.ukTested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    0c82312f
intel_fbdev.c 23.3 KB