Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1264352

[PATCH 3.10 09/24] drm/nouveau/gem: return only valid domain when theres only one

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 3.10 09/24] drm/nouveau/gem: return only valid domain when theres only one
Date 2015-11-06 20:50 +0100
Message-ID <qrVbm-k7-89@gated-at.bofh.it> (permalink)
References <qrVbj-k7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ilia Mirkin <imirkin@alum.mit.edu>

commit 2a6c521bb41ce862e43db46f52e7681d33e8d771 upstream.

On nv50+, we restrict the valid domains to just the one where the buffer
was originally created. However after the buffer is evicted to system
memory, we might move it back to a different domain that was not
originally valid. When sharing the buffer and retrieving its GEM_INFO
data, we still want the domain that will be valid for this buffer in a
pushbuf, not the one where it currently happens to be.

This resolves fdo#92504 and several others. These are due to suspend
evicting all buffers, making it more likely that they temporarily end up
in the wrong place.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92504
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/nouveau/nouveau_gem.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -177,11 +177,12 @@ nouveau_gem_info(struct drm_file *file_p
 	struct nouveau_bo *nvbo = nouveau_gem_object(gem);
 	struct nouveau_vma *vma;
 
-	if (nvbo->bo.mem.mem_type == TTM_PL_TT)
+	if (is_power_of_2(nvbo->valid_domains))
+		rep->domain = nvbo->valid_domains;
+	else if (nvbo->bo.mem.mem_type == TTM_PL_TT)
 		rep->domain = NOUVEAU_GEM_DOMAIN_GART;
 	else
 		rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
-
 	rep->offset = nvbo->bo.offset;
 	if (cli->base.vm) {
 		vma = nouveau_bo_vma_find(nvbo, cli->base.vm);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.10 00/24] 3.10.93-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 08/24] mm: make sendfile(2) killable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 16/24] xhci: handle no ping response error properly Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 15/24] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 11/24] rbd: dont leak parent_spec in rbd_dev_probe_parent() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 17/24] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 14/24] dm btree remove: fix a bug when rebalancing nodes after removal Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 20/24] md/raid1: submit_bio_wait() returns 0 on success Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 06/24] ASoC: wm8904: Correct number of EQ registers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 05/24] powerpc/rtas: Validate rtas.entry before calling enter_rtas() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 07/24] x86/setup: Extend low identity map to cover whole kernel range Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 13/24] Revert "ARM64: unwind: Fix PC calculation" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 09/24] drm/nouveau/gem: return only valid domain when theres only one Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 04/24] iommu/amd: Dont clear DTE flags when modifying it Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 20:50 +0100
  [PATCH 3.10 01/24] ath9k: declare required extra tx headroom Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 21:00 +0100
  [PATCH 3.10 10/24] rbd: require stable pages if message data CRCs are enabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-11-06 21:00 +0100
  Re: [PATCH 3.10 00/24] 3.10.93-stable review Guenter Roeck <linux@roeck-us.net> - 2015-11-07 02:50 +0100
  Re: [PATCH 3.10 00/24] 3.10.93-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-11-07 04:00 +0100

csiph-web