Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
authorDave Airlie <airlied@redhat.com>
Tue, 16 Oct 2012 06:33:48 +0000 (16:33 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 16 Oct 2012 06:34:11 +0000 (16:34 +1000)
minor set of nouveau fixes.

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau/bios: fix typo in error message
  drm/nouveau: only call ttm_agp_tt_create when __OS_HAS_AGP
  drm/nv50/fb: fix double free of vram mm
  drm/nouveau/pm: do not stop reclocking if failing to set the fan speed
  drm/nouveau/pm: fix a typo related to the move to the therm subdev
  drm/nouveau/hwmon: fix the initialization condition

drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_pm.c

index 9ed6e728a94c920ef870ea35d516f0a79863309a..7d750382a833c33b64fbbf40c98a1d8f936399e2 100644 (file)
@@ -43,7 +43,7 @@ dcb_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
        *ver = nv_ro08(bios, dcb);
 
        if (*ver >= 0x41) {
-               nv_warn(bios, "DCB *ver 0x%02x unknown\n", *ver);
+               nv_warn(bios, "DCB version 0x%02x unknown\n", *ver);
                return 0x0000;
        } else
        if (*ver >= 0x30) {
index 436e9efe7ef5d862c047a308b77d394c10238118..42d7539e65250d239a9e7f8c65efd68855b76c90 100644 (file)
@@ -277,7 +277,6 @@ nv50_fb_dtor(struct nouveau_object *object)
                __free_page(priv->r100c08_page);
        }
 
-       nouveau_mm_fini(&priv->base.vram);
        nouveau_fb_destroy(&priv->base);
 }
 
index 259e5f1adf4754ba270b22f8d32cc992695a28be..35ac57f0aab640c034b29cc15c8ca0315d1f8ec5 100644 (file)
@@ -456,6 +456,7 @@ static struct ttm_tt *
 nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,
                      uint32_t page_flags, struct page *dummy_read)
 {
+#if __OS_HAS_AGP
        struct nouveau_drm *drm = nouveau_bdev(bdev);
        struct drm_device *dev = drm->dev;
 
@@ -463,6 +464,7 @@ nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,
                return ttm_agp_tt_create(bdev, dev->agp->bridge, size,
                                         page_flags, dummy_read);
        }
+#endif
 
        return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read);
 }
index 0bf64c90aa206cc42879e2621a8da1f5481e7f4d..5566172774df4b2ff891db4745483b8655754a5b 100644 (file)
@@ -52,7 +52,7 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nouveau_pm *pm = nouveau_pm(dev);
-       struct nouveau_therm *therm = nouveau_therm(drm);
+       struct nouveau_therm *therm = nouveau_therm(drm->device);
        int ret;
 
        /*XXX: not on all boards, we should control based on temperature
@@ -64,7 +64,6 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
                ret = therm->fan_set(therm, perflvl->fanspeed);
                if (ret && ret != -ENODEV) {
                        NV_ERROR(drm, "fanspeed set failed: %d\n", ret);
-                       return ret;
                }
        }
 
@@ -706,8 +705,7 @@ nouveau_hwmon_init(struct drm_device *dev)
        struct device *hwmon_dev;
        int ret = 0;
 
-       if (!therm || !therm->temp_get || !therm->attr_get ||
-               !therm->attr_set || therm->temp_get(therm) < 0)
+       if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
                return -ENODEV;
 
        hwmon_dev = hwmon_device_register(&dev->pdev->dev);