From 042a6c8513f38931031fa2a638e7ebac2fb98630 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 27 Jun 2013 19:59:22 +0100 Subject: [PATCH] fdo66129: printfs Signed-off-by: Emil Velikov --- drivers/gpu/drm/nouveau/core/engine/disp/nv50.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c index 314dda6..851317a 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c @@ -780,6 +780,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int outp, u32 ctrl, struct nouveau_bios *bios = nouveau_bios(priv); u16 mask, type, data; + nv_info(priv, "%s:%d outp %s\n", __func__, __LINE__, outp); if (outp < 4) { type = DCB_OUTPUT_ANALOG; mask = 0; @@ -813,10 +814,14 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int outp, u32 ctrl, mask |= 0x0001 << outp; mask |= 0x0100 << head; + nv_info(priv, "%s:%d dcb_outp_match(t %u, m %u)\n", __func__, + __LINE__, type, mask); data = dcb_outp_match(bios, type, mask, ver, hdr, dcb); if (!data) return 0x0000; + nv_info(priv, "%s:%d data %u, dcb->location %d\n", __func__, + __LINE__, data, dcb->location); /* off-chip encoders require matching the exact encoder type */ if (dcb->location != 0) type |= dcb->extdev << 8; @@ -854,10 +859,15 @@ exec_script(struct nv50_disp_priv *priv, int head, int id) } } + nv_info(priv, "%s:%d ctrl %u, head %d\n", __func__, __LINE__, + ctrl, head); + /* PIOR */ if (!(ctrl & (1 << head))) { for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) ctrl = nv_rd32(priv, 0x610b84 + (i * 8)); + nv_info(priv, "%s:%d ctrl %u, head %d\n", __func__, __LINE__, + ctrl, head); i += 8; } @@ -867,6 +877,9 @@ exec_script(struct nv50_disp_priv *priv, int head, int id) data = exec_lookup(priv, head, i, ctrl, &dcb, &ver, &hdr, &cnt, &len, &info); if (data) { + nv_info(priv, "%s:%d ctrl %u, head %d\n", __func__, __LINE__, + ctrl, head); + struct nvbios_init init = { .subdev = nv_subdev(priv), .bios = bios, @@ -913,10 +926,14 @@ exec_clkcmp(struct nv50_disp_priv *priv, int head, int id, u32 pclk, } } + nv_info(priv, "%s:%d ctrl %u, head %d\n", __func__, __LINE__, + ctrl, head); /* PIOR */ if (!(ctrl & (1 << head))) { for (i = 0; !(ctrl & (1 << head)) && i < 3; i++) ctrl = nv_rd32(priv, 0x610b80 + (i * 8)); + nv_info(priv, "%s:%d ctrl %u, head %d\n", __func__, __LINE__, + ctrl, head); i += 8; } @@ -1104,6 +1121,7 @@ nv50_disp_intr_unk20(struct nv50_disp_priv *priv, u32 super) /* check whether a vpll change is required */ head = ffs((super & 0x00000600) >> 9) - 1; + nv_info(priv, "%s:%d head %d\n", __func__, __LINE__, head); if (head >= 0) { u32 pclk = nv_rd32(priv, 0x610ad0 + (head * 0x540)) & 0x3fffff; if (pclk) { @@ -1114,6 +1132,7 @@ nv50_disp_intr_unk20(struct nv50_disp_priv *priv, u32 super) /* (re)attach the relevant OR to the head */ head = ffs((super & 0x00000180) >> 7) - 1; + nv_info(priv, "%s:%d head %d\n", __func__, __LINE__, head); if (head >= 0) { u32 pclk = nv_rd32(priv, 0x610ad0 + (head * 0x540)) & 0x3fffff; u32 hval, hreg = 0x614200 + (head * 0x800); @@ -1157,6 +1176,11 @@ nv50_disp_intr_unk20(struct nv50_disp_priv *priv, u32 super) hval = 0x00000001; } + nv_info(priv, "%s:%d r[0x%x] 0x%x%d\n", __func__, + __LINE__, hreg, nv_rd32(priv, hreg)); + nv_info(priv, "%s:%d r[0x%x] 0x%x%d\n", __func__, + __LINE__, oreg, nv_rd32(priv, oreg)); + nv_mask(priv, hreg, 0x0000000f, hval); nv_mask(priv, oreg, 0x00000707, oval); } -- 1.8.3.1