Commit 2cb3d3b6 authored by Ben Skeggs's avatar Ben Skeggs

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7b4808bb
...@@ -437,6 +437,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) ...@@ -437,6 +437,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine->crypt.takedown = nv84_crypt_fini; engine->crypt.takedown = nv84_crypt_fini;
engine->crypt.create_context = nv84_crypt_create_context; engine->crypt.create_context = nv84_crypt_create_context;
engine->crypt.destroy_context = nv84_crypt_destroy_context; engine->crypt.destroy_context = nv84_crypt_destroy_context;
engine->crypt.tlb_flush = nv84_crypt_tlb_flush;
break; break;
default: default:
engine->crypt.init = nouveau_stub_init; engine->crypt.init = nouveau_stub_init;
......
...@@ -61,7 +61,7 @@ nv84_crypt_destroy_context(struct nouveau_channel *chan) ...@@ -61,7 +61,7 @@ nv84_crypt_destroy_context(struct nouveau_channel *chan)
struct drm_device *dev = chan->dev; struct drm_device *dev = chan->dev;
u32 inst; u32 inst;
if (!chan->ramin) if (!chan->crypt_ctx)
return; return;
inst = (chan->ramin->vinst >> 12); inst = (chan->ramin->vinst >> 12);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment