drm/radeon: protect concurrent smc register access with a spinlock
smc registers are access indirectly via the main mmio aperture, so there may be problems with concurrent access. This adds a spinlock to protect access to this register space. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1249,6 +1249,7 @@ int radeon_device_init(struct radeon_device *rdev,
|
||||
/* Registers mapping */
|
||||
/* TODO: block userspace mapping of io register */
|
||||
spin_lock_init(&rdev->mmio_idx_lock);
|
||||
spin_lock_init(&rdev->smc_idx_lock);
|
||||
if (rdev->family >= CHIP_BONAIRE) {
|
||||
rdev->rmmio_base = pci_resource_start(rdev->pdev, 5);
|
||||
rdev->rmmio_size = pci_resource_len(rdev->pdev, 5);
|
||||
|
||||
Reference in New Issue
Block a user