From patchwork Fri Jan 4 19:10:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1934331 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 112833FDDA for ; Fri, 4 Jan 2013 19:11:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB952E66B7 for ; Fri, 4 Jan 2013 11:11:35 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vb0-f73.google.com (mail-vb0-f73.google.com [209.85.212.73]) by gabe.freedesktop.org (Postfix) with ESMTP id 2EBBCE5FA9 for ; Fri, 4 Jan 2013 11:10:33 -0800 (PST) Received: by mail-vb0-f73.google.com with SMTP id l1so1785913vba.0 for ; Fri, 04 Jan 2013 11:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=uxDPVRdLNHoYjX88TTE9CoqDAfS3qFsdJfo3b4Ra/XY=; b=Xvwyifk4KnMBX3L7AWwWFsYBtCPPURpisdyCBH5ui9maTWoVhR1So+nssrdmdpcA1f Kky8ktHwY6CKWZnBPCaO9iWgQMnRtugqhOjshBYJNwtkPvF+4XRZCtWQv/C3ogoLAmjd GfMWV9ufysai9WmTsUl/br4A0nh2mZ8uY5zyYBdtOh9O3kwblDXEIkhQX4s++WEjEgSF 9P7ecuuCRiobHO4kM0cldFyTouFNWTJuGso4GjV1xwYZqWmYWEjDfF0qsCNLpxSftllj 3JNFKByss/n6nyPjK+YWDp3tSQI+1l13z5IGkK/lwGS59prbuokld9vO9pYIuB10oUwN 27mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=uxDPVRdLNHoYjX88TTE9CoqDAfS3qFsdJfo3b4Ra/XY=; b=FGaQo88OdB8f/iAUcfqGABuiKm5MNwG3Z+SjaaxA4o8uV5CzQx/KGnmwIOMmFQpNZ0 nb30PS4pJcngASw8Y77vo83qNzMRKK7B0b47b/FpaYvJYQCr+2lKdQf8xPoTcR9TLB4P lT6pya/L3hlBwtXmHydfswVzM09PuD5LcCFNacrpo1oUlPPJ/sJNQ34hF1BIS5mPZuOP rNcQ3cs6QPdz1YaUR3tsvBbEWfDaqIHjHMKLLgOqhM6J2UK8dKpRoqZGRzyvtPMB90TF nMFh2kqQu4G80HJh/dH2ZUge0XlxU6hrjkVwcccalM/+TKOUjupcovgXNsV0sRfbSAiq /+fA== X-Received: by 10.236.137.65 with SMTP id x41mr26358155yhi.48.1357326632408; Fri, 04 Jan 2013 11:10:32 -0800 (PST) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id l20si4426118yhi.2.2013.01.04.11.10.32 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 04 Jan 2013 11:10:32 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 4F59682004A; Fri, 4 Jan 2013 11:10:32 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 0EBA618016C; Fri, 4 Jan 2013 11:10:32 -0800 (PST) Subject: [PATCH 1/3] drm/pci: Use the standard #defines for PCIe Link Capability bits To: David Airlie From: Bjorn Helgaas Date: Fri, 04 Jan 2013 12:10:32 -0700 Message-ID: <20130104191031.4586.63513.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20130104190833.4586.16520.stgit@bhelgaas.mtv.corp.google.com> References: <20130104190833.4586.16520.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk7kD9isfTkfONybGLLp4f62N4n0avcMwypzLGKTYkPdgitA1rd+2enWIuDJBnEMkiCET6yWhwbczB40o9tJg/f+IyX8s8QvSHTEqOCz5jzEb1vrzYG6+aF521POPb/MXs6S5b4TQP9/l5sB7h7jJbvf0CdkL5bbBnt0iXdvyRCAvPYNwfTJ27QIDqU4Tbp4qJJOej++6fWitmakMQTMEBytoeayA== Cc: linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, Betty Dall , Lucas Kannebley Tavares , 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: , 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 Use the standard #defines rather than bare numbers for the PCIe Link Capabilities speed bits. Signed-off-by: Bjorn Helgaas --- drivers/gpu/drm/drm_pci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index 754bc96..11c8add 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -504,9 +504,9 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) *mask |= DRM_PCIE_SPEED_80; } else { - if (lnkcap & 1) + if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) *mask |= DRM_PCIE_SPEED_25; - if (lnkcap & 2) + if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) *mask |= DRM_PCIE_SPEED_50; }