Skip to content

drm: replace magic numbers

Bjorn Helgaas amd-gfx dri-devel linux-pci lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Fix a gpu_cfg2 case in amdgpu/si.c that I had missed
- Separate out the functional changes for better bisection (thanks, Michel!)
- Add #defines in a patch by themselves (so a GPU revert wouldn't break other potential users)
- Squash all the magic number -> #define changes into one patch

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3PCI: Add #defines for Enter Compliance, Transmit Margininclude/uapi/linux/pci_regs.h+2 -00 replies
2/3drm: correct Transmit Margin masksdrivers/gpu/drm/amd/amdgpu/cik.c drivers/gpu/drm/amd/amdgpu/si.c drivers/gpu/drm/radeon/cik.c +1 more+16 -160 replies
3/3drm: replace numbers with PCI_EXP_LNKCTL2 definitionsdrivers/gpu/drm/amd/amdgpu/cik.c drivers/gpu/drm/amd/amdgpu/si.c drivers/gpu/drm/radeon/cik.c +1 more+56 -320 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlex Deucher
SeriesR-b
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH V3 0/3] drm: replace magic numbers

From: Bjorn Helgaas <[email protected]>

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.

Since v2:
- Fix a gpu_cfg2 case in amdgpu/si.c that I had missed
- Separate out the functional changes for better bisection (thanks, Michel!)
- Add #defines in a patch by themselves (so a GPU revert wouldn't break other potential users)
- Squash all the magic number -> #define changes into one patch

Since v1:
- Add my signed-off-by and Alex's reviewed-by.

Bjorn Helgaas (3):
PCI: Add #defines for Enter Compliance, Transmit Margin
drm: correct Transmit Margin masks
drm: replace numbers with PCI_EXP_LNKCTL2 definitions

 drivers/gpu/drm/amd/amdgpu/cik.c | 22 ++++++++++++++--------
 drivers/gpu/drm/amd/amdgpu/si.c  | 22 ++++++++++++++--------
 drivers/gpu/drm/radeon/cik.c     | 22 ++++++++++++++--------
 drivers/gpu/drm/radeon/si.c      | 22 ++++++++++++++--------
 include/uapi/linux/pci_regs.h    |  2 ++
 5 files changed, 58 insertions(+), 32 deletions(-)
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog