drm/nvd0: add a card_type for 0xdX chipsets
authorBen Skeggs <bskeggs@redhat.com>
Sat, 2 Jul 2011 10:28:49 +0000 (20:28 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 20 Sep 2011 06:04:45 +0000 (16:04 +1000)
These are different enough from 0xcX to justify it, half fermi, half
kepler(??)..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_vm.c

index 890d50e4d68246e957217166bddf747aac1278aa..7226f419e178b64e76d9a65a7d341f1de874b746 100644 (file)
@@ -956,7 +956,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
                        break;
                }
 
-               if (dev_priv->card_type == NV_C0)
+               if (dev_priv->card_type >= NV_C0)
                        page_shift = node->page_shift;
                else
                        page_shift = 12;
index 6629f30598f3da32996305d1a2f054213c7e3381..842cd7acde8a844afd07815f858ef1e212bb1a15 100644 (file)
@@ -637,6 +637,7 @@ enum nouveau_card_type {
        NV_40      = 0x40,
        NV_50      = 0x50,
        NV_C0      = 0xc0,
+       NV_D0      = 0xd0
 };
 
 struct drm_nouveau_private {
index 159b7c437d3f69cf42d813d65335223309b3c5bd..363379c226ed237302f8279ab2aa34d2143dd998 100644 (file)
@@ -746,7 +746,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
        int ret, i;
 
        NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h);
-       if (dev_priv->card_type == NV_C0)
+       if (dev_priv->card_type >= NV_C0)
                return nvc0_gpuobj_channel_init(chan, vm);
 
        /* Allocate a chunk of memory for per-channel object storage */
index d432a2a791f26181e73ca3245f3ddc28af90ebab..ef0832b29ad2e94ee84e0cde3165fca8b8a4560e 100644 (file)
@@ -306,7 +306,7 @@ nouveau_vm_new(struct drm_device *dev, u64 offset, u64 length, u64 mm_offset,
                        block = length;
 
        } else
-       if (dev_priv->card_type == NV_C0) {
+       if (dev_priv->card_type >= NV_C0) {
                vm->map_pgt = nvc0_vm_map_pgt;
                vm->map = nvc0_vm_map;
                vm->map_sg = nvc0_vm_map_sg;