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
8ce51fcf
Commit
8ce51fcf
authored
Jun 23, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0/pm: minor clock readback fixes
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
59ef9742
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
drivers/gpu/drm/nouveau/nvc0_pm.c
drivers/gpu/drm/nouveau/nvc0_pm.c
+6
-2
No files found.
drivers/gpu/drm/nouveau/nvc0_pm.c
View file @
8ce51fcf
...
@@ -42,12 +42,16 @@ read_vco(struct drm_device *dev, u32 dsrc)
...
@@ -42,12 +42,16 @@ read_vco(struct drm_device *dev, u32 dsrc)
static
u32
static
u32
read_pll
(
struct
drm_device
*
dev
,
u32
pll
)
read_pll
(
struct
drm_device
*
dev
,
u32
pll
)
{
{
u32
ctrl
=
nv_rd32
(
dev
,
pll
+
0
);
u32
coef
=
nv_rd32
(
dev
,
pll
+
4
);
u32
coef
=
nv_rd32
(
dev
,
pll
+
4
);
u32
P
=
(
coef
&
0x003f0000
)
>>
16
;
u32
P
=
(
coef
&
0x003f0000
)
>>
16
;
u32
N
=
(
coef
&
0x0000ff00
)
>>
8
;
u32
N
=
(
coef
&
0x0000ff00
)
>>
8
;
u32
M
=
(
coef
&
0x000000ff
)
>>
0
;
u32
M
=
(
coef
&
0x000000ff
)
>>
0
;
u32
sclk
,
doff
;
u32
sclk
,
doff
;
if
(
!
(
ctrl
&
0x00000001
))
return
0
;
switch
(
pll
&
0xfff000
)
{
switch
(
pll
&
0xfff000
)
{
case
0x00e000
:
case
0x00e000
:
sclk
=
27000
;
sclk
=
27000
;
...
@@ -91,12 +95,12 @@ read_div(struct drm_device *dev, int doff, u32 dsrc, u32 dctl)
...
@@ -91,12 +95,12 @@ read_div(struct drm_device *dev, int doff, u32 dsrc, u32 dctl)
return
100000
;
return
100000
;
case
3
:
case
3
:
if
(
sctl
&
0x80000000
)
{
if
(
sctl
&
0x80000000
)
{
u32
sclk
=
read_vco
(
dev
,
dsrc
);
u32
sclk
=
read_vco
(
dev
,
dsrc
+
(
doff
*
4
)
);
u32
sdiv
=
(
sctl
&
0x0000003f
)
+
2
;
u32
sdiv
=
(
sctl
&
0x0000003f
)
+
2
;
return
(
sclk
*
2
)
/
sdiv
;
return
(
sclk
*
2
)
/
sdiv
;
}
}
return
read_vco
(
dev
,
dsrc
);
return
read_vco
(
dev
,
dsrc
+
(
doff
*
4
)
);
default:
default:
return
0
;
return
0
;
}
}
...
...
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