]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drm/nv84: fix minor issues in PCRYPT implementation
authorBen Skeggs <bskeggs@redhat.com>
Mon, 15 Nov 2010 06:28:19 +0000 (16:28 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 3 Dec 2010 05:11:56 +0000 (15:11 +1000)
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>
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nv84_crypt.c

index b42e29d1935e303168ed5754b21a26b490b023cf..75e70022fbd3ff0b823b20c25ee8e461e3d81175 100644 (file)
@@ -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;
index 1cda0240f55d24ee6eafbc8c30c579f1168e4b49..780bb1d66f95f61189ff44892ec5701fab7064ae 100644 (file)
@@ -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);