summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-03-29 05:59:52 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-03-29 05:59:52 +0200
commit938defafe2da5a787b63f64023bef5d54e097424 (patch)
tree9aa247ec8e29de273cfdceafcbb5a45ad7f97fd5
parentc4598c615aa3a9f7d0ef1c4231cff0b2885128eb (diff)
.
-rw-r--r--nvlib.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/nvlib.h b/nvlib.h
index 51d0555..aa9c8d5 100644
--- a/nvlib.h
+++ b/nvlib.h
@@ -1162,6 +1162,7 @@ struct nv_channel_vram : public nv_channel_direct
uint32_t vram_handle;
uint32_t vram_ctxdma;
+ uint32_t base;
uint32_t our_put;
nv_channel_vram(struct nv_device* dev, int channel)
@@ -1176,7 +1177,8 @@ struct nv_channel_vram : public nv_channel_direct
vram_handle = entry.handle;
/* the middle of vram is hopefully away from anything critical */
- our_put = dev->vram_mappable_size / 2;
+ put = dev->rd_put(channel);
+ our_put = base = dev->vram_mappable_size / 2;
}
virtual void outp(void* buf, int dwords)
@@ -1190,7 +1192,7 @@ struct nv_channel_vram : public nv_channel_direct
if(put != our_put) {
if(!taken) {
orig_getput = dev->rd_put(channel);
- put = our_put;
+ put = base;
orig_ctxdma = dev->ramfc->fc[channel]->rd32(dev->ramfc->fc_fifo) << 4;
if(dev->card_type < NV_40)