]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/i915_drv.h
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)
commit11be49eb4db24c5e971edef160afb87788cc270c
treee06633e44d1cf4083e6dbcf39c5fc23dc0e39a28
parented2f3452677e46a4270c25c1b7fa3e060fdd501e
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