summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-10-11 14:56:39 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-11-08 16:04:14 +1000
commit3acda1366f79404ca4b0136e0b4071abb99a17bb (patch)
tree948f2dda7b2d53ec6453d348bd84117355c0f845 /drivers/gpu/drm/nouveau
parent2e4082aa877dda135bb5bef9d1c82b58e64ebc60 (diff)
drm/nouveau/mc: fetch NV_PMC_INTR again after re-arming MSI
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/mc/base.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c
index 9013de22a394..13746c338967 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c
@@ -32,7 +32,7 @@ nouveau_mc_intr(int irq, void *arg)
const struct nouveau_mc_intr *map = pmc->intr_map;
struct nouveau_device *device = nv_device(pmc);
struct nouveau_subdev *unit;
- u32 intr, stat;
+ u32 intr;
nv_wr32(pmc, 0x000140, 0x00000000);
nv_rd32(pmc, 0x000140);
@@ -41,7 +41,11 @@ nouveau_mc_intr(int irq, void *arg)
if (intr == 0xffffffff) /* likely fallen off the bus */
intr = 0x00000000;
- if ((stat = intr) != 0) {
+ if (pmc->use_msi)
+ nv_wr08(pmc, 0x088068, 0xff);
+
+ if (intr) {
+ u32 stat = nv_rd32(pmc, 0x000100);
while (map->stat) {
if (intr & map->stat) {
unit = nouveau_subdev(pmc, map->unit);
@@ -52,8 +56,6 @@ nouveau_mc_intr(int irq, void *arg)
map++;
}
- if (pmc->use_msi)
- nv_wr08(pmc, 0x088068, 0xff);
if (stat)
nv_error(pmc, "unknown intr 0x%08x\n", stat);
pm_runtime_mark_last_busy(&device->pdev->dev);