From patchwork Fri Oct 5 14:02:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 1553261 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 7649CDF24C for ; Fri, 5 Oct 2012 14:06:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FA7AA0DD1 for ; Fri, 5 Oct 2012 07:06:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 997D6A0C2B for ; Fri, 5 Oct 2012 07:02:23 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj13so528533wib.12 for ; Fri, 05 Oct 2012 07:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=D1Ma4v31E8Cn7w8Cw0wYIeIpWn+1z18woLp3+osEVBI=; b=BSmNVWvigvH+F58JPalcId+YPRk9DZDLQp9H9kVyyG2/nH6JjsSc1GR7grBEJYHmDd TVN/0qwBBw87TMduowHKPvtU5SYFf5hRpd1/7MawFi3GJedMOsdEAwd9rOlWLLV1ORR1 Ya/Jet0HLShx6c7L7cvBWT+Wm9gGQT020JwW/IYc4vYD46wK5Ks4HsAkHlulldIq9s9O NuNW9t/gYTj7+jxPIHQDk58dZ3Gkpf7vVf+Kd4cpR5H+Qdln0nOQp7eOZNxnlOsxAEbk womc9BCVF631ucm1logCAC1BaDlwMT5K6qxiEArJL1EkFzppmOC0qcklThFtw5iwEmZd rdQg== MIME-Version: 1.0 Received: by 10.216.150.197 with SMTP id z47mr5188305wej.221.1349445742363; Fri, 05 Oct 2012 07:02:22 -0700 (PDT) Received: by 10.227.6.213 with HTTP; Fri, 5 Oct 2012 07:02:22 -0700 (PDT) In-Reply-To: <20121005133817.GA247@x4> References: <20121005123752.GA245@x4> <20121005133817.GA247@x4> Date: Fri, 5 Oct 2012 10:02:22 -0400 Message-ID: Subject: Re: Monitor sync out of range with current Linux git tree From: Alex Deucher To: Markus Trippelsdorf Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org On Fri, Oct 5, 2012 at 9:38 AM, Markus Trippelsdorf wrote: > On 2012.10.05 at 09:14 -0400, Alex Deucher wrote: >> On Fri, Oct 5, 2012 at 8:37 AM, Markus Trippelsdorf >> wrote: >> > When I cold start my machine I see the following error message on my >> > monitor: >> > >> > Out of Range >> > 48.2kHz / 44Hz >> > >> > I have to reboot on older kernel and kexec to the current one to get it >> > working again. >> >> I don't see anything amiss; can you bisect? > > Yes. It's your commit: > > commit 9dbbcfc6894957fdbb311ba92c85c026659878b5 > Author: Alex Deucher > Date: Wed Sep 12 17:39:57 2012 -0400 > > drm/radeon/dce3: use a single PPLL for all DP displays Can you apply the attached patch and send me the output? Thanks, Alex From 730c061b3983fab93141a84a82f1e478c9e90990 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 27 Sep 2012 10:56:48 -0400 Subject: [PATCH] pll debug Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/atombios_crtc.c | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 96184d0..1f7e5fe 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1565,6 +1565,10 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc) !ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_radeon_crtc->encoder))) { /* check if we are already driving this connector with another crtc */ if (test_radeon_crtc->connector == radeon_crtc->connector) { + DRM_INFO("crtc %d and crtc %d (0x%x) both driving %s\n", + radeon_crtc->crtc_id, test_radeon_crtc->crtc_id, + test_radeon_crtc->pll_id, + drm_get_connector_name(radeon_crtc->connector)); /* if we are, return that pll */ if (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) return test_radeon_crtc->pll_id; @@ -1574,8 +1578,10 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc) if ((crtc->mode.clock == test_crtc->mode.clock) && (adjusted_clock == test_adjusted_clock) && (radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) && - (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID)) + (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID)) { + DRM_INFO("found pll 0x%x with matched clock\n", test_radeon_crtc->pll_id); return test_radeon_crtc->pll_id; + } } } return ATOM_PPLL_INVALID; @@ -1631,6 +1637,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) /* UNIPHY A uses PPLL2 */ return ATOM_PPLL2; else if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) { + DRM_INFO("crtc %d is DP\n", radeon_crtc->crtc_id); /* UNIPHY B/C/D/E/F */ if (rdev->clock.dp_extclk) /* skip PPLL programming if using ext clock */ @@ -1642,6 +1649,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) return pll; } } else { + DRM_INFO("crtc %d is not DP\n", radeon_crtc->crtc_id); /* use the same PPLL for all monitors with the same clock */ pll = radeon_get_shared_nondp_ppll(crtc); if (pll != ATOM_PPLL_INVALID) @@ -1649,6 +1657,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) } /* UNIPHY B/C/D/E/F */ pll_in_use = radeon_get_pll_use_mask(crtc); + DRM_INFO("plls in use 0x%x\n", pll_in_use); if (!(pll_in_use & (1 << ATOM_PPLL0))) return ATOM_PPLL0; if (!(pll_in_use & (1 << ATOM_PPLL1))) @@ -1667,6 +1676,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) * crtc virtual pixel clock. */ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) { + DRM_INFO("crtc %d is DP\n", radeon_crtc->crtc_id); if (rdev->clock.dp_extclk) /* skip PPLL programming if using ext clock */ return ATOM_PPLL_INVALID; @@ -1683,6 +1693,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) return pll; } } else { + DRM_INFO("crtc %d is not DP\n", radeon_crtc->crtc_id); /* use the same PPLL for all monitors with the same clock */ pll = radeon_get_shared_nondp_ppll(crtc); if (pll != ATOM_PPLL_INVALID) @@ -1690,6 +1701,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) } /* all other cases */ pll_in_use = radeon_get_pll_use_mask(crtc); + DRM_INFO("plls in use 0x%x\n", pll_in_use); if (!(pll_in_use & (1 << ATOM_PPLL2))) return ATOM_PPLL2; if (!(pll_in_use & (1 << ATOM_PPLL1))) @@ -1703,11 +1715,13 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) * DCE3: PPLL1 or PPLL2 */ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) { + DRM_INFO("crtc %d is DP\n", radeon_crtc->crtc_id); /* use the same PPLL for all DP monitors */ pll = radeon_get_shared_dp_ppll(crtc); if (pll != ATOM_PPLL_INVALID) return pll; } else { + DRM_INFO("crtc %d is not DP\n", radeon_crtc->crtc_id); /* use the same PPLL for all monitors with the same clock */ pll = radeon_get_shared_nondp_ppll(crtc); if (pll != ATOM_PPLL_INVALID) @@ -1715,6 +1729,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) } /* all other cases */ pll_in_use = radeon_get_pll_use_mask(crtc); + DRM_INFO("plls in use 0x%x\n", pll_in_use); if (!(pll_in_use & (1 << ATOM_PPLL2))) return ATOM_PPLL2; if (!(pll_in_use & (1 << ATOM_PPLL1))) @@ -1811,7 +1826,11 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, if (!atombios_crtc_prepare_pll(crtc, adjusted_mode)) return false; /* pick pll */ + DRM_INFO("== start crtc %d driving %s ==\n", radeon_crtc->crtc_id, + drm_get_connector_name(radeon_crtc->connector)); radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); + DRM_INFO("crtc %d using pll 0x%x\n", radeon_crtc->crtc_id, radeon_crtc->pll_id); + DRM_INFO("== end crtc %d ==\n", radeon_crtc->crtc_id); /* if we can't get a PPLL for a non-DP encoder, fail */ if ((radeon_crtc->pll_id == ATOM_PPLL_INVALID) && !ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) -- 1.7.7.5