]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Only discard backing storage on releasing the last ref
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 May 2014 08:16:52 +0000 (09:16 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 May 2014 13:06:34 +0000 (15:06 +0200)
commite55ccf32260c7e11a9cbd782cd973adeff43ac50
treeee772a48d1320e9f75c09fe278d3887bc70dbf5b
parent2b081df133bd7d1511158313e0c0846fd4f140d5
drm/i915: Only discard backing storage on releasing the last ref

Before purging our pages (as opposed to copying back the contents from
the GPU), make sure that there is not an exposed CPU mmapping through
which the user can inspect the results.

Regression from

commit 7776181dc30aae2b2b1d75dcccc13ba16605d54e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Mar 25 13:23:06 2014 +0000

    drm/i915: Invalidate our pages under memory pressure

Testcase: igt/gem_mmap/new-object
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79005
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Guo Jinxian <jinxianx.guo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c