Skip to content

Commit

Permalink
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Dave Airlie committed Oct 16, 2012
2 parents 7b85053 + 565f571 commit 30f02cb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,15 @@ 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;

if (drm->agp.stat == ENABLED) {
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);
}
Expand Down
6 changes: 2 additions & 4 deletions drivers/gpu/drm/nouveau/nouveau_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 30f02cb

Please sign in to comment.