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
f2cbe46f
Commit
f2cbe46f
authored
Jul 21, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: determine timing crystal freq from straps
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
93e692dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+18
-1
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
f2cbe46f
...
...
@@ -680,6 +680,7 @@ struct drm_nouveau_private {
/* exact chipset, derived from NV_PMC_BOOT_0 */
int
chipset
;
int
flags
;
u32
crystal
;
void
__iomem
*
mmio
;
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
f2cbe46f
...
...
@@ -984,7 +984,7 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *dev)
int
nouveau_load
(
struct
drm_device
*
dev
,
unsigned
long
flags
)
{
struct
drm_nouveau_private
*
dev_priv
;
uint32_t
reg0
;
uint32_t
reg0
,
strap
;
resource_size_t
mmio_start_offs
;
int
ret
;
...
...
@@ -1074,6 +1074,23 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
NV_INFO
(
dev
,
"Detected an NV%2x generation card (0x%08x)
\n
"
,
dev_priv
->
card_type
,
reg0
);
/* determine frequency of timing crystal */
strap
=
nv_rd32
(
dev
,
0x101000
);
if
(
dev_priv
->
chipset
<
0x17
||
(
dev_priv
->
chipset
>=
0x20
&&
dev_priv
->
chipset
<=
0x25
))
strap
&=
0x00000040
;
else
strap
&=
0x00400040
;
switch
(
strap
)
{
case
0x00000000
:
dev_priv
->
crystal
=
13500
;
break
;
case
0x00000040
:
dev_priv
->
crystal
=
14318
;
break
;
case
0x00400000
:
dev_priv
->
crystal
=
27000
;
break
;
case
0x00400040
:
dev_priv
->
crystal
=
25000
;
break
;
}
NV_DEBUG
(
dev
,
"crystal freq: %dKHz
\n
"
,
dev_priv
->
crystal
);
/* Determine whether we'll attempt acceleration or not, some
* cards are disabled by default here due to them being known
* non-functional, or never been tested due to lack of hw.
...
...
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