OSDN Git Service

nouveau: Don't be so strict on <NV50
authorBen Skeggs <skeggsb@gmail.com>
Mon, 9 Jul 2007 10:02:14 +0000 (20:02 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Mon, 9 Jul 2007 10:02:14 +0000 (20:02 +1000)
shared-core/nouveau_object.c

index a394ae6..bf811b4 100644 (file)
@@ -331,18 +331,18 @@ nouveau_gpuobj_instance_get(drm_device_t *dev, int channel,
        drm_nouveau_private_t *dev_priv = dev->dev_private;
        nouveau_gpuobj_t *cpramin;
 
-       if ((channel > 0) && gpuobj->im_channel != channel) {
-               DRM_ERROR("Channel mismatch: obj %d, ref %d\n",
-                         gpuobj->im_channel, channel);
-               return DRM_ERR(EINVAL);
-       }
-
        /* <NV50 use PRAMIN address everywhere */
        if (dev_priv->card_type < NV_50) {
                *inst = gpuobj->im_pramin->start;
                return 0;
        }
 
+       if ((channel > 0) && gpuobj->im_channel != channel) {
+               DRM_ERROR("Channel mismatch: obj %d, ref %d\n",
+                         gpuobj->im_channel, channel);
+               return DRM_ERR(EINVAL);
+       }
+
        /* NV50 channel-local instance */
        if (channel > 0) {
                cpramin = dev_priv->fifos[channel]->ramin->gpuobj;