]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/nouveau/core/subdev/mc/base.c
Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux into drm...
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / core / subdev / mc / base.c
index ec9cd6f10f910aac9f56c4acbc4d9e09d393c85a..20f9a538746eeba0164bc73c69f9a67a6330e840 100644 (file)
  */
 
 #include <subdev/mc.h>
+#include <linux/pm_runtime.h>
 
 static irqreturn_t
 nouveau_mc_intr(int irq, void *arg)
 {
        struct nouveau_mc *pmc = arg;
        const struct nouveau_mc_intr *map = pmc->intr_map;
+       struct nouveau_device *device = nv_device(pmc);
        struct nouveau_subdev *unit;
        u32 stat, intr;
 
        intr = stat = nv_rd32(pmc, 0x000100);
+       if (intr == 0xffffffff)
+               return IRQ_NONE;
        while (stat && map->stat) {
                if (stat & map->stat) {
                        unit = nouveau_subdev(pmc, map->unit);
@@ -47,6 +51,8 @@ nouveau_mc_intr(int irq, void *arg)
                nv_error(pmc, "unknown intr 0x%08x\n", stat);
        }
 
+       if (stat == IRQ_HANDLED)
+               pm_runtime_mark_last_busy(&device->pdev->dev);
        return stat ? IRQ_HANDLED : IRQ_NONE;
 }