[Nouveau] [Bug 55948] [nvd9 optimus] drm/nouveau/bios: attempt to fetch entire acpi rom image in one shot breaks module load

2012-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=55948

--- Comment #3 from Jan Vesely jano.ves...@gmail.com ---
Created attachment 68601
  -- https://bugs.freedesktop.org/attachment.cgi?id=68601action=edit
DSDT acpi table

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 55948] [nvd9 optimus] drm/nouveau/bios: attempt to fetch entire acpi rom image in one shot breaks module load

2012-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=55948

Peter Wu lekenst...@gmail.com changed:

   What|Removed |Added

 CC||lekenst...@gmail.com

--- Comment #4 from Peter Wu lekenst...@gmail.com ---
The DSDT does not contain a _ROM method. It must be in one of the SSDT files,
can you run:

acpidump  acpidump.txt
and attach the acpidump.txt file? You need to install acpidump first.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 55948] [nvd9 optimus] drm/nouveau/bios: attempt to fetch entire acpi rom image in one shot breaks module load

2012-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=55948

--- Comment #5 from Jan Vesely jano.ves...@gmail.com ---
Created attachment 68619
  -- https://bugs.freedesktop.org/attachment.cgi?id=68619action=edit
acpidump

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 01/10] drm/nv50: decode PGRAPH status registers on TLB flush fail

2012-10-16 Thread Marcin Slusarz
On Thu, Oct 04, 2012 at 01:43:15PM +0200, Marcin Slusarz wrote:
 On Thu, Sep 13, 2012 at 12:47:53AM +0200, Marcin Slusarz wrote:
  On Tue, Aug 21, 2012 at 12:08:32AM +0200, Marcin Slusarz wrote:
   On Mon, Aug 20, 2012 at 07:02:46PM +0200, Marcin Slusarz wrote:
On Mon, Aug 20, 2012 at 04:27:18PM +1000, Ben Skeggs wrote:
 On Sun, Aug 19, 2012 at 10:59:56PM +0200, Marcin Slusarz wrote:
  Now it outputs:
  nouveau E[  PGRAPH][:02:00.0] PGRAPH TLB flush idle timeout fail
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_STATUS: BUSY DISPATCH 
  VFETCH CCACHE_UNK4 STRMOUT_GSCHED_UNK5 UNK14XX UNK1CXX CLIPID ZCULL 
  ENG2D UNK34XX TPRAST TPROP ROP (0x011fde03)
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_VSTATUS_0: CCACHE 
  (0x00145b4d)
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_VSTATUS_1: (0x002d)
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_VSTATUS_2: ENG2D ROP 
  (0x0034db40)
  
  instead of:
  [drm] nouveau :02:00.0: PGRAPH TLB flush idle timeout fail: 
  0x011fde03 0x00145b4d 0x002d 0x0034db40
 
 I didn't push these first few patches yet as I have a couple of 
 thoughts on it.
 
 Mostly I was thinking we should probably have a:
 
 nv_printf(obj, lvl, fmt, args...)
 
 to replace the printk's which just does a continued print while still 
 obeying
 the debug level?

