]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Defer adding preallocated stolen objects to the VM list
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Sep 2015 10:57:45 +0000 (11:57 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 24 Sep 2015 13:56:55 +0000 (15:56 +0200)
commitfd439dabf223214f49cbb09f13a99f4f808feea8
tree2fb0e977a2eeb87389c07922c8ddd34e7d4aa798
parenta54bffcafdf1a057a4b34bff7552258e13e62f37
drm/i915: Defer adding preallocated stolen objects to the VM list

When preallocating a stolen object during early initialisation, we may
be running before we have setup the the global GTT VM state, in
particular before we have initialised the range manager and associated
lists. As this is the case, we defer binding the stolen object until we
call i915_gem_setup_global_gtt(). Not only should we defer the binding,
but we should also defer the VM list manipulation.

Fixes regression uncovered by commit 2af0a5f2899f743a50c6764139f682e73f41fb9a
Author: Michał Winiarski <michal.winiarski@intel.com>
Date:   Wed Sep 16 11:49:00 2015 +0200

    drm/i915/gtt: Do not initialize drm_mm twice.

Whilst I am here remove the duplicate work leaving dangling pointers
from the error path...

v2: Typos galore before coffee.

Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92099
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Tested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_stolen.c