From patchwork Tue Jul 17 18:02:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 1206601 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4021E3FC8E for ; Tue, 17 Jul 2012 18:21:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35B879EFAC for ; Tue, 17 Jul 2012 11:21:23 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CD5B9E779 for ; Tue, 17 Jul 2012 11:03:13 -0700 (PDT) Received: by mail-yx0-f177.google.com with SMTP id r9so744327yen.36 for ; Tue, 17 Jul 2012 11:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=CjMZZ/2o/Jd7lw2pb82EdtHMmuqwf9YuBjWrf3xFeRQ=; b=K1QmoC2s6YOgVQieCpLV8jyVw59eLzUiqdpwmZ8VUDlEiAcQNFnjqIOcXgEe+DU7zg tK9TEr59MR2u8BWC9NXaGQIvtxWZoD7V4Q5TX61oA0DKWHKUcNkETzxYKrdBWnkD/vu8 LowgwewQtban6/sCizmfxLPWZsXh9sSYbkRIn0B02akd71iH95/bkl06sNmf8VwPOe7Y tNcYsO1bZE6pwmsZz6WCEBNCMbHg6eQKuIY5ehfibMJfre00Xn+un09wqf+dy26GoAmX nLaFiKHyjMPHGpWwmZTi0HiH3AU83XiKcUYhib/Lh5itbCwtmthV8xqteW2OYt7TwvOm 3nFg== Received: by 10.236.190.104 with SMTP id d68mr2617349yhn.96.1342548192937; Tue, 17 Jul 2012 11:03:12 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPS id w61sm35713765yhi.5.2012.07.17.11.03.11 (version=SSLv3 cipher=OTHER); Tue, 17 Jul 2012 11:03:11 -0700 (PDT) From: alexdeucher@gmail.com To: airlied@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH 15/16] drm/radeon: fix up pll selection on DCE5/6 Date: Tue, 17 Jul 2012 14:02:43 -0400 Message-Id: <1342548164-1948-16-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1342548164-1948-1-git-send-email-alexdeucher@gmail.com> References: <1342548164-1948-1-git-send-email-alexdeucher@gmail.com> Cc: Alex Deucher 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: , MIME-Version: 1.0 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 From: Alex Deucher Selecting ATOM_PPLL_INVALID should be equivalent as the DCPLL or PPLL0 are already programmed for the DISPCLK, but the preferred method is to always specify the PLL selected. SetPixelClock will check the parameters and skip the programming if the PLL is already set up. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/atombios_crtc.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 3904d79..bbbeb98 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1539,7 +1539,11 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) * crtc virtual pixel clock. */ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_encoder))) { - if (ASIC_IS_DCE5(rdev) || rdev->clock.dp_extclk) + if (ASIC_IS_DCE5(rdev)) + return ATOM_DCPLL; + else if (ASIC_IS_DCE6(rdev)) + return ATOM_PPLL0; + else if (rdev->clock.dp_extclk) return ATOM_PPLL_INVALID; } }