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: 209521 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 204F12C0080 for ; Sat, 5 Jan 2013 06:10:34 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754548Ab3ADTKd (ORCPT ); Fri, 4 Jan 2013 14:10:33 -0500 Received: from mail-gh0-f202.google.com ([209.85.160.202]:48884 "EHLO mail-gh0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528Ab3ADTKd (ORCPT ); Fri, 4 Jan 2013 14:10:33 -0500 Received: by mail-gh0-f202.google.com with SMTP id z10so1474000ghb.3 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=KWBkxc5tZkjD56CAjb8vkhug2yt6vZl0SFwhwxrbwjD+84KLx8lCf2C60bRe4Iv/Jo 0SNUmd10MHVWKWLfEhrcxSeiy8PvwtjawZVfpm2SMdHCQ6VePfTRc7jJJogm1++IHO+F 0GwSBw+UVdD152oErZ3Gryl6DteTvKsBXwxqYLJJjAuK9ym5XcPtJBaXy6Pnr/t7MBpH On7CsJy8yK0XWziyFhimy0SoUkKN+9h6LmRfwplcGklvuz0+rY7Ry41dvCfiSw+1Kqir s3tLvhePXelZJV7Bja5XpwxH+ovgWrrZGIyKrtr7wGw68OWkRpCi4NgAMyYHwXIFmh99 +rUg== 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 Cc: linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, Alex Deucher , Betty Dall , Lucas Kannebley Tavares , Ilija Hadzic 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: ALoCoQkmvy8EKy+yIA6qhOaDuETMEydiGX99LSmlP49j6bBp2F1rbmFyatdJ5b8H40RiggtqTl01VmuiNoh8ISaF22x1ojwxY9hITUDR3ptzgD+ABGwdbY/zDTPIq+0p5mWaVvPRS/I5ihFnifbZn5r2vBCbcPrc0dRJ77uI6As6MpBsi5mLxirDEWE0gS0xZgCz26CuCry0UisJP7ugC+F7FALvjH8CdQ== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }