]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/i915: Store a permanent error in obj->mm.pages
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 Mar 2017 13:20:31 +0000 (13:20 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:17:00 +0000 (10:17 +0200)
commitbbb31d7541db32a470cb72a37c617e1f49962ab0
treecb50a54509139f2666c731ca7ab4a6274cdcd83b
parentffd98b12240c617d9b896601e05f3b866bfca1ea
drm/i915: Store a permanent error in obj->mm.pages

BugLink: http://bugs.launchpad.net/bugs/1685140
commit 0d9dc306e15b59bf50db87ebcb1e2248586d4733 upstream.

Once the object has been truncated, it is unrecoverable. To facilitate
detection of this state store the error in obj->mm.pages.

This is required for the next patch which should be applied to v4.10
(via stable), so we also need to mark this patch for backporting. In
that regard, let's consider this to be a fix/improvement too.

v2: Avoid dereferencing the ERR_PTR when freeing the object.

Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307132031.32461-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit 4e5462ee843c883790e9609cf560d88960ea4227)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/i915/i915_gem.c