From 3234aa1b7e48c8e2a3629e574209efbd54aede9d Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 30 Jul 2013 00:33:32 +0100 Subject: [PATCH] XXX: fdo#67382 * bump up the delay * remove the stabilisation * set DAC_CLK_CTRL1 Signed-off-by: Emil Velikov --- drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c index a60a5ac..8bb66ac 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c @@ -50,15 +50,33 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval) { const u32 doff = (or * 0x800); int load = -EINVAL; + + nv_wr32(priv, 0x61a010 + doff, 0x00000001); + + nv_info(priv, "%s (1) - 0x%08x(%d): 0x%08x\n", __func__, + (0x61a004 + doff), or, nv_rd32(priv, 0x61a004 + doff)); + nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80150000); nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000); nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval); udelay(9500); + udelay(9500); + udelay(9500); +/* nv_wr32(priv, 0x61a00c + doff, 0x80000000); +*/ load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27; nv_wr32(priv, 0x61a00c + doff, 0x00000000); + + nv_info(priv, "%s (2) - 0x%08x(%d): 0x%08x\n", __func__, + (0x61a004 + doff), or, nv_rd32(priv, 0x61a004 + doff)); + nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000); nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000); + + nv_info(priv, "%s (3) - 0x%08x(%d): 0x%08x\n", __func__, + (0x61a004 + doff), or, nv_rd32(priv, 0x61a004 + doff)); + return load; } @@ -76,9 +94,13 @@ nv50_dac_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size) switch (mthd & ~0x3f) { case NV50_DISP_DAC_PWR: ret = priv->dac.power(priv, or, data[0]); + nv_info(priv, "%s power(or %d, data[0] 0x%08x) 0x%08x\n", + __func__, or, data[0], ret); break; case NV50_DISP_DAC_LOAD: ret = priv->dac.sense(priv, or, data[0]); + nv_info(priv, "%s sense(or %d, data[0] 0x%08x) 0x%08x\n", + __func__, or, data[0], ret); if (ret >= 0) { data[0] = ret; ret = 0; -- 1.8.3.3