summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-05-19 23:59:35 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-06-16 14:04:52 +1000
commit3607bfd398204ddb11f63c09b1cc608adf85f96c (patch)
treeac276e7c019fd7db2dac46270a81647fcfd9586c /drivers/gpu/drm/nouveau/nvkm/engine/disp
parent7d0a01a6dec9737d24be5ac223e73a0725eac8a0 (diff)
downloadlinux-stable-3607bfd398204ddb11f63c09b1cc608adf85f96c.tar.gz
linux-stable-3607bfd398204ddb11f63c09b1cc608adf85f96c.tar.bz2
linux-stable-3607bfd398204ddb11f63c09b1cc608adf85f96c.zip
drm/nouveau/disp/nv50-: execute supervisor on its own workqueue
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c10
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h1
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
index 94eb6b29e14c..2ffbb995f134 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
@@ -459,7 +459,7 @@ gf119_disp_intr(struct nv50_disp *disp)
u32 stat = nvkm_rd32(device, 0x6100ac);
if (stat & 0x00000007) {
disp->super = (stat & 0x00000007);
- schedule_work(&disp->supervisor);
+ queue_work(disp->wq, &disp->supervisor);
nvkm_wr32(device, 0x6100ac, disp->super);
stat &= ~0x00000007;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
index acc663061ceb..21bdf301d37e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
@@ -111,6 +111,8 @@ nv50_disp_dtor_(struct nvkm_disp *base)
{
struct nv50_disp *disp = nv50_disp(base);
nvkm_event_fini(&disp->uevent);
+ if (disp->wq)
+ destroy_workqueue(disp->wq);
return disp;
}
@@ -136,7 +138,6 @@ nv50_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
if (!(disp = kzalloc(sizeof(*disp), GFP_KERNEL)))
return -ENOMEM;
- INIT_WORK(&disp->supervisor, func->super);
disp->func = func;
*pdisp = &disp->base;
@@ -144,6 +145,11 @@ nv50_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
if (ret)
return ret;
+ disp->wq = create_singlethread_workqueue("nvkm-disp");
+ if (!disp->wq)
+ return -ENOMEM;
+ INIT_WORK(&disp->supervisor, func->super);
+
for (i = 0; func->head.new && i < heads; i++) {
ret = func->head.new(&disp->base, i);
if (ret)
@@ -803,7 +809,7 @@ nv50_disp_intr(struct nv50_disp *disp)
if (intr1 & 0x00000070) {
disp->super = (intr1 & 0x00000070);
- schedule_work(&disp->supervisor);
+ queue_work(disp->wq, &disp->supervisor);
nvkm_wr32(device, 0x610024, disp->super);
}
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
index 06249f62747c..fe7ef0abef6e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
@@ -12,6 +12,7 @@ struct nv50_disp {
const struct nv50_disp_func *func;
struct nvkm_disp base;
+ struct workqueue_struct *wq;
struct work_struct supervisor;
u32 super;