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
a412fce0
Commit
a412fce0
authored
Apr 22, 2013
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon/cik: add rlc helpers for DPM
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
84a9d9ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/cik.c
+29
-0
drivers/gpu/drm/radeon/cikd.h
drivers/gpu/drm/radeon/cikd.h
+9
-0
No files found.
drivers/gpu/drm/radeon/cik.c
View file @
a412fce0
...
...
@@ -5587,6 +5587,35 @@ static u32 cik_halt_rlc(struct radeon_device *rdev)
return
orig
;
}
void
cik_enter_rlc_safe_mode
(
struct
radeon_device
*
rdev
)
{
u32
tmp
,
i
,
mask
;
tmp
=
REQ
|
MESSAGE
(
MSG_ENTER_RLC_SAFE_MODE
);
WREG32
(
RLC_GPR_REG2
,
tmp
);
mask
=
GFX_POWER_STATUS
|
GFX_CLOCK_STATUS
;
for
(
i
=
0
;
i
<
rdev
->
usec_timeout
;
i
++
)
{
if
((
RREG32
(
RLC_GPM_STAT
)
&
mask
)
==
mask
)
break
;
udelay
(
1
);
}
for
(
i
=
0
;
i
<
rdev
->
usec_timeout
;
i
++
)
{
if
((
RREG32
(
RLC_GPR_REG2
)
&
REQ
)
==
0
)
break
;
udelay
(
1
);
}
}
void
cik_exit_rlc_safe_mode
(
struct
radeon_device
*
rdev
)
{
u32
tmp
;
tmp
=
REQ
|
MESSAGE
(
MSG_EXIT_RLC_SAFE_MODE
);
WREG32
(
RLC_GPR_REG2
,
tmp
);
}
/**
* cik_rlc_stop - stop the RLC ME
*
...
...
drivers/gpu/drm/radeon/cikd.h
View file @
a412fce0
...
...
@@ -952,6 +952,8 @@
#define RLC_GPM_STAT 0xC400
# define RLC_GPM_BUSY (1 << 0)
# define GFX_POWER_STATUS (1 << 1)
# define GFX_CLOCK_STATUS (1 << 2)
#define RLC_PG_CNTL 0xC40C
# define GFX_PG_ENABLE (1 << 0)
...
...
@@ -1004,6 +1006,13 @@
#define RLC_GPM_SCRATCH_ADDR 0xC4B0
#define RLC_GPM_SCRATCH_DATA 0xC4B4
#define RLC_GPR_REG2 0xC4E8
#define REQ 0x00000001
#define MESSAGE(x) ((x) << 1)
#define MESSAGE_MASK 0x0000001e
#define MSG_ENTER_RLC_SAFE_MODE 1
#define MSG_EXIT_RLC_SAFE_MODE 0
#define CP_HPD_EOP_BASE_ADDR 0xC904
#define CP_HPD_EOP_BASE_ADDR_HI 0xC908
#define CP_HPD_EOP_VMID 0xC90C
...
...
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