aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-03-16 01:32:16 -0400
committerBen Skeggs <bskeggs@redhat.com>2012-03-22 03:18:00 -0400
commitdd62608bcc8a629c4c583fb50b90003fd5213516 (patch)
tree81a52947d3f7a0522353828340eb6e8d4fa04eed /drivers/gpu
parent27100ac95a8eee0b083e46bfa67b229ac641d28c (diff)
drm/nvd0/disp: ignore clock set if no pclk
This happens somehow during init on a machine I have, and leads to a divide-by-zero. Lets avoid that... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nvd0_display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c
index 5e2b79bdcae0..421d301b3797 100644
--- a/drivers/gpu/drm/nouveau/nvd0_display.c
+++ b/drivers/gpu/drm/nouveau/nvd0_display.c
@@ -1661,7 +1661,9 @@ nvd0_display_unk2_handler(struct drm_device *dev, u32 crtc, u32 mask)
1661 } 1661 }
1662 1662
1663 pclk = nv_rd32(dev, 0x660450 + (crtc * 0x300)) / 1000; 1663 pclk = nv_rd32(dev, 0x660450 + (crtc * 0x300)) / 1000;
1664 if (mask & 0x00010000) { 1664 NV_DEBUG_KMS(dev, "PDISP: crtc %d pclk %d mask 0x%08x\n",
1665 crtc, pclk, mask);
1666 if (pclk && (mask & 0x00010000)) {
1665 nv50_crtc_set_clock(dev, crtc, pclk); 1667 nv50_crtc_set_clock(dev, crtc, pclk);
1666 } 1668 }
1667 1669