search for: nouveau_grctx_prog

Displaying 4 results from an estimated 4 matches for "nouveau_grctx_prog".

2011 Dec 28
0
[PATCH] drm/nouveau: move definition of nouveau_grctx to separate file
...vers/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...
2012 Apr 15
0
[PATCH resend] drm/nouveau: move definition of nouveau_grctx to separate file
...vers/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...
2012 Nov 11
0
[PATCH] drm/nv40: allocate ctxprog with kmalloc
...nv40_grctx_fill(struct nouveau_device *device, struct nouveau_gpuobj *mem) }); } -void +int nv40_grctx_init(struct nouveau_device *device, u32 *size) { - u32 ctxprog[256], i; + u32 *ctxprog = kmalloc(256 * 4, GFP_KERNEL), i; struct nouveau_grctx ctx = { .device = device, .mode = NOUVEAU_GRCTX_PROG, .data = ctxprog, - .ctxprog_max = ARRAY_SIZE(ctxprog) + .ctxprog_max = 256, }; + if (!ctxprog) + return -ENOMEM; + nv40_grctx_generate(&ctx); nv_wr32(device, 0x400324, 0); for (i = 0; i < ctx.ctxprog_len; i++) nv_wr32(device, 0x400328, ctxprog[i]); *size = ctx.ctxvals...
2010 Feb 25
3
[PATCH 1/3] drm/nv50: Implement ctxprog/state generation.
...t nouveau_channel *); extern int nv50_graph_load_context(struct nouveau_channel *); extern int nv50_graph_unload_context(struct drm_device *); extern void nv50_graph_context_switch(struct drm_device *); +extern int nv50_grctx_init(struct nouveau_grctx *); /* nouveau_grctx.c */ extern int nouveau_grctx_prog_load(struct drm_device *); diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index 6d50480..857a096 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/nv50_graph.c @@ -28,30 +28,7 @@ #include "drm.h" #include "nouv...