Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199583
b: refs/heads/master
c: 9517a92
h: refs/heads/master
i:
  199581: c767239
  199579: 692b758
  199575: 1d1b159
  199567: 8074225
  199551: b1317a4
v: v3
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed May 26, 2010
1 parent 40d01cb commit 7a6c98e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: d1b851fc0d105caa6b6e3e7c92d2987dfb52cbe0
refs/heads/master: 9517a92f48b08bb02cfb616825850b82b28461cc
13 changes: 11 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,19 +1029,28 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
void i8xx_disable_fbc(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long timeout = jiffies + msecs_to_jiffies(1);
u32 fbc_ctl;

if (!I915_HAS_FBC(dev))
return;

if (!(I915_READ(FBC_CONTROL) & FBC_CTL_EN))
return; /* Already off, just return */

/* Disable compression */
fbc_ctl = I915_READ(FBC_CONTROL);
fbc_ctl &= ~FBC_CTL_EN;
I915_WRITE(FBC_CONTROL, fbc_ctl);

/* Wait for compressing bit to clear */
while (I915_READ(FBC_STATUS) & FBC_STAT_COMPRESSING)
; /* nothing */
while (I915_READ(FBC_STATUS) & FBC_STAT_COMPRESSING) {
if (time_after(jiffies, timeout)) {
DRM_DEBUG_DRIVER("FBC idle timed out\n");
break;
}
; /* do nothing */
}

intel_wait_for_vblank(dev);

Expand Down

0 comments on commit 7a6c98e

Please sign in to comment.