search for: ctxprog_len

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

2011 Dec 28
0
[PATCH] drm/nouveau: move definition of nouveau_grctx to separate file
...u_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, uin...
2012 Apr 15
0
[PATCH resend] drm/nouveau: move definition of nouveau_grctx to separate file
...u_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, uin...
2012 Nov 11
0
[PATCH] drm/nv40: allocate ctxprog with kmalloc
...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_pos * 4; + + kfree(ctxprog); + return 0; } diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c index a3742db..0052f09 100644 --- a/drivers/gpu/drm/nouveau/core/engine/...
2010 Feb 25
3
[PATCH 1/3] drm/nv50: Implement ctxprog/state generation.
...; + return 0; + } + ctx.dev = dev; + ctx.mode = NOUVEAU_GRCTX_PROG; + ctx.data = cp; + ctx.ctxprog_max = 512; + if (!nv50_grctx_init(&ctx)) { + dev_priv->engine.graph.grctx_size = ctx.ctxvals_pos * 4; + + nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); + for (i = 0; i < ctx.ctxprog_len; i++) + nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, cp[i]); + } else { + dev_priv->engine.graph.accel_blocked = true; + } + kfree(cp); + } nv_wr32(dev, 0x400320, 4); nv_wr32(dev, NV40_PGRAPH_CTXCTL_CUR, 0); @@ -193,13 +195,13 @@ nv50_graph_create_context(struct nouveau_channel *cha...