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
c8b9641a
Commit
c8b9641a
authored
Nov 09, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/hwsq: remove some magic, give proper opcode names
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
eeb7a50b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
drivers/gpu/drm/nouveau/nouveau_hwsq.h
drivers/gpu/drm/nouveau/nouveau_hwsq.h
+19
-2
drivers/gpu/drm/nouveau/nv50_pm.c
drivers/gpu/drm/nouveau/nv50_pm.c
+4
-4
No files found.
drivers/gpu/drm/nouveau/nouveau_hwsq.h
View file @
c8b9641a
...
@@ -57,9 +57,26 @@ hwsq_fini(struct hwsq_ucode *hwsq)
...
@@ -57,9 +57,26 @@ hwsq_fini(struct hwsq_ucode *hwsq)
}
}
static
inline
void
static
inline
void
hwsq_u
nkn
(
struct
hwsq_ucode
*
hwsq
,
u8
v0
)
hwsq_u
sec
(
struct
hwsq_ucode
*
hwsq
,
u8
usec
)
{
{
*
hwsq
->
ptr
.
u08
++
=
v0
;
u32
shift
=
0
;
while
(
usec
&
~
3
)
{
usec
>>=
2
;
shift
++
;
}
*
hwsq
->
ptr
.
u08
++
=
(
shift
<<
2
)
|
usec
;
}
static
inline
void
hwsq_setf
(
struct
hwsq_ucode
*
hwsq
,
u8
flag
,
int
val
)
{
flag
+=
0x80
;
if
(
val
>=
0
)
flag
+=
0x20
;
if
(
val
>=
1
)
flag
+=
0x20
;
*
hwsq
->
ptr
.
u08
++
=
flag
;
}
}
static
inline
void
static
inline
void
...
...
drivers/gpu/drm/nouveau/nv50_pm.c
View file @
c8b9641a
...
@@ -459,7 +459,7 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
...
@@ -459,7 +459,7 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
}
}
if
(
dev_priv
->
chipset
>=
0x92
)
if
(
dev_priv
->
chipset
>=
0x92
)
hwsq_wr32
(
hwsq
,
0x611200
,
0x00003300
);
/* disable scanout */
hwsq_wr32
(
hwsq
,
0x611200
,
0x00003300
);
/* disable scanout */
hwsq_
unkn
(
hwsq
,
0xb
0
);
/* disable bus access */
hwsq_
setf
(
hwsq
,
0x10
,
0
);
/* disable bus access */
hwsq_op5f
(
hwsq
,
0x00
,
0x01
);
/* no idea :s */
hwsq_op5f
(
hwsq
,
0x00
,
0x01
);
/* no idea :s */
/* prepare memory controller */
/* prepare memory controller */
...
@@ -478,10 +478,10 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
...
@@ -478,10 +478,10 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
hwsq_wr32
(
hwsq
,
0x1002d4
,
0x00000001
);
/* precharge banks and idle */
hwsq_wr32
(
hwsq
,
0x1002d4
,
0x00000001
);
/* precharge banks and idle */
hwsq_wr32
(
hwsq
,
0x1002dc
,
0x00000000
);
/* stop self refresh mode */
hwsq_wr32
(
hwsq
,
0x1002dc
,
0x00000000
);
/* stop self refresh mode */
hwsq_wr32
(
hwsq
,
0x100210
,
0x80000000
);
/* restart automatic refresh */
hwsq_wr32
(
hwsq
,
0x100210
,
0x80000000
);
/* restart automatic refresh */
hwsq_u
nkn
(
hwsq
,
0x07
);
/* wait for the PLL to stabilize (12us)
*/
hwsq_u
sec
(
hwsq
,
12
);
/* wait for the PLL to stabilize
*/
hwsq_u
nkn
(
hwsq
,
0x0b
);
/* may be unnecessary: causes flickering */
hwsq_u
sec
(
hwsq
,
48
);
/* may be unnecessary: causes flickering */
hwsq_
unkn
(
hwsq
,
0xd0
);
/* enable bus access again
*/
hwsq_
setf
(
hwsq
,
0x10
,
1
);
/* enable bus access
*/
hwsq_op5f
(
hwsq
,
0x00
,
0x00
);
/* no idea, reverse of 0x00, 0x01? */
hwsq_op5f
(
hwsq
,
0x00
,
0x00
);
/* no idea, reverse of 0x00, 0x01? */
if
(
dev_priv
->
chipset
>=
0x92
)
if
(
dev_priv
->
chipset
>=
0x92
)
hwsq_wr32
(
hwsq
,
0x611200
,
0x00003330
);
/* enable scanout */
hwsq_wr32
(
hwsq
,
0x611200
,
0x00003330
);
/* enable scanout */
...
...
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