From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
Subject: [Bug 92504] [NVA5] Corruption in Plasma 5 on resume after
changing screen configuration
Date: Mon, 19 Oct 2015 15:37:32 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1495822365=="
Return-path:
In-Reply-To:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Sender: "Nouveau"
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
List-Id: nouveau.vger.kernel.org
--===============1495822365==
Content-Type: multipart/alternative; boundary="1445269051.F4cF2.8335"; charset="UTF-8"
--1445269051.F4cF2.8335
Date: Mon, 19 Oct 2015 15:37:31 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=92504
--- Comment #20 from Ilia Mirkin ---
[ 210.490188] nouveau 0000:01:00.0: plasmashell[3176]: bo valid domains: 2
[ 210.490193] nouveau 0000:01:00.0: plasmashell[3176]: valid domains: 4
[ 210.490195] nouveau 0000:01:00.0: plasmashell[3176]: read domains: 0
[ 210.490197] nouveau 0000:01:00.0: plasmashell[3176]: write domains: 4
[ 210.490199] nouveau 0000:01:00.0: plasmashell[3176]: buf offset: 0040950000
[ 210.490202] nouveau 0000:01:00.0: plasmashell[3176]: buf size: 800000
[ 210.490204] nouveau 0000:01:00.0: plasmashell[3176]: fail set_domain
[ 210.490206] nouveau 0000:01:00.0: plasmashell[3176]: validating bo list
[ 210.490210] nouveau 0000:01:00.0: plasmashell[3176]: validate: -22
nouveau: 0x00146200
nouveau: 0x00000000
nouveau: 0x40950000
nouveau: 0x000000cf
nouveau: 0x00000040
nouveau: 0x00000000
Which happens to be
BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(i)), 5);
PUSH_DATAh(push, mt->base.address + sf->offset);
PUSH_DATA (push, mt->base.address + sf->offset);
PUSH_DATA (push, nv50_format_table[sf->base.format].rt);
PUSH_DATA (push, mt->level[sf->base.u.tex.level].tile_mode);
PUSH_DATA (push, mt->layer_stride >> 2);
And above it inits the fb size to 1920x1080 with one RT. The surface format is
BGRA8_UNORM. So somehow the nouveau code thinks that the RT is in GART whereas
it's really in VRAM. Very weird.
I think that it's an imported buffer (via nv50_miptree_from_handle) and somehow
the GEM_INFO tells us that it's in GART and not VRAM. Which means that the
VRAM-allocated buffer somehow ends up in TTM_PL_TT.
Can you try the following patch and see if it fixes everything? (Keep the other
patch in place in case it doesn't.)
diff --git a/drm/nouveau/nouveau_gem.c b/drm/nouveau/nouveau_gem.c
index ce74ab1..b4cbc86 100644
--- a/drm/nouveau/nouveau_gem.c
+++ b/drm/nouveau/nouveau_gem.c
@@ -229,11 +229,7 @@ nouveau_gem_info(struct drm_file *file_priv, struct
drm_gem_object *gem,
struct nouveau_bo *nvbo = nouveau_gem_object(gem);
struct nvkm_vma *vma;
- if (nvbo->bo.mem.mem_type == TTM_PL_TT)
- rep->domain = NOUVEAU_GEM_DOMAIN_GART;
- else
- rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
-
+ rep->domain = nvbo->valid_domains;
rep->offset = nvbo->bo.offset;
if (cli->vm) {
vma = nouveau_bo_vma_find(nvbo, cli->vm);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
--1445269051.F4cF2.8335
Date: Mon, 19 Oct 2015 15:37:31 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Comment # 20
on bug 92504
from Ilia Mirkin
[ 210.490188] nouveau 0000:01:00.0: plasmashell[3176]: bo valid domains: 2
[ 210.490193] nouveau 0000:01:00.0: plasmashell[3176]: valid domains: 4
[ 210.490195] nouveau 0000:01:00.0: plasmashell[3176]: read domains: 0
[ 210.490197] nouveau 0000:01:00.0: plasmashell[3176]: write domains: 4
[ 210.490199] nouveau 0000:01:00.0: plasmashell[3176]: buf offset: 0040950000
[ 210.490202] nouveau 0000:01:00.0: plasmashell[3176]: buf size: 800000
[ 210.490204] nouveau 0000:01:00.0: plasmashell[3176]: fail set_domain
[ 210.490206] nouveau 0000:01:00.0: plasmashell[3176]: validating bo list
[ 210.490210] nouveau 0000:01:00.0: plasmashell[3176]: validate: -22
nouveau: 0x00146200
nouveau: 0x00000000
nouveau: 0x40950000
nouveau: 0x000000cf
nouveau: 0x00000040
nouveau: 0x00000000
Which happens to be
BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(i)), 5);
PUSH_DATAh(push, mt->base.address + sf->offset);
PUSH_DATA (push, mt->base.address + sf->offset);
PUSH_DATA (push, nv50_format_table[sf->base.format].rt);
PUSH_DATA (push, mt->level[sf->base.u.tex.level].tile_mode);
PUSH_DATA (push, mt->layer_stride >> 2);
And above it inits the fb size to 1920x1080 with one RT. The surface format is
BGRA8_UNORM. So somehow the nouveau code thinks that the RT is in GART whereas
it's really in VRAM. Very weird.
I think that it's an imported buffer (via nv50_miptree_from_handle) and somehow
the GEM_INFO tells us that it's in GART and not VRAM. Which means that the
VRAM-allocated buffer somehow ends up in TTM_PL_TT.
Can you try the following patch and see if it fixes everything? (Keep the other
patch in place in case it doesn't.)
diff --git a/drm/nouveau/nouveau_gem.c b/drm/nouveau/nouveau_gem.c
index ce74ab1..b4cbc86 100644
--- a/drm/nouveau/nouveau_gem.c
+++ b/drm/nouveau/nouveau_gem.c
@@ -229,11 +229,7 @@ nouveau_gem_info(struct drm_file *file_priv, struct
drm_gem_object *gem,
struct nouveau_bo *nvbo = nouveau_gem_object(gem);
struct nvkm_vma *vma;
- if (nvbo->bo.mem.mem_type == TTM_PL_TT)
- rep->domain = NOUVEAU_GEM_DOMAIN_GART;
- else
- rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
-
+ rep->domain = nvbo->valid_domains;
rep->offset = nvbo->bo.offset;
if (cli->vm) {
vma = nouveau_bo_vma_find(nvbo, cli->vm);
You are receiving this mail because:
- You are the QA Contact for the bug.
- You are the assignee for the bug.
--1445269051.F4cF2.8335--
--===============1495822365==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt
YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cDovL2xpc3RzLmZy
ZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL25vdXZlYXUK
--===============1495822365==--