Well, this patch does not use nv_printk_enabled, so these concerns 
should
not apply to it, right? I'll fix up bitfield list and resend it.
  
  New version, which prints VSTATUS regs on one line.
  
  PS: I pushed this and some other patches to my github repo.
   ( https://github.com/mslusarz/linux )
  ---
  From: Marcin Slusarz marcin.slus...@gmail.com
  Subject: [PATCH 01/11] drm/nv50: decode PGRAPH status registers on TLB 
  flush fail
  
  Now it outputs:
  nouveau E[  PGRAPH][:02:00.0] PGRAPH TLB flush idle timeout fail
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_STATUS: BUSY DISPATCH VFETCH 
  CCACHE_UNK4 STRMOUT_GSCHED_UNK5 UNK14XX UNK1CXX CLIPID ZCULL ENG2D UNK34XX 
  TPRAST TPROP ROP (0x011fde03)
  nouveau E[  PGRAPH][:02:00.0] PGRAPH_VSTATUS: CCACHE (0x00145b4d) 
  (0x002d) ENG2D ROP (0x0034db40)
  
  instead of:
  [drm] nouveau :02:00.0: PGRAPH TLB flush idle timeout fail: 0x011fde03 
  0x00145b4d 0x002d 0x0034db40
  
  Based on envytools docs.
  
  Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
  ---
   drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 75 
  ++--
   1 file changed, 71 insertions(+), 4 deletions(-)
  
  diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c 
  b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
  index ab3b9dc..5f1adca 100644
  --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
  +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
  @@ -184,6 +184,62 @@ nv50_graph_tlb_flush(struct nouveau_engine *engine)
  return 0;
   }
   
  +static const struct nouveau_bitfield nv50_pgraph_status[] = {
  +   { 0x0001, BUSY }, /* set when any bit is set */
  +   { 0x0002, DISPATCH },
  +   { 0x0004, UNK2 },
  +   { 0x0008, UNK3 },
  +   { 0x0010, UNK4 },
  +   { 0x0020, UNK5 },
  +   { 0x0040, M2MF },
  +   { 0x0080, UNK7 },
  +   { 0x0100, CTXPROG },
  +   { 0x0200, VFETCH },
  +   { 0x0400, CCACHE_UNK4 },
  +   { 0x0800, STRMOUT_GSCHED_UNK5 },
  +   { 0x1000, UNK14XX },
  +   { 0x2000, UNK24XX_CSCHED },
  +   { 0x4000, UNK1CXX },
  +   { 0x8000, CLIPID },
  +   { 0x0001, ZCULL },
  +   { 0x0002, ENG2D },
  +   { 0x0004, UNK34XX },
  +   { 0x0008, TPRAST },
  +   { 0x0010, TPROP },
  +   { 0x0020, TEX },
  +   { 0x0040, TPVP },
  +   { 0x0080, MP },
  +   { 0x0100, ROP },
  +   {}
  +};
  +
  +static const char *const nv50_pgraph_vstatus_0[] = {
  +   VFETCH, CCACHE, UNK4, UNK5, GSCHED, STRMOUT, UNK14XX, NULL
  +};
  +
  +static const char *const nv50_pgraph_vstatus_1[] = {
  +   TPRAST, TPROP, TEXTURE, TPVP, MP, NULL
  +};
  +
  +static const char *const nv50_pgraph_vstatus_2[] = {
  +   UNK24XX, CSCHED, UNK1CXX, CLIPID, ZCULL, ENG2D, UNK34XX,
  +   ROP, NULL
  +};
  +
  +static void nouveau_pgraph_vstatus_print(const char *const units[], u32 
  status)
  +{
  +   int i;
  +   u32 tmp = status;
  +   for (i = 0; units[i]  tmp; i++) {
  +   if ((tmp  7) == 1)
  +   pr_cont(%s , units[i]);
  +   tmp = 3;
  +   }
  +   if (tmp)
  +   pr_cont(invalid: %x , tmp);
  +   pr_cont((0x%08x) , status);
  +}
  +
   static int
   nv84_graph_tlb_flush(struct nouveau_engine *engine)
   {
  @@ -219,10 +275,21 @@ nv84_graph_tlb_flush(struct nouveau_engine *engine)
   !(timeout = ptimer-read(ptimer) - start  20));
   
  if (timeout) {
  -   nv_error(priv, PGRAPH TLB flush idle timeout fail: 
  - 0x%08x 0x%08x 0x%08x 0x%08x\n,
  -

Re: [Nouveau] [PATCH] drm/nouveau: handle same-fb page flips

2012-10-16 Thread Marcin Slusarz
On Fri, Oct 05, 2012 at 09:37:59PM +0200, Marcin Slusarz wrote:
 It's questionable use case, but weston/wayland already relies on this 
 behaviour,
 and other drivers don't care about it, so it's a matter of compatibility.
 Without it, process invoking such page flip hangs in unkillable state, trying
 to reserve the same buffer twice.
 
 Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
 ---
  drivers/gpu/drm/nouveau/nouveau_display.c | 20 +++-
  1 file changed, 15 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
 b/drivers/gpu/drm/nouveau/nouveau_display.c
 index 61f370d..a52cfd3 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_display.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
 @@ -530,9 +530,11 @@ nouveau_page_flip_reserve(struct nouveau_bo *old_bo,
   if (ret)
   goto fail;
  
 - ret = ttm_bo_reserve(old_bo-bo, false, false, false, 0);
 - if (ret)
 - goto fail_unreserve;
 + if (likely(old_bo != new_bo)) {
 + ret = ttm_bo_reserve(old_bo-bo, false, false, false, 0);
 + if (ret)
 + goto fail_unreserve;
 + }
  
   return 0;
  
 @@ -551,8 +553,10 @@ nouveau_page_flip_unreserve(struct nouveau_bo *old_bo,
   nouveau_bo_fence(new_bo, fence);
   ttm_bo_unreserve(new_bo-bo);
  
 - nouveau_bo_fence(old_bo, fence);
 - ttm_bo_unreserve(old_bo-bo);
 + if (likely(old_bo != new_bo)) {
 + nouveau_bo_fence(old_bo, fence);
 + ttm_bo_unreserve(old_bo-bo);
 + }
  
   nouveau_bo_unpin(old_bo);
  }
 @@ -624,6 +628,12 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct 
 drm_framebuffer *fb,
   if (!drm-channel)
   return -ENODEV;
  
 + if (unlikely(old_bo == new_bo)) {
 + char name[sizeof(current-comm)];
 + pr_debug_ratelimited('%s': useless page flip invoked\n,
 + get_task_comm(name, current));
 + }
 +
   s = kzalloc(sizeof(*s), GFP_KERNEL);
   if (!s)
   return -ENOMEM;
 -- 

ping
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH] drm/nouveau: fix nouveau_mm/nouveau_mm_node leak

2012-10-16 Thread Marcin Slusarz
On Thu, Oct 11, 2012 at 11:53:09PM +0200, Marcin Slusarz wrote:
 Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
 ---
  drivers/gpu/drm/nouveau/core/core/gpuobj.c | 6 +-
  drivers/gpu/drm/nouveau/core/include/core/gpuobj.h | 3 +++
  2 files changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/gpu/drm/nouveau/core/core/gpuobj.c 
 b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
 index c2a7608..48121d2 100644
 --- a/drivers/gpu/drm/nouveau/core/core/gpuobj.c
 +++ b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
 @@ -39,8 +39,11 @@ nouveau_gpuobj_destroy(struct nouveau_gpuobj *gpuobj)
   nv_wo32(gpuobj, i, 0x);
   }
  
 + if (gpuobj-node)
 + nouveau_mm_free(gpuobj-node_heap, gpuobj-node);
 +
   if (gpuobj-heap.block_size)
 - nouveau_mm_fini(gpuobj-heap);
 + WARN_ON(nouveau_mm_fini(gpuobj-heap));
  
   nouveau_object_destroy(gpuobj-base);
  }
 @@ -114,6 +117,7 @@ nouveau_gpuobj_create_(struct nouveau_object *parent,
 max(align, (u32)1), gpuobj-node);
   if (ret)
   return ret;
 + gpuobj-node_heap = heap;
  
   gpuobj-addr += gpuobj-node-offset;
   }
 diff --git a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h 
 b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h
 index d09adf1..f65bf5b 100644
 --- a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h
 +++ b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h
 @@ -16,7 +16,10 @@ struct nouveau_vm;
  struct nouveau_gpuobj {
   struct nouveau_object base;
   struct nouveau_object *parent;
 +
 + struct nouveau_mm *node_heap;
   struct nouveau_mm_node *node;
 +
   struct nouveau_mm heap;
  
   u32 flags;
 -- 

What's wrong with this patch?
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] drm/nouveau: remove redundant comments listing classes

