]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Delay allocation of stolen space for FBC
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Nov 2012 11:32:20 +0000 (11:32 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 30 Nov 2012 22:29:59 +0000 (23:29 +0100)
commit610f394fb26cbc3a03bb642267a1d43b1b3ec4b5
treee06633e44d1cf4083e6dbcf39c5fc23dc0e39a28
parent9f55d997f77c0d1b2f874d40ced574eb080fd8b0
drm/i915: Delay allocation of stolen space for FBC

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: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_stolen.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c