Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6596943ybx; Mon, 11 Nov 2019 11:33:14 -0800 (PST) X-Google-Smtp-Source: APXvYqw9jjXaAYsf9ala1snpjbUjCnD1/4vAtb4gs/i8HJZ8DE8pw2ZhBO9eds+AVssHBzbowKt1 X-Received: by 2002:a05:6402:1299:: with SMTP id w25mr28424834edv.10.1573500794639; Mon, 11 Nov 2019 11:33:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573500794; cv=none; d=google.com; s=arc-20160816; b=pE/V3//jWQykE49rmg+tYiIQVcnsuaaM8yNttYBZ/IJPDSN9PBayn7mI1YRq+/zjeL n79BBVXfSM243+L1+FlyBSM3NMO73pYa/diWMP2OCkMQcZJtJF3BHrKSarL8R1IvTC7k XTtEHVnC8CtV3Lq9fL2MEm7lutVNQHNY/nc7fq/0++xbeXgcdtvtXZ3GOaBtIfEaLYGP YgviSPUthA6uIwYh9FtnF7IoW00NSNnIGryVk+1XjEbbcMvTh89geVyCW9IGqcTNe85e 597kUr2rr89KZUERfeGBUXFK7PbzoXEXEFhqjRvsFsIEvPmF49CWRajRUwC2yYXdAr0r N5pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LR1AIZ25chnlzNCNmgik3Nnkj/CxOI7aA9LqNK5iYqc=; b=Z/av2yxdAmf83qjePrbOT3eIYy3w0z+hdjYTy+/bY23b2ykXXgcZaXGMuWeE7+CARs EzAxm+r5Um58Tmv0paqQqBuAvRq/sqoSInc/lJEDzSFtFsWM21tCXVhjB623p71PGvab vGj57BQzyxLLNqpO3VdjwtNSLRz3qMYXngK4IXIiTFS5pAkfb1nWOHU4P4TJp09LUq82 qJuAd+9iGaUP2Rskx3nWICK/7LkuW53UScuiKlRJzx4J+45Ga7duMMbqwqByMTF5vEYl swk9TTqFUvd6A7JYQXF73ipXKQ1z/bkdiJhpgfT16vdSwC03dQDUhUBZ1EjnSqBRITAB WnEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fafL6OYN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si9828303ejb.136.2019.11.11.11.32.49; Mon, 11 Nov 2019 11:33:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fafL6OYN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbfKKTaD (ORCPT + 99 others); Mon, 11 Nov 2019 14:30:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:47568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbfKKTaD (ORCPT ); Mon, 11 Nov 2019 14:30:03 -0500 Received: from localhost (unknown [69.71.4.100]) (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 470262184C; Mon, 11 Nov 2019 19:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573500602; bh=/6YuVyX8+CxUq2e6F7e9g+b1C2bSx1WCkr5GbVkW9Xs=; h=From:To:Cc:Subject:Date:From; b=fafL6OYNK8Cw8CWPDakiGzTnD86oWHwarGqqueP7zWkIWHFcNjlv+Fci1aHuu0ScV QguxNMhurKQ9ijInqiaCmj6OtVdZqV1SezT7oUD7gJCGRrmyVaijA9KRDnqiTmwzjv EevmB60AD22bc6aZKsGIhqfoxEZOiV2xQKazGwn4= From: Bjorn Helgaas To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Zhou , David Airlie , Daniel Vetter Cc: Frederick Lawler , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ilia Mirkin , linux-pci@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 0/2] drm: replace magic numbers Date: Mon, 11 Nov 2019 13:29:30 -0600 Message-Id: <20191111192932.36048-1-helgaas@kernel.org> X-Mailer: git-send-email 2.24.0.rc1.363.gb1bccd3e3d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas amdgpu and radeon do a bit of mucking with the PCIe Link Control 2 register, some of it using hard-coded magic numbers. The idea here is to replace those with #defines. I don't intend the Target Link Speed patch to change anything, so it should be straightforward to review. Since v1: - Add my signed-off-by and Alex's reviewed-by. Bjorn Helgaas (2): drm: replace incorrect Compliance/Margin magic numbers with PCI_EXP_LNKCTL2 definitions drm: replace Target Link Speed magic numbers with PCI_EXP_LNKCTL2 definitions drivers/gpu/drm/amd/amdgpu/cik.c | 22 ++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/si.c | 18 +++++++++++------- drivers/gpu/drm/radeon/cik.c | 22 ++++++++++++++-------- drivers/gpu/drm/radeon/si.c | 22 ++++++++++++++-------- include/uapi/linux/pci_regs.h | 2 ++ 5 files changed, 55 insertions(+), 31 deletions(-) -- 2.24.0.rc1.363.gb1bccd3e3d-goog