aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-11-15 01:28:19 -0500
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 00:11:56 -0500
commit2cb3d3b6c64d37514fd8865748de66ff35a489af (patch)
treeeed04c2ceec953cc3f09712dcbfda6ce5ee44cbf
parent7b4808bb6ee63c9cc9c9be5a52f0c7babfc50659 (diff)
drm/nv84: fix minor issues in PCRYPT implementation
Fix running of destroy_context() when create_context() has never been called for the channel, and fill in engine's tlb_flush() function pointer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c1
-rw-r--r--drivers/gpu/drm/nouveau/nv84_crypt.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index b42e29d1935e..75e70022fbd3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -437,6 +437,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
437 engine->crypt.takedown = nv84_crypt_fini; 437 engine->crypt.takedown = nv84_crypt_fini;
438 engine->crypt.create_context = nv84_crypt_create_context; 438 engine->crypt.create_context = nv84_crypt_create_context;
439 engine->crypt.destroy_context = nv84_crypt_destroy_context; 439 engine->crypt.destroy_context = nv84_crypt_destroy_context;
440 engine->crypt.tlb_flush = nv84_crypt_tlb_flush;
440 break; 441 break;
441 default: 442 default:
442 engine->crypt.init = nouveau_stub_init; 443 engine->crypt.init = nouveau_stub_init;
diff --git a/drivers/gpu/drm/nouveau/nv84_crypt.c b/drivers/gpu/drm/nouveau/nv84_crypt.c
index 1cda0240f55d..780bb1d66f95 100644
--- a/drivers/gpu/drm/nouveau/nv84_crypt.c
+++ b/drivers/gpu/drm/nouveau/nv84_crypt.c
@@ -61,7 +61,7 @@ nv84_crypt_destroy_context(struct nouveau_channel *chan)
61 struct drm_device *dev = chan->dev; 61 struct drm_device *dev = chan->dev;
62 u32 inst; 62 u32 inst;
63 63
64 if (!chan->ramin) 64 if (!chan->crypt_ctx)
65 return; 65 return;
66 66
67 inst = (chan->ramin->vinst >> 12); 67 inst = (chan->ramin->vinst >> 12);