Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375486
b: refs/heads/master
c: 3cdc0e8
h: refs/heads/master
v: v3
  • Loading branch information
Christopher Harvey authored and Dave Airlie committed May 13, 2013
1 parent bb9151e commit 5628868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: fb70a6690875315a3a1454e52fa339441ee7612b
refs/heads/master: 3cdc0e8d6142aaf3eb84a53eab6de1160da290a3
15 changes: 6 additions & 9 deletions trunk/drivers/gpu/drm/mgag200/mgag200_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,26 @@ static void mga_crtc_load_lut(struct drm_crtc *crtc)

static inline void mga_wait_vsync(struct mga_device *mdev)
{
unsigned int count = 0;
unsigned long timeout = jiffies + HZ/10;
unsigned int status = 0;

do {
status = RREG32(MGAREG_Status);
count++;
} while ((status & 0x08) && (count < 250000));
count = 0;
} while ((status & 0x08) && time_before(jiffies, timeout));
timeout = jiffies + HZ/10;
status = 0;
do {
status = RREG32(MGAREG_Status);
count++;
} while (!(status & 0x08) && (count < 250000));
} while (!(status & 0x08) && time_before(jiffies, timeout));
}

static inline void mga_wait_busy(struct mga_device *mdev)
{
unsigned int count = 0;
unsigned long timeout = jiffies + HZ;
unsigned int status = 0;
do {
status = RREG8(MGAREG_Status + 2);
count++;
} while ((status & 0x01) && (count < 500000));
} while ((status & 0x01) && time_before(jiffies, timeout));
}

/*
Expand Down

0 comments on commit 5628868

Please sign in to comment.