Mesa (master): nv50: fix typo in fifo packet length limit

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sat Sep 18 19:03:23 UTC 2010


Module: Mesa
Branch: master
Commit: 613c3901c3cb748d7ef0bc3162ce3fcb986e9047
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=613c3901c3cb748d7ef0bc3162ce3fcb986e9047

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sat Sep 18 20:52:44 2010 +0200

nv50: fix typo in fifo packet length limit

---

 src/gallium/drivers/nouveau/nouveau_winsys.h |    4 ++++
 src/gallium/drivers/nv50/nv50_shader_state.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index c9003c9..ab480ca 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -12,6 +12,10 @@
 #include "nouveau/nouveau_resource.h"
 #include "nouveau/nouveau_pushbuf.h"
 
+#ifndef NV04_PFIFO_MAX_PACKET_LEN
+#define NV04_PFIFO_MAX_PACKET_LEN 2047
+#endif
+
 static INLINE uint32_t
 nouveau_screen_transfer_flags(unsigned pipe)
 {
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 7d2989d..1a2fe75 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -54,7 +54,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
          continue;
       }
       nr = MIN2(count, nr - 7);
-      nr = MIN2(nr, 2074);
+      nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
 
       nv50_screen_reloc_constbuf(nv50->screen, cbi);
 
@@ -91,7 +91,7 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
             continue;
          }
          nr = MIN2(count, nr - 7);
-         nr = MIN2(nr, 2074);
+         nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
 
          nv50_screen_reloc_constbuf(nv50->screen, NV50_CB_PMISC);
 




More information about the mesa-commit mailing list