mbox series

[0/2] drm: replace magic nuumbers

Message ID 20191107222047.125496-1-helgaas@kernel.org (mailing list archive)
Headers show
Series drm: replace magic nuumbers | expand

Message

Bjorn Helgaas Nov. 7, 2019, 10:20 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

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 haven't signed off on these because the first one actually changes the
bits involved because the existing code looks like it might have a typo.
But I have no way to know for sure.

I don't intend the Target Link Speed patch to change anything, so it should
be straightforward to review.

Bjorn Helgaas (2):
  drm: replace 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(-)

Comments

Alex Deucher Nov. 7, 2019, 10:43 p.m. UTC | #1
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
> Bjorn Helgaas
> Sent: Thursday, November 7, 2019 5:21 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Zhou, David(ChunMing)
> <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter
> <daniel@ffwll.ch>
> Cc: Bjorn Helgaas <bhelgaas@google.com>; dri-devel@lists.freedesktop.org;
> amd-gfx@lists.freedesktop.org; Frederick Lawler <fred@fredlawl.com>;
> linux-kernel@vger.kernel.org
> Subject: [PATCH 0/2] drm: replace magic nuumbers
> 
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> 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 haven't signed off on these because the first one actually changes the bits
> involved because the existing code looks like it might have a typo.
> But I have no way to know for sure.
> 

It is a typo.  Your patches look correct to me.  The series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> I don't intend the Target Link Speed patch to change anything, so it should be
> straightforward to review.
> 
> Bjorn Helgaas (2):
>   drm: replace 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
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx