From 320c731b6b702bba05db52ba2b3faf876d803bff Mon Sep 17 00:00:00 2001 From: amfern Date: Wed, 10 Aug 2016 01:55:44 +0300 Subject: [PATCH] nvkm_gpuobj size is smaller then nvkm_gpuobj size candiate fix --- drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c index a7bd227..dc3d61f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c @@ -79,6 +79,8 @@ nvkm_gpuobj_heap_slow = { static void * nvkm_gpuobj_heap_acquire(struct nvkm_gpuobj *gpuobj) { + printk("#### nvkm_gpuobj_heap_acquire gpuobj->addr %llu, gpuobj->size %u \n", gpuobj->addr, gpuobj->size); + gpuobj->map = nvkm_kmap(gpuobj->memory); if (likely(gpuobj->map)) gpuobj->func = &nvkm_gpuobj_heap_fast; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c index 6d512c0..3ff50d2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c @@ -64,7 +64,15 @@ nv50_instobj_addr(struct nvkm_memory *memory) static u64 nv50_instobj_size(struct nvkm_memory *memory) { - return (u64)nv50_instobj(memory)->mem->size << NVKM_RAM_MM_SHIFT; + u64 size = nv50_instobj(memory)->mem->size << NVKM_RAM_MM_SHIFT; + + printk("#### nv50_instobj_size %llu \n", size); + + if (size == 0x3000) { + return 0x97000; + } + + return size; } static void -- 2.8.1