From: Roy Spliet Date: Thu, 21 Aug 2014 11:45:15 +0000 (+0200) Subject: drm/nva3/clk: Abort when PLL doesn't lock X-Git-Tag: v3.18-rc1~44^2~36^2~41 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=275dd6f48f9954df94ad15b4dc303fa7f820777c;p=karo-tx-linux.git drm/nva3/clk: Abort when PLL doesn't lock Signed-off-by: Roy Spliet Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c b/drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c index c676de6d1da6..fd00397bc15e 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/nva3.c @@ -311,7 +311,11 @@ prog_pll(struct nva3_clock_priv *priv, int clk, u32 pll, int idx) nv_wr32(priv, coef, info->pll); nv_mask(priv, ctrl, 0x00000015, 0x00000015); nv_mask(priv, ctrl, 0x00000010, 0x00000000); - nv_wait(priv, ctrl, 0x00020000, 0x00020000); + if (!nv_wait(priv, ctrl, 0x00020000, 0x00020000)) { + nv_mask(priv, ctrl, 0x00000010, 0x00000010); + nv_mask(priv, src0, 0x00000101, 0x00000000); + return; + } nv_mask(priv, ctrl, 0x00000010, 0x00000010); nv_mask(priv, ctrl, 0x00000008, 0x00000000); disable_clk_src(priv, src1);