From patchwork Thu Nov 21 14:02:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 11256279 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34961138C for ; Thu, 21 Nov 2019 14:02:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C9A52070B for ; Thu, 21 Nov 2019 14:02:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C9A52070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A6266E135; Thu, 21 Nov 2019 14:02:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D9806E135; Thu, 21 Nov 2019 14:02:29 +0000 (UTC) Received: from localhost (173-25-83-245.client.mchsi.com [173.25.83.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDE4020679; Thu, 21 Nov 2019 14:02:28 +0000 (UTC) From: Bjorn Helgaas To: linux-pci@vger.kernel.org Subject: [PATCH v2 0/7] PCI: Prefer pcie_capability_read_word() Date: Thu, 21 Nov 2019 08:02:13 -0600 Message-Id: <20191121140220.38030-1-helgaas@kernel.org> X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574344949; bh=kegAbqQ55YAKJFVhHNJc+bQ0rbgYivDuVa8I99XBJ9c=; h=From:To:Cc:Subject:Date:From; b=2GwomWDZvpK92iHDorjwezZ5/4UYvebR151EZGZfqqlASQxqholOLgorVKdkbFWVw YdmgL7/pi5HxEhqxeWxTshMRLxwChujHVtmORfyy8/eHF8Is1ZT7ErJwWM26jA4UQq FGE0WL6vIXveCEfARsgvY03PTEZJX8q1ujxCFors= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frederick Lawler , Dave Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Bjorn Helgaas , amd-gfx@lists.freedesktop.org, Christian Koenig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Bjorn Helgaas Use pcie_capability_read_word() and similar instead of using pci_read_config_word() directly. Add #defines to replace some magic numbers. Fix typos in use of Transmit Margin field. These are currently on my pci/misc branch for v5.5. Let me know if you see any issues. Bjorn Helgaas (5): PCI: Add #defines for Enter Compliance, Transmit Margin drm/amdgpu: Correct Transmit Margin masks drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions drm/radeon: Correct Transmit Margin masks drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions Frederick Lawler (2): drm/amdgpu: Prefer pcie_capability_read_word() drm/radeon: Prefer pcie_capability_read_word() drivers/gpu/drm/amd/amdgpu/cik.c | 95 +++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/si.c | 97 ++++++++++++++++++++------------ drivers/gpu/drm/radeon/cik.c | 94 +++++++++++++++++++------------ drivers/gpu/drm/radeon/si.c | 97 ++++++++++++++++++++------------ include/uapi/linux/pci_regs.h | 2 + 5 files changed, 243 insertions(+), 142 deletions(-) Reviewed-by: Alex Deucher