diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-16 02:25:26 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 02:27:13 -0400 |
commit | 442b626ece6fbbe7f52c03a09f85ae5755f29eab (patch) | |
tree | 923e916c7a8ff361ea1ad16e91c219a661d75c27 /drivers/gpu/drm/nouveau/nouveau_hw.c | |
parent | 02c30ca0a1d6d8b878fc32f47b3b25192ef4a8ef (diff) |
drm/nv04-nv40: import initial pm backend
Currently just hooked up to the already-existing nouveau_hw, which should
handle all relevant chipsets as well as we currently can.
This will likely be eventually split out and improved into chipset specific
code at a later point.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_hw.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_hw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_hw.c b/drivers/gpu/drm/nouveau/nouveau_hw.c index e228aafc03e0..ebcf8a8190c2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hw.c +++ b/drivers/gpu/drm/nouveau/nouveau_hw.c | |||
@@ -431,7 +431,8 @@ nouveau_hw_get_pllvals(struct drm_device *dev, enum pll_types plltype, | |||
431 | struct pll_lims pll_lim; | 431 | struct pll_lims pll_lim; |
432 | int ret; | 432 | int ret; |
433 | 433 | ||
434 | BUG_ON(reg1 == 0); | 434 | if (reg1 == 0) |
435 | return -ENOENT; | ||
435 | 436 | ||
436 | pll1 = nvReadMC(dev, reg1); | 437 | pll1 = nvReadMC(dev, reg1); |
437 | 438 | ||
@@ -480,6 +481,7 @@ int | |||
480 | nouveau_hw_get_clock(struct drm_device *dev, enum pll_types plltype) | 481 | nouveau_hw_get_clock(struct drm_device *dev, enum pll_types plltype) |
481 | { | 482 | { |
482 | struct nouveau_pll_vals pllvals; | 483 | struct nouveau_pll_vals pllvals; |
484 | int ret; | ||
483 | 485 | ||
484 | if (plltype == PLL_MEMORY && | 486 | if (plltype == PLL_MEMORY && |
485 | (dev->pci_device & 0x0ff0) == CHIPSET_NFORCE) { | 487 | (dev->pci_device & 0x0ff0) == CHIPSET_NFORCE) { |
@@ -499,7 +501,9 @@ nouveau_hw_get_clock(struct drm_device *dev, enum pll_types plltype) | |||
499 | return clock; | 501 | return clock; |
500 | } | 502 | } |
501 | 503 | ||
502 | nouveau_hw_get_pllvals(dev, plltype, &pllvals); | 504 | ret = nouveau_hw_get_pllvals(dev, plltype, &pllvals); |
505 | if (ret) | ||
506 | return ret; | ||
503 | 507 | ||
504 | return nouveau_hw_pllvals_to_clk(&pllvals); | 508 | return nouveau_hw_pllvals_to_clk(&pllvals); |
505 | } | 509 | } |