diff options
author | Younes Manton <younes.m@gmail.com> | 2011-11-22 20:58:31 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-11-30 14:40:52 +0100 |
commit | 1a97b4ace09d7d3fe213a73bc466ca33af98c91c (patch) | |
tree | 97b09f24217d9042d87f39359a0536bef4766a76 /drivers/gpu | |
parent | drm/nvd0/disp: fix sor dpms typo, preventing dpms on in some situations (diff) | |
download | linux-1a97b4ace09d7d3fe213a73bc466ca33af98c91c.tar.xz linux-1a97b4ace09d7d3fe213a73bc466ca33af98c91c.zip |
drm/nouveau: Keep RAMIN heap within the channel.
The entire RAMIN is allocated to be 'size', but the heap is
specified as 'base' + 'size' inside RAMIN, so it will overflow
past RAMIN by 'base' bytes on NV50+ and clobber other allocatons
unless it's size is adjusted.
Signed-off-by: Younes Manton <younes.m@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index 02222c540aee..960c0ae0c0c3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c @@ -680,7 +680,7 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan) return ret; } - ret = drm_mm_init(&chan->ramin_heap, base, size); + ret = drm_mm_init(&chan->ramin_heap, base, size - base); if (ret) { NV_ERROR(dev, "Error creating PRAMIN heap: %d\n", ret); nouveau_gpuobj_ref(NULL, &chan->ramin); |