]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gtt: Relax pd_used assertion
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 20 Aug 2019 14:12:18 +0000 (15:12 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 20 Aug 2019 14:32:39 +0000 (15:32 +0100)
commitc1c4b4ba19004e11e97b8f62b591a0afee16d4de
treec74df13d28e4d0d8e63f38b40dabd5582680346c
parentadb52327b75abc1a9ec9a9866bfe6fe5d9187a8c
drm/i915/gtt: Relax pd_used assertion

The current assertion tries to make sure that we do not over count the
number of used PDE inside a page directory -- that is with an array of
512 pde, we do not expect more than 512 elements used! However, our
assertion has to take into account that as we pin an element into the
page directory, the caller first pins the page directory so the usage
count is one higher. However, this should be one extra pin per thread,
and the upper bound is that we may have one thread for each entry.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190820141218.14714-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c