Skip to content

Commit

Permalink
drm/nvd0/disp: ignore clock set if no pclk
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Ben Skeggs committed Mar 22, 2012
1 parent 27100ac commit dd62608
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/nouveau/nvd0_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,9 @@ nvd0_display_unk2_handler(struct drm_device *dev, u32 crtc, u32 mask)
}

pclk = nv_rd32(dev, 0x660450 + (crtc * 0x300)) / 1000;
if (mask & 0x00010000) {
NV_DEBUG_KMS(dev, "PDISP: crtc %d pclk %d mask 0x%08x\n",
crtc, pclk, mask);
if (pclk && (mask & 0x00010000)) {
nv50_crtc_set_clock(dev, crtc, pclk);
}

Expand Down

0 comments on commit dd62608

Please sign in to comment.