Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190149
b: refs/heads/master
c: 20bf377
h: refs/heads/master
i:
  190147: 37af5de
v: v3
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed Apr 22, 2010
1 parent c1dc300 commit 83ca50d
Show file tree
Hide file tree
Showing 3 changed files with 18 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: c36a2a6de59e4a141a68b7575de837d3b0bd96b3
refs/heads/master: 20bf377e679208ba9ae0edcb8c70a8f6d33d17f9
14 changes: 14 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,19 +1357,31 @@ static void i915_setup_compression(struct drm_device *dev, int size)

dev_priv->cfb_size = size;

dev_priv->compressed_fb = compressed_fb;

if (IS_GM45(dev)) {
g4x_disable_fbc(dev);
I915_WRITE(DPFC_CB_BASE, compressed_fb->start);
} else {
i8xx_disable_fbc(dev);
I915_WRITE(FBC_CFB_BASE, cfb_base);
I915_WRITE(FBC_LL_BASE, ll_base);
dev_priv->compressed_llb = compressed_llb;
}

DRM_DEBUG("FBC base 0x%08lx, ll base 0x%08lx, size %dM\n", cfb_base,
ll_base, size >> 20);
}

static void i915_cleanup_compression(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;

drm_mm_put_block(dev_priv->compressed_fb);
if (!IS_GM45(dev))
drm_mm_put_block(dev_priv->compressed_llb);
}

/* true = enable decode, false = disable decoder */
static unsigned int i915_vga_set_decode(void *cookie, bool state)
{
Expand Down Expand Up @@ -1787,6 +1799,8 @@ int i915_driver_unload(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);
i915_gem_cleanup_ringbuffer(dev);
mutex_unlock(&dev->struct_mutex);
if (I915_HAS_FBC(dev) && i915_powersave)
i915_cleanup_compression(dev);
drm_mm_takedown(&dev_priv->vram);
i915_gem_lastclose(dev);

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,9 @@ typedef struct drm_i915_private {
u8 max_delay;

enum no_fbc_reason no_fbc_reason;

struct drm_mm_node *compressed_fb;
struct drm_mm_node *compressed_llb;
} drm_i915_private_t;

/** driver private structure attached to each drm_gem_object */
Expand Down

0 comments on commit 83ca50d

Please sign in to comment.