drm/nouveau: move definition of nouveau_grctx to separate file
Subsystems (3)
PATCH RESEND 1/1 drm/nouveau: move definition of nouveau_grctx to separate file
Avoids conditional definition of grctx build functions, which is hard for IDE's to handle properly.
Signed-off-by Marcin Slusarz <[email protected]>
--- 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
drivers/gpu/drm/nouveau/nouveau_grctx.h +2 -19
@@ -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
drivers/gpu/drm/nouveau/nouveau_grctx_def.h new file +21 -0
@@ -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
drivers/gpu/drm/nouveau/nv40_graph.c +1 -1
@@ -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 {
drivers/gpu/drm/nouveau/nv50_graph.c +1 -1
@@ -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"
Signature · 1 line
1.7.8.5