]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/nv04-nv40: Give "gpuobj->cinst" the same meaning as on nv50.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 20 Nov 2010 13:42:57 +0000 (14:42 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 8 Dec 2010 02:00:09 +0000 (03:00 +0100)
No functional changes, just simplify some code paths a bit.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_ramht.c
drivers/gpu/drm/nouveau/nouveau_sgdma.c

index 924653c30783c01594f2fbfb32df7163e7a94ed2..2fb7e9d47500d708363e0b43deae0cde19141ab3 100644 (file)
@@ -202,11 +202,7 @@ nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan,
                if (gpuobj->pinst != ~0)
                        gpuobj->pinst += ramin->start;
 
-               if (dev_priv->card_type < NV_50)
-                       gpuobj->cinst = gpuobj->pinst;
-               else
-                       gpuobj->cinst = ramin->start;
-
+               gpuobj->cinst = ramin->start;
                gpuobj->vinst = ramin->start + chan->ramin->vinst;
                gpuobj->node  = ramin;
        } else {
index d4a2adc927d8113b22dec8c2867c2c168676475c..bef3e691041863a0523f0b7ba7aa2ea1626af760 100644 (file)
@@ -104,12 +104,12 @@ nouveau_ramht_insert(struct nouveau_channel *chan, u32 handle,
        nouveau_gpuobj_ref(gpuobj, &entry->gpuobj);
 
        if (dev_priv->card_type < NV_40) {
-               ctx = NV_RAMHT_CONTEXT_VALID | (gpuobj->cinst >> 4) |
+               ctx = NV_RAMHT_CONTEXT_VALID | (gpuobj->pinst >> 4) |
                      (chan->id << NV_RAMHT_CONTEXT_CHANNEL_SHIFT) |
                      (gpuobj->engine << NV_RAMHT_CONTEXT_ENGINE_SHIFT);
        } else
        if (dev_priv->card_type < NV_50) {
-               ctx = (gpuobj->cinst >> 4) |
+               ctx = (gpuobj->pinst >> 4) |
                      (chan->id << NV40_RAMHT_CONTEXT_CHANNEL_SHIFT) |
                      (gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT);
        } else {
index db32644f61140b22c7e8eb38179726c1fc5b5830..a0bf130b02d385f8c85627f5e42b8d78d2e415b5 100644 (file)
@@ -241,12 +241,6 @@ nouveau_sgdma_init(struct drm_device *dev)
        }
 
        if (dev_priv->card_type < NV_50) {
-               /* special case, allocated from global instmem heap so
-                * cinst is invalid, we use it on all channels though so
-                * cinst needs to be valid, set it the same as pinst
-                */
-               gpuobj->cinst = gpuobj->pinst;
-
                nv_wo32(gpuobj, 0, NV_CLASS_DMA_IN_MEMORY |
                                   (1 << 12) /* PT present */ |
                                   (0 << 13) /* PT *not* linear */ |