Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1d5d0c34
Commit
1d5d0c34
authored
Apr 20, 2012
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon: add indirect register accessors for SMC registers
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
cc066715
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
drivers/gpu/drm/radeon/evergreen_reg.h
drivers/gpu/drm/radeon/evergreen_reg.h
+4
-0
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon.h
+17
-0
No files found.
drivers/gpu/drm/radeon/evergreen_reg.h
View file @
1d5d0c34
...
...
@@ -24,6 +24,10 @@
#ifndef __EVERGREEN_REG_H__
#define __EVERGREEN_REG_H__
/* trinity */
#define TN_SMC_IND_INDEX_0 0x200
#define TN_SMC_IND_DATA_0 0x204
/* evergreen */
#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS 0x310
#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS_HIGH 0x324
...
...
drivers/gpu/drm/radeon/radeon.h
View file @
1d5d0c34
...
...
@@ -1806,6 +1806,8 @@ void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);
#define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
#define RREG32_PCIE_PORT(reg) rdev->pciep_rreg(rdev, (reg))
#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 WREG32_P(reg, val, mask) \
do { \
uint32_t tmp_ = RREG32(reg); \
...
...
@@ -1844,6 +1846,21 @@ static inline void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uin
WREG32
(
RADEON_PCIE_DATA
,
(
v
));
}
static
inline
u32
tn_smc_rreg
(
struct
radeon_device
*
rdev
,
u32
reg
)
{
u32
r
;
WREG32
(
TN_SMC_IND_INDEX_0
,
(
reg
));
r
=
RREG32
(
TN_SMC_IND_DATA_0
);
return
r
;
}
static
inline
void
tn_smc_wreg
(
struct
radeon_device
*
rdev
,
u32
reg
,
u32
v
)
{
WREG32
(
TN_SMC_IND_INDEX_0
,
(
reg
));
WREG32
(
TN_SMC_IND_DATA_0
,
(
v
));
}
void
r100_pll_errata_after_index
(
struct
radeon_device
*
rdev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment