aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv84_crypt.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-11-02 20:06:43 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 00:11:30 -0500
commitd7facf9dc50acff69de9688088caa78b3cf69ebb (patch)
treec2ca30472f0ab46daa367ec798dd0dffe43fb6a1 /drivers/gpu/drm/nouveau/nv84_crypt.c
parent8f8a54482b008714ccfad15f4592b3802b80d479 (diff)
drm/nv84: move PCRYPT ISR out of nouveau_irq.c
Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv84_crypt.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv84_crypt.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv84_crypt.c b/drivers/gpu/drm/nouveau/nv84_crypt.c
index f988b1a9d1d7..1cda0240f55d 100644
--- a/drivers/gpu/drm/nouveau/nv84_crypt.c
+++ b/drivers/gpu/drm/nouveau/nv84_crypt.c
@@ -24,6 +24,9 @@
24 24
25#include "drmP.h" 25#include "drmP.h"
26#include "nouveau_drv.h" 26#include "nouveau_drv.h"
27#include "nouveau_util.h"
28
29static void nv84_crypt_isr(struct drm_device *);
27 30
28int 31int
29nv84_crypt_create_context(struct nouveau_channel *chan) 32nv84_crypt_create_context(struct nouveau_channel *chan)
@@ -97,8 +100,11 @@ nv84_crypt_init(struct drm_device *dev)
97 100
98 nv_mask(dev, 0x000200, 0x00004000, 0x00000000); 101 nv_mask(dev, 0x000200, 0x00004000, 0x00000000);
99 nv_mask(dev, 0x000200, 0x00004000, 0x00004000); 102 nv_mask(dev, 0x000200, 0x00004000, 0x00004000);
103
104 nouveau_irq_register(dev, 14, nv84_crypt_isr);
100 nv_wr32(dev, 0x102130, 0xffffffff); 105 nv_wr32(dev, 0x102130, 0xffffffff);
101 nv_wr32(dev, 0x102140, 0xffffffbf); 106 nv_wr32(dev, 0x102140, 0xffffffbf);
107
102 nv_wr32(dev, 0x10200c, 0x00000010); 108 nv_wr32(dev, 0x10200c, 0x00000010);
103 return 0; 109 return 0;
104} 110}
@@ -107,4 +113,25 @@ void
107nv84_crypt_fini(struct drm_device *dev) 113nv84_crypt_fini(struct drm_device *dev)
108{ 114{
109 nv_wr32(dev, 0x102140, 0x00000000); 115 nv_wr32(dev, 0x102140, 0x00000000);
116 nouveau_irq_unregister(dev, 14);
117}
118
119static void
120nv84_crypt_isr(struct drm_device *dev)
121{
122 u32 stat = nv_rd32(dev, 0x102130);
123 u32 mthd = nv_rd32(dev, 0x102190);
124 u32 data = nv_rd32(dev, 0x102194);
125 u32 inst = nv_rd32(dev, 0x102188) & 0x7fffffff;
126 int show = nouveau_ratelimit();
127
128 if (show) {
129 NV_INFO(dev, "PCRYPT_INTR: 0x%08x 0x%08x 0x%08x 0x%08x\n",
130 stat, mthd, data, inst);
131 }
132
133 nv_wr32(dev, 0x102130, stat);
134 nv_wr32(dev, 0x10200c, 0x10);
135
136 nv50_fb_vm_trap(dev, show, "PCRYPT");
110} 137}