Permalink
Browse files

fix vram timing support

  • Loading branch information...
1 parent 87b89bc commit 79f17b37db59bd5a9d6cacf45f4da87bebe2cf0e @mlankhorst mlankhorst committed Apr 19, 2012
Showing with 6 additions and 3 deletions.
  1. +4 −3 pscnv/nouveau_mem.c
  2. +2 −0 pscnv/nouveau_state.c
View
@@ -425,6 +425,7 @@ nouveau_mem_timing_calc(struct drm_device *dev, u32 freq,
case NV_50:
ret = nv50_mem_timing_calc(dev, freq, e, len, boot, t);
break;
+ case NV_D0:
case NV_C0:
ret = nvc0_mem_timing_calc(dev, freq, e, len, boot, t);
break;
@@ -523,13 +524,13 @@ nouveau_mem_timing_read(struct drm_device *dev, struct nouveau_pm_memtiming *t)
}
t->mr[0] = nv_rd32(dev, mr_base);
- if (dev_priv->card_type < NV_C0) {
+ if (dev_priv->vram_type != NV_MEM_TYPE_GDDR5) {
t->mr[1] = nv_rd32(dev, mr_base + 0x04);
t->mr[2] = nv_rd32(dev, mr_base + 0x20);
t->mr[3] = nv_rd32(dev, mr_base + 0x24);
} else {
- int i, mr = dev_priv->vram_type = NV_MEM_TYPE_GDDR5 ? 9 : 4;
- for (i = 1; i < mr; ++i)
+ int i;
+ for (i = 1; i < 9; ++i)
t->mr[i] = nv_rd32(dev, mr_base + 0x2c + i * 4);
}
@@ -479,6 +479,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
NV_INFO(dev, "Stopping card...\n");
nouveau_backlight_exit(dev);
drm_irq_uninstall(dev);
+ flush_workqueue(dev_priv->wq);
for (i = 0; i < PSCNV_ENGINES_NUM; i++)
if (dev_priv->engines[i]) {
dev_priv->engines[i]->takedown(dev_priv->engines[i]);
@@ -780,6 +781,7 @@ int nouveau_unload(struct drm_device *dev)
nouveau_display_destroy(dev);
nouveau_close(dev);
}
+ destroy_workqueue(dev_priv->wq);
drm_rmmap(dev, dev_priv->mmio);
drm_rmmap(dev, dev_priv->ramin);

0 comments on commit 79f17b3

Please sign in to comment.