Commit 30f02cb7 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'drm-nouveau-fixes' of...

Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

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
parents 7b850530 565f571c
...@@ -43,7 +43,7 @@ dcb_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) ...@@ -43,7 +43,7 @@ dcb_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
*ver = nv_ro08(bios, dcb); *ver = nv_ro08(bios, dcb);
if (*ver >= 0x41) { 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; return 0x0000;
} else } else
if (*ver >= 0x30) { if (*ver >= 0x30) {
......
...@@ -277,7 +277,6 @@ nv50_fb_dtor(struct nouveau_object *object) ...@@ -277,7 +277,6 @@ nv50_fb_dtor(struct nouveau_object *object)
__free_page(priv->r100c08_page); __free_page(priv->r100c08_page);
} }
nouveau_mm_fini(&priv->base.vram);
nouveau_fb_destroy(&priv->base); nouveau_fb_destroy(&priv->base);
} }
......
...@@ -456,6 +456,7 @@ static struct ttm_tt * ...@@ -456,6 +456,7 @@ static struct ttm_tt *
nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,
uint32_t page_flags, struct page *dummy_read) uint32_t page_flags, struct page *dummy_read)
{ {
#if __OS_HAS_AGP
struct nouveau_drm *drm = nouveau_bdev(bdev); struct nouveau_drm *drm = nouveau_bdev(bdev);
struct drm_device *dev = drm->dev; struct drm_device *dev = drm->dev;
...@@ -463,6 +464,7 @@ nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, ...@@ -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, return ttm_agp_tt_create(bdev, dev->agp->bridge, size,
page_flags, dummy_read); page_flags, dummy_read);
} }
#endif
return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read); return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read);
} }
......
...@@ -52,7 +52,7 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl, ...@@ -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_drm *drm = nouveau_drm(dev);
struct nouveau_pm *pm = nouveau_pm(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; int ret;
/*XXX: not on all boards, we should control based on temperature /*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, ...@@ -64,7 +64,6 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
ret = therm->fan_set(therm, perflvl->fanspeed); ret = therm->fan_set(therm, perflvl->fanspeed);
if (ret && ret != -ENODEV) { if (ret && ret != -ENODEV) {
NV_ERROR(drm, "fanspeed set failed: %d\n", ret); NV_ERROR(drm, "fanspeed set failed: %d\n", ret);
return ret;
} }
} }
...@@ -706,8 +705,7 @@ nouveau_hwmon_init(struct drm_device *dev) ...@@ -706,8 +705,7 @@ nouveau_hwmon_init(struct drm_device *dev)
struct device *hwmon_dev; struct device *hwmon_dev;
int ret = 0; int ret = 0;
if (!therm || !therm->temp_get || !therm->attr_get || if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
!therm->attr_set || therm->temp_get(therm) < 0)
return -ENODEV; return -ENODEV;
hwmon_dev = hwmon_device_register(&dev->pdev->dev); hwmon_dev = hwmon_device_register(&dev->pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment