mirror of
https://github.com/torvalds/linux.git
synced 2026-05-04 14:32:27 -04:00
drm/nouveau/sec2: move interrupt handler to hw-specific module
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
@@ -25,27 +25,6 @@
|
||||
#include <core/msgqueue.h>
|
||||
#include <subdev/top.h>
|
||||
|
||||
static void
|
||||
nvkm_sec2_intr(struct nvkm_engine *engine)
|
||||
{
|
||||
struct nvkm_sec2 *sec2 = nvkm_sec2(engine);
|
||||
struct nvkm_subdev *subdev = &sec2->engine.subdev;
|
||||
struct nvkm_falcon *falcon = &sec2->falcon;
|
||||
u32 disp = nvkm_falcon_rd32(falcon, 0x01c);
|
||||
u32 intr = nvkm_falcon_rd32(falcon, 0x008) & disp & ~(disp >> 16);
|
||||
|
||||
if (intr & 0x00000040) {
|
||||
schedule_work(&sec2->work);
|
||||
nvkm_falcon_wr32(falcon, 0x004, 0x00000040);
|
||||
intr &= ~0x00000040;
|
||||
}
|
||||
|
||||
if (intr) {
|
||||
nvkm_error(subdev, "unhandled intr %08x\n", intr);
|
||||
nvkm_falcon_wr32(falcon, 0x004, intr);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nvkm_sec2_recv(struct work_struct *work)
|
||||
{
|
||||
@@ -60,6 +39,13 @@ nvkm_sec2_recv(struct work_struct *work)
|
||||
nvkm_msgqueue_recv(sec2->queue);
|
||||
}
|
||||
|
||||
static void
|
||||
nvkm_sec2_intr(struct nvkm_engine *engine)
|
||||
{
|
||||
struct nvkm_sec2 *sec2 = nvkm_sec2(engine);
|
||||
sec2->func->intr(sec2);
|
||||
}
|
||||
|
||||
static int
|
||||
nvkm_sec2_fini(struct nvkm_engine *engine, bool suspend)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user