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
02faec09
Commit
02faec09
authored
Apr 07, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50: parse/use some more de-magiced parts of gpio table entries
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2535d71c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+9
-14
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bios.h
+2
-0
No files found.
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
02faec09
...
@@ -2595,10 +2595,7 @@ init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
...
@@ -2595,10 +2595,7 @@ init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
r
=
nv50_gpio_reg
[
gpio
->
line
>>
3
];
r
=
nv50_gpio_reg
[
gpio
->
line
>>
3
];
s
=
(
gpio
->
line
&
0x07
)
<<
2
;
s
=
(
gpio
->
line
&
0x07
)
<<
2
;
v
=
bios_rd32
(
bios
,
r
)
&
~
(
0x00000003
<<
s
);
v
=
bios_rd32
(
bios
,
r
)
&
~
(
0x00000003
<<
s
);
if
(
gpio
->
entry
&
0x01000000
)
v
|=
(
gpio
->
state
[
gpio
->
state_default
]
^
2
)
<<
s
;
v
|=
(((
gpio
->
entry
&
0x60000000
)
>>
29
)
^
2
)
<<
s
;
else
v
|=
(((
gpio
->
entry
&
0x18000000
)
>>
27
)
^
2
)
<<
s
;
bios_wr32
(
bios
,
r
,
v
);
bios_wr32
(
bios
,
r
,
v
);
r
=
nv50_gpio_ctl
[
gpio
->
line
>>
4
];
r
=
nv50_gpio_ctl
[
gpio
->
line
>>
4
];
...
@@ -5078,21 +5075,19 @@ parse_dcb30_gpio_entry(struct nvbios *bios, uint16_t offset)
...
@@ -5078,21 +5075,19 @@ parse_dcb30_gpio_entry(struct nvbios *bios, uint16_t offset)
static
void
static
void
parse_dcb40_gpio_entry
(
struct
nvbios
*
bios
,
uint16_t
offset
)
parse_dcb40_gpio_entry
(
struct
nvbios
*
bios
,
uint16_t
offset
)
{
{
uint32_t
entry
=
ROM32
(
bios
->
data
[
offset
]);
struct
dcb_gpio_entry
*
gpio
;
struct
dcb_gpio_entry
*
gpio
;
uint32_t
ent
=
ROM32
(
bios
->
data
[
offset
]);
uint8_t
line
=
ent
&
0x1f
,
tag
=
ent
>>
8
&
0xff
;
if
(
tag
==
0xff
)
if
(
(
entry
&
0x0000ff00
)
==
0x0000ff00
)
return
;
return
;
gpio
=
new_gpio_entry
(
bios
);
gpio
=
new_gpio_entry
(
bios
);
gpio
->
tag
=
(
entry
&
0x0000ff00
)
>>
8
;
/* Currently unused, we may need more fields parsed at some
gpio
->
line
=
(
entry
&
0x0000001f
)
>>
0
;
* point. */
gpio
->
state_default
=
(
entry
&
0x01000000
)
>>
24
;
gpio
->
tag
=
tag
;
gpio
->
state
[
0
]
=
(
entry
&
0x18000000
)
>>
27
;
gpio
->
line
=
line
;
gpio
->
state
[
1
]
=
(
entry
&
0x60000000
)
>>
29
;
gpio
->
entry
=
ent
;
gpio
->
entry
=
ent
ry
;
}
}
static
void
static
void
...
...
drivers/gpu/drm/nouveau/nouveau_bios.h
View file @
02faec09
...
@@ -50,6 +50,8 @@ struct dcb_gpio_entry {
...
@@ -50,6 +50,8 @@ struct dcb_gpio_entry {
int
line
;
int
line
;
bool
invert
;
bool
invert
;
uint32_t
entry
;
uint32_t
entry
;
uint8_t
state_default
;
uint8_t
state
[
2
];
};
};
struct
dcb_gpio_table
{
struct
dcb_gpio_table
{
...
...
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