From patchwork Fri Feb 11 08:27:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 548871 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1B8RDW5018992 for ; Fri, 11 Feb 2011 08:27:34 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0D739F005 for ; Fri, 11 Feb 2011 00:27:12 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B22C9E7FB for ; Fri, 11 Feb 2011 00:27:02 -0800 (PST) Received: by fxm19 with SMTP id 19so2493806fxm.36 for ; Fri, 11 Feb 2011 00:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=99SENmpjAh2kO0kMLkB52YOkHkdTYwU4jAMh3T5Y9Cw=; b=O9VZzl1J2Wgq2QzWBm52vg4AZ8VVrLGcE99lszoeV0SjW5Kfhbsqu+EzMsHLC6LrN5 PfwcS+1uDgcCbrprzNA9LNT3sTGEtBCmlIc1O1VA+N1/mwpV8adWOneXeNkWxNtgD/zJ 9StvD3pNZVN+K2Irqhleh9JgCkWRgjH/EfwD8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CnSh7vKj2zxRpF7dG3APuKHt6muVXCuvS9E2EvAtBvwZh/58oGXcF+2Tz1GCcrGFa8 dkNmqQWg1wH01zIoHhMrnoauxi7/eASWz4a4jLAkjfzSY/lXX9eHhq9qUNRl38anek/F CSNamBRZMgFpnQORkVE/e7VbbtLeHVYnpf820= MIME-Version: 1.0 Received: by 10.223.86.2 with SMTP id q2mr240228fal.139.1297412821799; Fri, 11 Feb 2011 00:27:01 -0800 (PST) Received: by 10.223.114.68 with HTTP; Fri, 11 Feb 2011 00:27:01 -0800 (PST) In-Reply-To: References: <4D51AD03.7030401@gmail.com> Date: Fri, 11 Feb 2011 03:27:01 -0500 Message-ID: Subject: Re: [BISECTED] commit 619efb1059 makes the MacBookPro2,2 screen flicker like its broken or half plugged in From: Alex Deucher To: Justin Mattock Cc: airlied@redhat.com, "linux-kernel@vger.kernel.org" , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Feb 2011 08:27:34 +0000 (UTC) From e1c5703223d21441bcbdd222572e592984e5ae10 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 11 Feb 2011 02:25:51 -0500 Subject: [PATCH] drm/radeon/kms: hopefully fix pll issues for real The problematic boards have a recommended reference divider to be used when spread spectrum is enabled on the laptop panel. Enable the use of the recommended reference divider along with the new pll algo. This should hopefully fix the issues across the board. Signed-off-by: Alex Deucher Cc: stable@kernel.org --- drivers/gpu/drm/radeon/atombios_crtc.c | 18 +++++------------- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index dd4e3ac..638f926 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -555,8 +555,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, dp_clock = dig_connector->dp_clock; } } -/* this might work properly with the new pll algo */ -#if 0 /* doesn't work properly on some laptops */ + /* use recommended ref_div for ss */ if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { if (ss_enabled) { @@ -566,18 +565,15 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, } } } -#endif + if (ASIC_IS_AVIVO(rdev)) { /* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */ if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1) adjusted_clock = mode->clock * 2; if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) pll->flags |= RADEON_PLL_PREFER_CLOSEST_LOWER; - /* rv515 needs more testing with this option */ - if (rdev->family != CHIP_RV515) { - if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) - pll->flags |= RADEON_PLL_IS_LCD; - } + if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) + pll->flags |= RADEON_PLL_IS_LCD; } else { if (encoder->encoder_type != DRM_MODE_ENCODER_DAC) pll->flags |= RADEON_PLL_NO_ODD_POST_DIV; @@ -957,11 +953,7 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode /* adjust pixel clock as needed */ adjusted_clock = atombios_adjust_pll(crtc, mode, pll, ss_enabled, &ss); - /* rv515 seems happier with the old algo */ - if (rdev->family == CHIP_RV515) - radeon_compute_pll_legacy(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div, - &ref_div, &post_div); - else if (ASIC_IS_AVIVO(rdev)) + if (ASIC_IS_AVIVO(rdev)) radeon_compute_pll_avivo(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div, &ref_div, &post_div); else -- 1.7.1.1