2012-10-16 Thread Marcin Slusarz
Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
---
 drivers/gpu/drm/nouveau/core/include/core/class.h | 31 +++
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/include/core/class.h 
b/drivers/gpu/drm/nouveau/core/include/core/class.h
index 6180ae9..5b739de 100644
--- a/drivers/gpu/drm/nouveau/core/include/core/class.h
+++ b/drivers/gpu/drm/nouveau/core/include/core/class.h
@@ -1,10 +1,7 @@
 #ifndef __NOUVEAU_CLASS_H__
 #define __NOUVEAU_CLASS_H__
 
-/* Device class
- *
- * 0080: NV_DEVICE
- */
+/* Device class */
 #define NV_DEVICE_CLASS  0x0080
 
 #define NV_DEVICE_DISABLE_IDENTIFY0x0001ULL
@@ -30,12 +27,7 @@ struct nv_device_class {
u64 debug0; /* as above, but *internal* ids, and *NOT* ABI */
 };
 
-/* DMA object classes
- *
- * 0002: NV_DMA_FROM_MEMORY
- * 0003: NV_DMA_TO_MEMORY
- * 003d: NV_DMA_IN_MEMORY
- */
+/* DMA object classes */
 #define NV_DMA_FROM_MEMORY_CLASS 0x0002
 #define NV_DMA_TO_MEMORY_CLASS   0x0003
 #define NV_DMA_IN_MEMORY_CLASS   0x003d
@@ -59,15 +51,7 @@ struct nv_dma_class {
u64 limit;
 };
 
-/* DMA FIFO channel classes
- *
- * 006b: NV03_CHANNEL_DMA
- * 006e: NV10_CHANNEL_DMA
- * 176e: NV17_CHANNEL_DMA
- * 406e: NV40_CHANNEL_DMA
- * 506e: NV50_CHANNEL_DMA
- * 826e: NV84_CHANNEL_DMA
- */
+/* DMA FIFO channel classes */
 #define NV03_CHANNEL_DMA_CLASS   0x006b
 #define NV10_CHANNEL_DMA_CLASS   0x006e
 #define NV17_CHANNEL_DMA_CLASS   0x176e
@@ -81,14 +65,7 @@ struct nv03_channel_dma_class {
u64 offset;
 };
 
-/* Indirect FIFO channel classes
- *
- * 506f: NV50_CHANNEL_IND
- * 826f: NV84_CHANNEL_IND
- * 906f: NVC0_CHANNEL_IND
- * a06f: NVE0_CHANNEL_IND
- */
-
+/* Indirect FIFO channel classes */
 #define NV50_CHANNEL_IND_CLASS   0x506f
 #define NV84_CHANNEL_IND_CLASS   0x826f
 #define NVC0_CHANNEL_IND_CLASS   0x906f
-- 
1.7.12

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 55948] [nvd9 optimus] drm/nouveau/bios: attempt to fetch entire acpi rom image in one shot breaks module load

2012-10-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=55948

Ben Skeggs skeg...@gmail.com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|nouveau@lists.freedesktop.o |skeg...@gmail.com
   |rg  |

--- Comment #6 from Ben Skeggs skeg...@gmail.com ---
Created attachment 68662
  -- https://bugs.freedesktop.org/attachment.cgi?id=68662action=edit
fallback to slow _ROM access if checksum fails

How do you go if you apply this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau