diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-04-12 11:27:20 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 10:49:14 -0400 |
commit | ff82bbc4d53b539e08b78981d1373011e7960558 (patch) | |
tree | eff7d41e68e2730c3287fbd0aabade69f5ddc5c5 /drivers/gpu/drm/radeon/radeon.h | |
parent | 26e2235d5f0d3d30c6d9e7cabd37ce38da35ce5d (diff) | |
download | lwn-ff82bbc4d53b539e08b78981d1373011e7960558.tar.gz lwn-ff82bbc4d53b539e08b78981d1373011e7960558.zip |
drm/radeon/kms: add accessors for RCU indirect space
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index ba59d952ba19..5bc10af4e5b4 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -1850,6 +1850,8 @@ void cik_mm_wdoorbell(struct radeon_device *rdev, u32 offset, u32 v); #define WREG32_PCIE_PORT(reg, v) rdev->pciep_wreg(rdev, (reg), (v)) #define RREG32_SMC(reg) tn_smc_rreg(rdev, (reg)) #define WREG32_SMC(reg, v) tn_smc_wreg(rdev, (reg), (v)) +#define RREG32_RCU(reg) r600_rcu_rreg(rdev, (reg)) +#define WREG32_RCU(reg, v) r600_rcu_wreg(rdev, (reg), (v)) #define WREG32_P(reg, val, mask) \ do { \ uint32_t tmp_ = RREG32(reg); \ @@ -1906,6 +1908,21 @@ static inline void tn_smc_wreg(struct radeon_device *rdev, u32 reg, u32 v) WREG32(TN_SMC_IND_DATA_0, (v)); } +static inline u32 r600_rcu_rreg(struct radeon_device *rdev, u32 reg) +{ + u32 r; + + WREG32(R600_RCU_INDEX, ((reg) & 0x1fff)); + r = RREG32(R600_RCU_DATA); + return r; +} + +static inline void r600_rcu_wreg(struct radeon_device *rdev, u32 reg, u32 v) +{ + WREG32(R600_RCU_INDEX, ((reg) & 0x1fff)); + WREG32(R600_RCU_DATA, (v)); +} + void r100_pll_errata_after_index(struct radeon_device *rdev); |