diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-03 18:19:42 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 11:44:28 -0400 |
commit | fe78118c4603ab91b88907eaabe4a1ca03a9f220 (patch) | |
tree | 7c84a0664723ac52194413f76d2caf9eff71ee68 /drivers/gpu/drm/radeon/radeon_device.c | |
parent | 136de91ea760b55bd52b707c1443f121e006962e (diff) | |
download | op-kernel-dev-fe78118c4603ab91b88907eaabe4a1ca03a9f220.zip op-kernel-dev-fe78118c4603ab91b88907eaabe4a1ca03a9f220.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 16cb879..b903214 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -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); |