From patchwork Wed May 22 15:32:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 2602391 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 A7E85DF215 for ; Wed, 22 May 2013 15:36:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99C63E631C for ; Wed, 22 May 2013 08:36:00 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 39612E6434 for ; Wed, 22 May 2013 08:33:07 -0700 (PDT) Received: by mail-qc0-f169.google.com with SMTP id k15so1129007qcv.0 for ; Wed, 22 May 2013 08:33:06 -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=0J0RDyZTYnOETJ10oFHD9rGuZYtPqnafHi47ayLMftg=; b=egr/XOR1B84hDutFx8HxwKjHU55gMuRRKU+wq8Z26MBwld6dFlfVjQJqwRmwm+D99p pT1sw84N6gg9Xh+NllYFrXkfAv9xC8hs2sL7PYg3EGsS1f3GT4BTLGeROa03VYkisITn eHKC7etgANxG8I37+Pyo9Fl3lb7Jz8ARUXi3lXvmZqjQT+M3T0Ii6WSoCw5t2XizseTC 7+Rf1xztcpuSB1tf6THCaneLNX5L6y0dKk05SBKozUvXOy5lZxoD1zPpWsQ+RHrn+bnG VMxLBYEo0HwXT5hM07tuiz5ZX5JmRTsYszltoERifBNOc/QacoM6DZZSL7TCIBC+10vk NuAg== X-Received: by 10.229.165.205 with SMTP id j13mr2776466qcy.147.1369236786569; Wed, 22 May 2013 08:33:06 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPSA id y14sm6861193qac.0.2013.05.22.08.33.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 May 2013 08:33:06 -0700 (PDT) From: alexdeucher@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/radeon: don't check crtcs in card_posted() on cards without DCE Date: Wed, 22 May 2013 11:32:56 -0400 Message-Id: <1369236776-19306-2-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1369236776-19306-1-git-send-email-alexdeucher@gmail.com> References: <1369236776-19306-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 Skip checking crtcs in hardware without them. Avoids checking non-existent hardware. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_device.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 89cc816..af82c9b 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -471,6 +471,9 @@ bool radeon_card_posted(struct radeon_device *rdev) rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) return false; + if (ASIC_IS_NODCE(rdev)) + goto check_memsize; + /* first check CRTCs */ if (ASIC_IS_DCE4(rdev)) { reg = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET) | @@ -499,6 +502,7 @@ bool radeon_card_posted(struct radeon_device *rdev) } } +check_memsize: /* then check MEM_SIZE, in case the crtcs are off */ if (rdev->family >= CHIP_R600) reg = RREG32(R600_CONFIG_MEMSIZE);