All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] drm/nouveau: move definition of nouveau_grctx to separate file
@ 2012-04-15 12:36 Marcin Slusarz
  0 siblings, 0 replies; only message in thread
From: Marcin Slusarz @ 2012-04-15 12:36 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Avoids conditional definition of grctx build functions, which is hard
for IDE's to handle properly.

Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/drm/nouveau/nouveau_grctx.h     |   21 ++-------------------
 drivers/gpu/drm/nouveau/nouveau_grctx_def.h |   21 +++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv40_graph.c        |    2 +-
 drivers/gpu/drm/nouveau/nv50_graph.c        |    2 +-
 4 files changed, 25 insertions(+), 21 deletions(-)
 create mode 100644 drivers/gpu/drm/nouveau/nouveau_grctx_def.h

diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx.h b/drivers/gpu/drm/nouveau/nouveau_grctx.h
index 86c2e37..359244c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_grctx.h
+++ b/drivers/gpu/drm/nouveau/nouveau_grctx.h
@@ -1,24 +1,8 @@
 #ifndef __NOUVEAU_GRCTX_H__
 #define __NOUVEAU_GRCTX_H__
 
-struct nouveau_grctx {
-	struct drm_device *dev;
-
-	enum {
-		NOUVEAU_GRCTX_PROG,
-		NOUVEAU_GRCTX_VALS
-	} mode;
-	void *data;
-
-	uint32_t ctxprog_max;
-	uint32_t ctxprog_len;
-	uint32_t ctxprog_reg;
-	int      ctxprog_label[32];
-	uint32_t ctxvals_pos;
-	uint32_t ctxvals_base;
-};
-
-#ifdef CP_CTX
+#include "nouveau_grctx_def.h"
+
 static inline void
 cp_out(struct nouveau_grctx *ctx, uint32_t inst)
 {
@@ -128,6 +112,5 @@ gr_def(struct nouveau_grctx *ctx, uint32_t reg, uint32_t val)
 
 	nv_wo32(ctx->data, reg * 4, val);
 }
-#endif
 
 #endif
diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx_def.h b/drivers/gpu/drm/nouveau/nouveau_grctx_def.h
new file mode 100644
index 0000000..f9a4e12
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nouveau_grctx_def.h
@@ -0,0 +1,21 @@
+#ifndef __NOUVEAU_GRCTX_DEF_H__
+#define __NOUVEAU_GRCTX_DEF_H__
+
+struct nouveau_grctx {
+	struct drm_device *dev;
+
+	enum {
+		NOUVEAU_GRCTX_PROG,
+		NOUVEAU_GRCTX_VALS
+	} mode;
+	void *data;
+
+	uint32_t ctxprog_max;
+	uint32_t ctxprog_len;
+	uint32_t ctxprog_reg;
+	int      ctxprog_label[32];
+	uint32_t ctxvals_pos;
+	uint32_t ctxvals_base;
+};
+
+#endif
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c
index ba14a93..20bb65a 100644
--- a/drivers/gpu/drm/nouveau/nv40_graph.c
+++ b/drivers/gpu/drm/nouveau/nv40_graph.c
@@ -27,7 +27,7 @@
 #include "drmP.h"
 #include "drm.h"
 #include "nouveau_drv.h"
-#include "nouveau_grctx.h"
+#include "nouveau_grctx_def.h"
 #include "nouveau_ramht.h"
 
 struct nv40_graph_engine {
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
index 33d5711..f5c1fe7 100644
--- a/drivers/gpu/drm/nouveau/nv50_graph.c
+++ b/drivers/gpu/drm/nouveau/nv50_graph.c
@@ -28,7 +28,7 @@
 #include "drm.h"
 #include "nouveau_drv.h"
 #include "nouveau_ramht.h"
-#include "nouveau_grctx.h"
+#include "nouveau_grctx_def.h"
 #include "nouveau_dma.h"
 #include "nouveau_vm.h"
 #include "nv50_evo.h"
-- 
1.7.8.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-15 12:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-15 12:36 [PATCH resend] drm/nouveau: move definition of nouveau_grctx to separate file Marcin Slusarz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.