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
6e2c3c0a
Commit
6e2c3c0a
authored
Apr 03, 2013
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon/cik: add pcie_port indirect register accessors
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
2c67912c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
1 deletion
+31
-1
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/cik.c
+21
-0
drivers/gpu/drm/radeon/cikd.h
drivers/gpu/drm/radeon/cikd.h
+3
-0
drivers/gpu/drm/radeon/radeon_asic.c
drivers/gpu/drm/radeon/radeon_asic.c
+5
-1
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/radeon_asic.h
+2
-0
No files found.
drivers/gpu/drm/radeon/cik.c
View file @
6e2c3c0a
...
...
@@ -78,6 +78,27 @@ extern void si_rlc_fini(struct radeon_device *rdev);
extern
int
si_rlc_init
(
struct
radeon_device
*
rdev
);
static
void
cik_rlc_stop
(
struct
radeon_device
*
rdev
);
/*
* Indirect registers accessor
*/
u32
cik_pciep_rreg
(
struct
radeon_device
*
rdev
,
u32
reg
)
{
u32
r
;
WREG32
(
PCIE_INDEX
,
reg
);
(
void
)
RREG32
(
PCIE_INDEX
);
r
=
RREG32
(
PCIE_DATA
);
return
r
;
}
void
cik_pciep_wreg
(
struct
radeon_device
*
rdev
,
u32
reg
,
u32
v
)
{
WREG32
(
PCIE_INDEX
,
reg
);
(
void
)
RREG32
(
PCIE_INDEX
);
WREG32
(
PCIE_DATA
,
v
);
(
void
)
RREG32
(
PCIE_DATA
);
}
/**
* cik_get_xclk - get the xclk
*
...
...
drivers/gpu/drm/radeon/cikd.h
View file @
6e2c3c0a
...
...
@@ -35,6 +35,9 @@
#define CG_CLKPIN_CNTL 0xC05001A0
# define XTALIN_DIVIDE (1 << 1)
#define PCIE_INDEX 0x38
#define PCIE_DATA 0x3C
#define VGA_HDP_CONTROL 0x328
#define VGA_MEMORY_DISABLE (1 << 4)
...
...
drivers/gpu/drm/radeon/radeon_asic.c
View file @
6e2c3c0a
...
...
@@ -126,7 +126,11 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
rdev
->
mc_rreg
=
&
rs780_mc_rreg
;
rdev
->
mc_wreg
=
&
rs780_mc_wreg
;
}
if
(
rdev
->
family
>=
CHIP_R600
)
{
if
(
rdev
->
family
>=
CHIP_BONAIRE
)
{
rdev
->
pciep_rreg
=
&
cik_pciep_rreg
;
rdev
->
pciep_wreg
=
&
cik_pciep_wreg
;
}
else
if
(
rdev
->
family
>=
CHIP_R600
)
{
rdev
->
pciep_rreg
=
&
r600_pciep_rreg
;
rdev
->
pciep_wreg
=
&
r600_pciep_wreg
;
}
...
...
drivers/gpu/drm/radeon/radeon_asic.h
View file @
6e2c3c0a
...
...
@@ -558,5 +558,7 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk);
*/
uint64_t
cik_get_gpu_clock_counter
(
struct
radeon_device
*
rdev
);
u32
cik_get_xclk
(
struct
radeon_device
*
rdev
);
uint32_t
cik_pciep_rreg
(
struct
radeon_device
*
rdev
,
uint32_t
reg
);
void
cik_pciep_wreg
(
struct
radeon_device
*
rdev
,
uint32_t
reg
,
uint32_t
v
);
#endif
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