Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228543
b: refs/heads/master
c: f4512e6
h: refs/heads/master
i:
  228541: b7eccb7
  228539: bc48311
  228535: ed4965a
  228527: 9d8ceab
  228511: 253ab30
  228479: 2c5fb0a
v: v3
  • Loading branch information
Ben Skeggs committed Dec 3, 2010
1 parent b8c93f5 commit f9069dd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3052be2cea64371300a0338d3ca5d3575fbd109c
refs/heads/master: f4512e6579ddaa9b1f8ab1d5659131243ffc421f
11 changes: 2 additions & 9 deletions trunk/drivers/gpu/drm/nouveau/nouveau_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo;
struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt;
struct nouveau_channel *chan;
unsigned long flags;
int user, ret;
Expand Down Expand Up @@ -209,14 +208,8 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
pfifo->reassign(dev, false);

/* Create a graphics context for new channel */
ret = pgraph->create_context(chan);
if (ret) {
nouveau_channel_put(&chan);
return ret;
}

if (pcrypt->create_context) {
ret = pcrypt->create_context(chan);
if (dev_priv->card_type < NV_50) {
ret = pgraph->create_context(chan);
if (ret) {
nouveau_channel_put(&chan);
return ret;
Expand Down
23 changes: 23 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,29 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, int class,
if (oc->engine == NVOBJ_ENGINE_SW)
return nouveau_gpuobj_sw_new(chan, class, gpuobj);

switch (oc->engine) {
case NVOBJ_ENGINE_GR:
if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) {
struct nouveau_pgraph_engine *pgraph =
&dev_priv->engine.graph;

ret = pgraph->create_context(chan);
if (ret)
return ret;
}
break;
case NVOBJ_ENGINE_CRYPT:
if (!chan->crypt_ctx) {
struct nouveau_crypt_engine *pcrypt =
&dev_priv->engine.crypt;

ret = pcrypt->create_context(chan);
if (ret)
return ret;
}
break;
}

ret = nouveau_gpuobj_new(dev, chan,
nouveau_gpuobj_class_instmem_size(dev, class),
16,
Expand Down

0 comments on commit f9069dd

Please sign in to comment.