From patchwork Fri Oct 5 14:34:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 1553321 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 5E75ADF24C for ; Fri, 5 Oct 2012 14:35:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45A80A0B28 for ; Fri, 5 Oct 2012 07:35:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 69E40A0AE7 for ; Fri, 5 Oct 2012 07:34:41 -0700 (PDT) Received: by mail-qa0-f42.google.com with SMTP id t11so319837qaa.15 for ; Fri, 05 Oct 2012 07:34:40 -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; bh=h7P/MwSD1FAyLsqyO1F6iYqviwtF5K3n839pH8v+m6k=; b=Q0wDcOE2tmOF9c2SAlt8AIu9p2B4JSRjR/FFTSSxVmUUoVN2MACqAjV2tJ70WHHRT5 Fkjgi5p7zFcTWr2o/g0cZdDlK/8gRomXXB6NBmTyq15IRfHjTkq96iFcgOORBTI/apXE yIfsUviML42DYqi3cU4hpu9ombodGCfoRvkJNRomONqkjFyUMHfNKUFVxwJRImXM+ckz M/3jUHE6jhE0PnkzAfJQscyMZA3xBykziorluHk4avJe5QRm60BElqoc6SuCGKKOY0NH VxUaf5jri8vmvY5WNR9unOJu5Utyhgif1WoWZiJVGvTnhvcu2J7t9vxqa6agh1zm5j1k NyjA== Received: by 10.224.70.141 with SMTP id d13mr17069981qaj.99.1349447680844; Fri, 05 Oct 2012 07:34:40 -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 q7sm10262591qeo.6.2012.10.05.07.34.39 (version=SSLv3 cipher=OTHER); Fri, 05 Oct 2012 07:34:40 -0700 (PDT) From: alexdeucher@gmail.com To: airlied@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: allocate PPLLs from low to high Date: Fri, 5 Oct 2012 10:34:32 -0400 Message-Id: <1349447672-8585-1-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 Cc: Alex Deucher , Markus Trippelsdorf 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 The order shouldn't matter, but there have been problems reported on certain older asics. This behaves more like the original code before the PPLL allocation rework. Signed-off-by: Alex Deucher Cc: Markus Trippelsdorf --- drivers/gpu/drm/radeon/atombios_crtc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 96184d0..2e566e1 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1690,10 +1690,10 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) } /* all other cases */ pll_in_use = radeon_get_pll_use_mask(crtc); - if (!(pll_in_use & (1 << ATOM_PPLL2))) - return ATOM_PPLL2; if (!(pll_in_use & (1 << ATOM_PPLL1))) return ATOM_PPLL1; + if (!(pll_in_use & (1 << ATOM_PPLL2))) + return ATOM_PPLL2; DRM_ERROR("unable to allocate a PPLL\n"); return ATOM_PPLL_INVALID; } else { @@ -1715,10 +1715,10 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) } /* all other cases */ pll_in_use = radeon_get_pll_use_mask(crtc); - if (!(pll_in_use & (1 << ATOM_PPLL2))) - return ATOM_PPLL2; if (!(pll_in_use & (1 << ATOM_PPLL1))) return ATOM_PPLL1; + if (!(pll_in_use & (1 << ATOM_PPLL2))) + return ATOM_PPLL2; DRM_ERROR("unable to allocate a PPLL\n"); return ATOM_PPLL_INVALID; } else {