Skip to content

Commit

Permalink
drm/nv84: fix minor issues in PCRYPT implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Skeggs committed Dec 3, 2010
1 parent 7b4808b commit 2cb3d3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/nouveau_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine->crypt.takedown = nv84_crypt_fini;
engine->crypt.create_context = nv84_crypt_create_context;
engine->crypt.destroy_context = nv84_crypt_destroy_context;
engine->crypt.tlb_flush = nv84_crypt_tlb_flush;
break;
default:
engine->crypt.init = nouveau_stub_init;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nv84_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ nv84_crypt_destroy_context(struct nouveau_channel *chan)
struct drm_device *dev = chan->dev;
u32 inst;

if (!chan->ramin)
if (!chan->crypt_ctx)
return;

inst = (chan->ramin->vinst >> 12);
Expand Down

0 comments on commit 2cb3d3b

Please sign in to comment.