Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269630
b: refs/heads/master
c: 270a574
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Sep 20, 2011
1 parent 0c88bc7 commit 70a6988
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83fc083cbbe0147519b1a62770171041c19e8752
refs/heads/master: 270a5747802d4cf43b91b9e03cccb1fb5d5e8a34
60 changes: 60 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nvd0_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,42 @@ nvd0_sor_create(struct drm_connector *connector, struct dcb_entry *dcbe)
/******************************************************************************
* IRQ
*****************************************************************************/
static void
nvd0_display_unk1_handler(struct drm_device *dev)
{
u32 unk0 = nv_rd32(dev, 0x6101d0);

NV_INFO(dev, "PDISP: unk1 0x%08x\n", unk0);

nv_wr32(dev, 0x6101d4, 0x00000000);
nv_wr32(dev, 0x6109d4, 0x00000000);
nv_wr32(dev, 0x6101d0, 0x80000000);
}

static void
nvd0_display_unk2_handler(struct drm_device *dev)
{
u32 unk0 = nv_rd32(dev, 0x6101d0);

NV_INFO(dev, "PDISP: unk2 0x%08x\n", unk0);

nv_wr32(dev, 0x6101d4, 0x00000000);
nv_wr32(dev, 0x6109d4, 0x00000000);
nv_wr32(dev, 0x6101d0, 0x80000000);
}

static void
nvd0_display_unk4_handler(struct drm_device *dev)
{
u32 unk0 = nv_rd32(dev, 0x6101d0);

NV_INFO(dev, "PDISP: unk4 0x%08x\n", unk0);

nv_wr32(dev, 0x6101d4, 0x00000000);
nv_wr32(dev, 0x6109d4, 0x00000000);
nv_wr32(dev, 0x6101d0, 0x80000000);
}

static void
nvd0_display_intr(struct drm_device *dev)
{
Expand All @@ -291,6 +327,29 @@ nvd0_display_intr(struct drm_device *dev)
intr &= ~0x00000002;
}

if (intr & 0x00100000) {
u32 stat = nv_rd32(dev, 0x6100ac);

if (stat & 0x00000007) {
nv_wr32(dev, 0x6100ac, (stat & 0x00000007));

if (stat & 0x00000001)
nvd0_display_unk1_handler(dev);
if (stat & 0x00000002)
nvd0_display_unk2_handler(dev);
if (stat & 0x00000004)
nvd0_display_unk4_handler(dev);
stat &= ~0x00000007;
}

if (stat) {
NV_INFO(dev, "PDISP: unknown intr24 0x%08x\n", stat);
nv_wr32(dev, 0x6100ac, stat);
}

intr &= ~0x00100000;
}

if (intr & 0x01000000) {
u32 stat = nv_rd32(dev, 0x6100bc);
nv_wr32(dev, 0x6100bc, stat);
Expand Down Expand Up @@ -354,6 +413,7 @@ nvd0_display_init(struct drm_device *dev)
}

nv_wr32(dev, 0x610010, (disp->mem->vinst >> 8) | 9);
nv_mask(dev, 0x6100b0, 0x00000307, 0x00000307);

/* init master */
nv_wr32(dev, 0x610494, (disp->evo[0].handle >> 8) | 3);
Expand Down

0 comments on commit 70a6988

Please sign in to comment.