Permalink
Browse files

commit all memory related changes before bisect

  • Loading branch information...
mlankhorst committed Apr 18, 2012
1 parent 9a48b6f commit ac4474bcebd55e3708a35b8d3728c3a7f82896e0
Showing with 12 additions and 5 deletions.
  1. +7 −3 pscnv/nouveau_mem.c
  2. +2 −2 pscnv/nouveau_perf.c
  3. +1 −0 pscnv/nvc0_vram.c
  4. +2 −0 pscnv/pscnv_gem.c
View
@@ -429,11 +429,13 @@ nouveau_mem_timing_calc(struct drm_device *dev, u32 freq,
ret = nvc0_mem_timing_calc(dev, freq, e, len, boot, t);
break;
default:
- ret = -ENODEV;
- break;
+ return -ENODEV;
}
- switch (dev_priv->vram_type * !ret) {
+ if (ret)
+ return ret;
+
+ switch (dev_priv->vram_type) {
case NV_MEM_TYPE_GDDR3:
ret = nouveau_mem_gddr3_mr(dev, freq, e, len, boot, t);
break;
@@ -447,6 +449,7 @@ nouveau_mem_timing_calc(struct drm_device *dev, u32 freq,
ret = nouveau_mem_ddr3_mr(dev, freq, e, len, boot, t);
break;
default:
+ NV_WARN(dev, "Unknown memory type %u\n", dev_priv->vram_type);
ret = -EINVAL;
break;
}
@@ -694,5 +697,6 @@ nouveau_mem_vbios_type(struct drm_device *dev)
}
}
+ WARN(dev, "Could not determine vbios type!\n");
return NV_MEM_TYPE_UNKNOWN;
}
View
@@ -377,7 +377,7 @@ nouveau_perf_init(struct drm_device *dev)
if (pm->voltage.supported && perflvl->volt_min) {
vid = nouveau_volt_vid_lookup_range(dev, perflvl->volt_min, perflvl->volt_max);
if (vid < 0) {
- NV_DEBUG(dev, "perflvl %d, bad vid\n", i);
+ NV_WARN(dev, "perflvl %d, bad vid\n", i);
continue;
}
}
@@ -386,7 +386,7 @@ nouveau_perf_init(struct drm_device *dev)
ret = nouveau_mem_timing_calc(dev, perflvl->memory,
&perflvl->timing);
if (ret) {
- NV_DEBUG(dev, "perflvl %d, bad timing: %d\n", i, ret);
+ NV_WARN(dev, "perflvl %d, bad timing: %d\n", i, ret);
continue;
}
View
@@ -49,6 +49,7 @@ nvc0_vram_init(struct drm_device *dev)
}
dev_priv->vram_type = nouveau_mem_vbios_type(dev);
+ WARN(dev_priv->vram_type == 9, "WTF?\n");
dev_priv->vram->alloc = nvc0_vram_alloc;
dev_priv->vram->free = pscnv_vram_free;
dev_priv->vram->takedown = pscnv_vram_takedown;
View
@@ -39,7 +39,9 @@ void pscnv_gem_free_object (struct drm_gem_object *obj) {
pscnv_mem_free(vo);
else
vo->gem = 0;
+#ifndef __linux__
drm_gem_free_mmap_offset(obj);
+#endif
drm_gem_object_release(obj);
kfree(obj);
}

0 comments on commit ac4474b

Please sign in to comment.