Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293763
b: refs/heads/master
c: 7c5f6a8
h: refs/heads/master
i:
  293761: 92d7578
  293759: fd942a9
v: v3
  • Loading branch information
Ben Skeggs committed Mar 13, 2012
1 parent 08375f3 commit d9afd75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29181d2f7bec0f51273ceab8c565410d52ef1eb0
refs/heads/master: 7c5f6a87b2337cc81fb6d16e848501e2dbe00a3d
33 changes: 14 additions & 19 deletions trunk/drivers/gpu/drm/nouveau/nvd0_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ nvd0_display_bh(unsigned long data)
{
struct drm_device *dev = (struct drm_device *)data;
struct nvd0_display *disp = nvd0_display(dev);
u32 mask, crtc;
u32 mask = 0, crtc = ~0;
int i;

if (drm_debug & (DRM_UT_DRIVER | DRM_UT_KMS)) {
Expand All @@ -1564,12 +1564,8 @@ nvd0_display_bh(unsigned long data)
}
}

mask = nv_rd32(dev, 0x6101d4);
crtc = 0;
if (!mask) {
mask = nv_rd32(dev, 0x6109d4);
crtc = 1;
}
while (!mask && ++crtc < dev->mode_config.num_crtc)
mask = nv_rd32(dev, 0x6101d4 + (crtc * 0x800));

if (disp->modeset & 0x00000001)
nvd0_display_unk1_handler(dev, crtc, mask);
Expand All @@ -1584,6 +1580,7 @@ nvd0_display_intr(struct drm_device *dev)
{
struct nvd0_display *disp = nvd0_display(dev);
u32 intr = nv_rd32(dev, 0x610088);
int i;

if (intr & 0x00000001) {
u32 stat = nv_rd32(dev, 0x61008c);
Expand Down Expand Up @@ -1628,16 +1625,13 @@ nvd0_display_intr(struct drm_device *dev)
intr &= ~0x00100000;
}

if (intr & 0x01000000) {
u32 stat = nv_rd32(dev, 0x6100bc);
nv_wr32(dev, 0x6100bc, stat);
intr &= ~0x01000000;
}

if (intr & 0x02000000) {
u32 stat = nv_rd32(dev, 0x6108bc);
nv_wr32(dev, 0x6108bc, stat);
intr &= ~0x02000000;
for (i = 0; i < dev->mode_config.num_crtc; i++) {
u32 mask = 0x01000000 << i;
if (intr & mask) {
u32 stat = nv_rd32(dev, 0x6100bc + (i * 0x800));
nv_wr32(dev, 0x6100bc + (i * 0x800), stat);
intr &= ~mask;
}
}

if (intr)
Expand Down Expand Up @@ -1774,15 +1768,16 @@ nvd0_display_create(struct drm_device *dev)
struct pci_dev *pdev = dev->pdev;
struct nvd0_display *disp;
struct dcb_entry *dcbe;
int ret, i;
int crtcs, ret, i;

disp = kzalloc(sizeof(*disp), GFP_KERNEL);
if (!disp)
return -ENOMEM;
dev_priv->engine.display.priv = disp;

/* create crtc objects to represent the hw heads */
for (i = 0; i < 2; i++) {
crtcs = nv_rd32(dev, 0x022448);
for (i = 0; i < crtcs; i++) {
ret = nvd0_crtc_create(dev, i);
if (ret)
goto out;
Expand Down

0 comments on commit d9afd75

Please sign in to comment.