]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Defer assignment of obj->gtt_space until after all possible mallocs
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Nov 2012 13:04:03 +0000 (13:04 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Nov 2012 16:47:13 +0000 (17:47 +0100)
commit2ea62c67cac676190a80549c553915f0ae8c6c41
tree07378203a3fb2e9822256f5b672619f89ef6c7b4
parent325f80943ccb6671f7727dd6532a8b9f5e3b5440
drm/i915: Defer assignment of obj->gtt_space until after all possible mallocs

As we may invoke the shrinker whilst trying to allocate memory to hold
the gtt_space for this object, we need to be careful not to mark the
drm_mm_node as activated (by assigning it to this object) before we
have finished our sequence of allocations.

Note: We also need to move the binding of the object into the actual
pagetables down a bit. The best way seems to be to move it out into
the callsites.

Reported-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Added small note to commit message to summarize review
discussion.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c