summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_channel.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-10-20 11:47:09 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 15:10:44 +1000
commitf4512e6579ddaa9b1f8ab1d5659131243ffc421f (patch)
tree8e2a5b4457ce9eaf8e7ac6d619f7cf69074e0d66 /drivers/gpu/drm/nouveau/nouveau_channel.c
parent3052be2cea64371300a0338d3ca5d3575fbd109c (diff)
drm/nv50: create graph and crypt contexts on demand
This really needs cleaning up somehow, and probably investigate what's needed to do this on earlier generations. NVIDIA do something similar there too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_channel.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 8f2df6beb89..f2d67420236 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -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;
@@ -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;