diff options
author | Nian Wu <nian@graphics.(none)> | 2007-02-25 17:06:13 -0800 |
---|---|---|
committer | Nian Wu <nian@graphics.(none)> | 2007-02-25 17:06:13 -0800 |
commit | df2fc3ec62d6799a3266cfb18b1279a126892f44 (patch) | |
tree | 94d39b9172bce8c93cb035e40d12e635dfaeb12f /shared-core/nouveau_mem.c | |
parent | 80095ffe01efe79983c2124ecc99ce979d7ac6a9 (diff) | |
parent | 9d8ba2d0d479f53b996c0a0e366acfee52daab3b (diff) |
Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestline
Diffstat (limited to 'shared-core/nouveau_mem.c')
-rw-r--r-- | shared-core/nouveau_mem.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c index cd53d25d..3b1f443c 100644 --- a/shared-core/nouveau_mem.c +++ b/shared-core/nouveau_mem.c @@ -35,7 +35,7 @@ #include "drm_sarea.h" #include "nouveau_drv.h" -static int meminit_ok=0; +//static int meminit_ok=0; static struct mem_block *split_block(struct mem_block *p, uint64_t start, uint64_t size, DRMFILE filp) @@ -373,10 +373,9 @@ struct mem_block* nouveau_mem_alloc(struct drm_device *dev, int alignment, uint6 /* * Init memory if needed */ - if (meminit_ok==0) + if (dev_priv->fb_phys == 0) { nouveau_mem_init(dev); - meminit_ok=1; } /* @@ -446,8 +445,10 @@ alloc_ok: void nouveau_mem_free(struct drm_device* dev, struct mem_block* block) { + drm_nouveau_private_t *dev_priv = dev->dev_private; + DRM_INFO("freeing 0x%llx\n", block->start); - if (meminit_ok==0) + if (dev_priv->fb_phys == 0) { DRM_ERROR("%s called without init\n", __FUNCTION__); return; |