提交 dd62608b 编写于 作者: B Ben Skeggs

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: NBen Skeggs <bskeggs@redhat.com>
上级 27100ac9
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册