drm/radeon: Use RMW accessors for changing LNKCTL2
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 15 Feb 2024 13:31:53 +0000 (15:31 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Feb 2024 15:30:50 +0000 (10:30 -0500)
commit756762aeb11ae1befbbcb7a04cf213a0a67c2646
tree1f6861edc54b4fb58c1850e918c6ead1feb1e78a
parent145242ed6f3f9b0f89f6a51cfceda3d430605d2a
drm/radeon: Use RMW accessors for changing LNKCTL2

Convert open coded RMW accesses for LNKCTL2 to use
pcie_capability_clear_and_set_word() which makes its easier to
understand what the code tries to do.

LNKCTL2 is not really owned by any driver because it is a collection of
control bits that PCI core might need to touch. RMW accessors already
have support for proper locking for a selected set of registers
(LNKCTL2 is not yet among them but likely will be in the future) to
avoid losing concurrent updates.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/si.c