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
nexedi
linux
Commits
64e740bb
Commit
64e740bb
authored
Jul 21, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nva3/pm: use crystal freq where appropriate
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
f2cbe46f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
drivers/gpu/drm/nouveau/nva3_pm.c
drivers/gpu/drm/nouveau/nva3_pm.c
+4
-3
No files found.
drivers/gpu/drm/nouveau/nva3_pm.c
View file @
64e740bb
...
@@ -42,11 +42,12 @@ read_vco(struct drm_device *dev, int clk)
...
@@ -42,11 +42,12 @@ read_vco(struct drm_device *dev, int clk)
static
u32
static
u32
read_clk
(
struct
drm_device
*
dev
,
int
clk
,
bool
ignore_en
)
read_clk
(
struct
drm_device
*
dev
,
int
clk
,
bool
ignore_en
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
u32
sctl
,
sdiv
,
sclk
;
u32
sctl
,
sdiv
,
sclk
;
/* refclk for the 0xe8xx plls
always 27KHz
*/
/* refclk for the 0xe8xx plls
is a fixed frequency
*/
if
(
clk
>=
0x40
)
if
(
clk
>=
0x40
)
return
27000
;
return
dev_priv
->
crystal
;
sctl
=
nv_rd32
(
dev
,
0x4120
+
(
clk
*
4
));
sctl
=
nv_rd32
(
dev
,
0x4120
+
(
clk
*
4
));
if
(
!
ignore_en
&&
!
(
sctl
&
0x00000100
))
if
(
!
ignore_en
&&
!
(
sctl
&
0x00000100
))
...
@@ -54,7 +55,7 @@ read_clk(struct drm_device *dev, int clk, bool ignore_en)
...
@@ -54,7 +55,7 @@ read_clk(struct drm_device *dev, int clk, bool ignore_en)
switch
(
sctl
&
0x00003000
)
{
switch
(
sctl
&
0x00003000
)
{
case
0x00000000
:
case
0x00000000
:
return
27000
;
return
dev_priv
->
crystal
;
case
0x00002000
:
case
0x00002000
:
if
(
sctl
&
0x00000040
)
if
(
sctl
&
0x00000040
)
return
108000
;
return
108000
;
...
...
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