Commit 0c088847 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mc: fix (incorrect) reporting of unknown pending intr bits

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 8df1d0c0
...@@ -25,6 +25,15 @@ ...@@ -25,6 +25,15 @@
#include <subdev/mc.h> #include <subdev/mc.h>
#include <core/option.h> #include <core/option.h>
static inline u32
nouveau_mc_intr_mask(struct nouveau_mc *pmc)
{
u32 intr = nv_rd32(pmc, 0x000100);
if (intr == 0xffffffff) /* likely fallen off the bus */
intr = 0x00000000;
return intr;
}
static irqreturn_t static irqreturn_t
nouveau_mc_intr(int irq, void *arg) nouveau_mc_intr(int irq, void *arg)
{ {
...@@ -37,16 +46,12 @@ nouveau_mc_intr(int irq, void *arg) ...@@ -37,16 +46,12 @@ nouveau_mc_intr(int irq, void *arg)
nv_wr32(pmc, 0x000140, 0x00000000); nv_wr32(pmc, 0x000140, 0x00000000);
nv_rd32(pmc, 0x000140); nv_rd32(pmc, 0x000140);
intr = nouveau_mc_intr_mask(pmc);
intr = nv_rd32(pmc, 0x000100);
if (intr == 0xffffffff) /* likely fallen off the bus */
intr = 0x00000000;
if (pmc->use_msi) if (pmc->use_msi)
oclass->msi_rearm(pmc); oclass->msi_rearm(pmc);
if (intr) { if (intr) {
u32 stat = nv_rd32(pmc, 0x000100); u32 stat = intr = nouveau_mc_intr_mask(pmc);
while (map->stat) { while (map->stat) {
if (intr & map->stat) { if (intr & map->stat) {
unit = nouveau_subdev(pmc, map->unit); unit = nouveau_subdev(pmc, map->unit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment