2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 02:04:05 +08:00

drm/nouveau/mc/gf100-: handle second interrupt tree

Doesn't fix any known issue, but best be safe in case control is handed
to us from firmware with these left enabled.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2015-08-20 14:54:22 +10:00
parent d4c4cc8373
commit ae0a5b2dd2
4 changed files with 38 additions and 9 deletions

View File

@ -48,6 +48,32 @@ gf100_mc_intr[] = {
{},
};
void
gf100_mc_intr_unarm(struct nvkm_mc *mc)
{
struct nvkm_device *device = mc->subdev.device;
nvkm_wr32(device, 0x000140, 0x00000000);
nvkm_wr32(device, 0x000144, 0x00000000);
nvkm_rd32(device, 0x000140);
}
void
gf100_mc_intr_rearm(struct nvkm_mc *mc)
{
struct nvkm_device *device = mc->subdev.device;
nvkm_wr32(device, 0x000140, 0x00000001);
nvkm_wr32(device, 0x000144, 0x00000001);
}
u32
gf100_mc_intr_mask(struct nvkm_mc *mc)
{
struct nvkm_device *device = mc->subdev.device;
u32 intr0 = nvkm_rd32(device, 0x000100);
u32 intr1 = nvkm_rd32(device, 0x000104);
return intr0 | intr1;
}
static void
gf100_mc_msi_rearm(struct nvkm_mc *mc)
{
@ -64,9 +90,9 @@ static const struct nvkm_mc_func
gf100_mc = {
.init = nv50_mc_init,
.intr = gf100_mc_intr,
.intr_unarm = nv04_mc_intr_unarm,
.intr_rearm = nv04_mc_intr_rearm,
.intr_mask = nv04_mc_intr_mask,
.intr_unarm = gf100_mc_intr_unarm,
.intr_rearm = gf100_mc_intr_rearm,
.intr_mask = gf100_mc_intr_mask,
.msi_rearm = gf100_mc_msi_rearm,
.unk260 = gf100_mc_unk260,
};

View File

@ -27,9 +27,9 @@ static const struct nvkm_mc_func
gf106_mc = {
.init = nv50_mc_init,
.intr = gf100_mc_intr,
.intr_unarm = nv04_mc_intr_unarm,
.intr_rearm = nv04_mc_intr_rearm,
.intr_mask = nv04_mc_intr_mask,
.intr_unarm = gf100_mc_intr_unarm,
.intr_rearm = gf100_mc_intr_rearm,
.intr_mask = gf100_mc_intr_mask,
.msi_rearm = nv40_mc_msi_rearm,
.unk260 = gf100_mc_unk260,
};

View File

@ -27,9 +27,9 @@ static const struct nvkm_mc_func
gk20a_mc = {
.init = nv50_mc_init,
.intr = gf100_mc_intr,
.intr_unarm = nv04_mc_intr_unarm,
.intr_rearm = nv04_mc_intr_rearm,
.intr_mask = nv04_mc_intr_mask,
.intr_unarm = gf100_mc_intr_unarm,
.intr_rearm = gf100_mc_intr_rearm,
.intr_mask = gf100_mc_intr_mask,
.msi_rearm = nv40_mc_msi_rearm,
};

View File

@ -38,5 +38,8 @@ void nv50_mc_init(struct nvkm_mc *);
extern const struct nvkm_mc_intr nv50_mc_intr[];
extern const struct nvkm_mc_intr gf100_mc_intr[];
void gf100_mc_intr_unarm(struct nvkm_mc *);
void gf100_mc_intr_rearm(struct nvkm_mc *);
u32 gf100_mc_intr_mask(struct nvkm_mc *);
void gf100_mc_unk260(struct nvkm_mc *, u32);
#endif