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
2bfa7482
Commit
2bfa7482
authored
Oct 19, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv40/pm: fix issues on igp chipsets, which don't have memory
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
ef5ced4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
drivers/gpu/drm/nouveau/nv40_pm.c
drivers/gpu/drm/nouveau/nv40_pm.c
+15
-5
No files found.
drivers/gpu/drm/nouveau/nv40_pm.c
View file @
2bfa7482
...
@@ -57,12 +57,14 @@ read_pll_2(struct drm_device *dev, u32 reg)
...
@@ -57,12 +57,14 @@ read_pll_2(struct drm_device *dev, u32 reg)
int
P
=
(
ctrl
&
0x00070000
)
>>
16
;
int
P
=
(
ctrl
&
0x00070000
)
>>
16
;
u32
ref
=
27000
,
clk
=
0
;
u32
ref
=
27000
,
clk
=
0
;
if
(
ctrl
&
0x80000000
)
if
(
(
ctrl
&
0x80000000
)
&&
M1
)
{
clk
=
ref
*
N1
/
M1
;
clk
=
ref
*
N1
/
M1
;
if
((
ctrl
&
0x40000100
)
==
0x40000000
)
{
if
(
!
(
ctrl
&
0x00000100
))
{
if
(
M2
)
if
(
ctrl
&
0x40000000
)
clk
=
clk
*
N2
/
M2
;
clk
=
clk
*
N2
/
M2
;
else
clk
=
0
;
}
}
}
return
clk
>>
P
;
return
clk
>>
P
;
...
@@ -177,6 +179,11 @@ nv40_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
...
@@ -177,6 +179,11 @@ nv40_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
}
}
/* memory clock */
/* memory clock */
if
(
!
perflvl
->
memory
)
{
info
->
mpll_ctrl
=
0x00000000
;
goto
out
;
}
ret
=
nv40_calc_pll
(
dev
,
0x004020
,
&
pll
,
perflvl
->
memory
,
ret
=
nv40_calc_pll
(
dev
,
0x004020
,
&
pll
,
perflvl
->
memory
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
log2P
);
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
log2P
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
@@ -264,6 +271,9 @@ nv40_pm_clocks_set(struct drm_device *dev, void *pre_state)
...
@@ -264,6 +271,9 @@ nv40_pm_clocks_set(struct drm_device *dev, void *pre_state)
mdelay
(
5
);
mdelay
(
5
);
nv_mask
(
dev
,
0x00c040
,
0x00000333
,
info
->
ctrl
);
nv_mask
(
dev
,
0x00c040
,
0x00000333
,
info
->
ctrl
);
if
(
!
info
->
mpll_ctrl
)
goto
resume
;
/* wait for vblank start on active crtcs, disable memory access */
/* wait for vblank start on active crtcs, disable memory access */
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
!
(
crtc_mask
&
(
1
<<
i
)))
if
(
!
(
crtc_mask
&
(
1
<<
i
)))
...
...
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