1. 31 1月, 2013 1 次提交
  2. 18 12月, 2012 1 次提交
    • D
      drm/i915: fixup overlay stolen memory leak · 4d7bb011
      Daniel Vetter 提交于
      We need to clean up the overlay first, before taking down the
      stolen memory allocator.
      
      This regression has been introducec in
      
      commit 80405138
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Nov 15 11:32:29 2012 +0000
      
          drm/i915: Allocate overlay registers from stolen memory
      
      v2: Rework the patch a bit as suggested by Chris Wilson:
      - move the overlay teardown up, into the modeset cleanup
      - move the stolen mm takedown into i915_gem_cleanup_stolen
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4d7bb011
  3. 01 12月, 2012 4 次提交
    • C
      drm/i915: Use a slab for object allocation · 42dcedd4
      Chris Wilson 提交于
      The primary purpose of this was to debug some use-after-free memory
      corruption that was causing an OOPS inside drm/i915. As it turned out
      the corruption was being caused elsewhere and i915.ko as a major user of
      many objects was being hit hardest.
      
      Indeed as we do frequent the generic kmalloc caches, dedicating one to
      ourselves (or at least naming one for us depending upon the core) aids
      debugging our own slab usage.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      42dcedd4
    • C
      drm/i915: Introduce i915_gem_object_create_stolen() · 0104fdbb
      Chris Wilson 提交于
      Allow for the creation of GEM objects backed by stolen memory. As these
      are not backed by ordinary pages, we create a fake dma mapping and store
      the address in the scatterlist rather than obj->pages.
      
      v2: Mark _i915_gem_object_create_stolen() as static, as noticed by Jesse
      Barnes.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0104fdbb
    • C
      drm/i915: Delay allocation of stolen space for FBC · 11be49eb
      Chris Wilson 提交于
      As FBC is commonly disabled due to limitations of the chipset upon
      output configurations, on many systems FBC is never enabled. For those
      systems, it is advantageous to make use of the stolen memory for other
      objects and so we defer allocation of the FBC chunk until we actually
      require it. This increases the likelihood of that allocation failing,
      but that in turns means that we are already taking advantage of the
      stolen memory!
      
      As well as delaying the allocation from driver initialisation until the
      first use of FBC, we also return the stolen block after we finish using
      it - allowing greater flexibility in our usage of stolen space. A side
      effect of this is that we can then attempt to allocate only the required
      amount of space (with a little slack to reduce reallocation rate and
      avoid fragmentation).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      11be49eb
    • C
      drm/i915: Fix detection of base of stolen memory · e12a2d53
      Chris Wilson 提交于
      The routine to query the base of stolen memory was using the wrong
      registers and the wrong encodings on virtually every platform.
      
      It was not until the G33 refresh, that a PCI config register was
      introduced that explicitly said where the stolen memory was. Prior to
      865G there was not even a register that said where the end of usable
      low memory was and where the stolen memory began (or ended depending
      upon chipset). Before then, one has to look at the BIOS memory maps to
      find the Top of Memory. Alas that is not exported by arch/x86 and so we
      have to resort to disabling stolen memory on gen2 for the time being.
      
      Then SandyBridge enlarged the PCI register to a full 32-bits and change
      the encoding of the address, so even though we happened to be querying
      the right register, we read the wrong bits and ended up using address 0
      for our stolen data, i.e. notably FBC.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e12a2d53
  4. 03 10月, 2012 2 次提交
  5. 03 5月, 2012 1 次提交