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
85a2a365
Commit
85a2a365
authored
Sep 13, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/gpio: remove invert flag, use state[] everywhere
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
3f8e11e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+4
-2
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bios.h
+0
-1
drivers/gpu/drm/nouveau/nv10_gpio.c
drivers/gpu/drm/nouveau/nv10_gpio.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
85a2a365
...
...
@@ -5834,7 +5834,8 @@ parse_dcb_gpio_table(struct nvbios *bios)
e
=
new_gpio_entry
(
bios
);
e
->
tag
=
DCB_GPIO_TVDAC0
;
e
->
line
=
tvdac_gpio
[
1
]
>>
4
;
e
->
invert
=
tvdac_gpio
[
0
]
&
2
;
e
->
state
[
0
]
=
!!
(
tvdac_gpio
[
0
]
&
2
);
e
->
state
[
1
]
=
!
e
->
state
[
0
];
}
goto
no_table
;
...
...
@@ -5858,7 +5859,8 @@ parse_dcb_gpio_table(struct nvbios *bios)
}
e
->
line
=
(
e
->
entry
&
0x001f
);
e
->
invert
=
((
e
->
entry
&
0xf800
)
>>
11
)
!=
4
;
e
->
state
[
0
]
=
((
e
->
entry
&
0xf800
)
>>
11
)
!=
4
;
e
->
state
[
1
]
=
!
e
->
state
[
0
];
}
else
{
e
->
entry
=
ROM32
(
entry
[
0
]);
e
->
tag
=
(
e
->
entry
&
0x0000ff00
)
>>
8
;
...
...
drivers/gpu/drm/nouveau/nouveau_bios.h
View file @
85a2a365
...
...
@@ -65,7 +65,6 @@ enum dcb_gpio_tag {
struct
dcb_gpio_entry
{
enum
dcb_gpio_tag
tag
;
int
line
;
bool
invert
;
uint32_t
entry
;
uint8_t
state_default
;
uint8_t
state
[
2
];
...
...
drivers/gpu/drm/nouveau/nv10_gpio.c
View file @
85a2a365
...
...
@@ -68,7 +68,7 @@ nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag)
value
=
NVReadCRTC
(
dev
,
0
,
reg
)
>>
shift
;
return
(
ent
->
invert
?
1
:
0
)
^
(
value
&
1
)
;
return
(
value
&
1
)
==
ent
->
state
[
1
]
;
}
int
...
...
@@ -83,7 +83,7 @@ nv10_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state)
if
(
!
get_gpio_location
(
ent
,
&
reg
,
&
shift
,
&
mask
))
return
-
ENODEV
;
value
=
((
ent
->
invert
?
1
:
0
)
^
(
state
?
1
:
0
))
<<
shift
;
value
=
ent
->
state
[
state
&
1
]
<<
shift
;
mask
=
~
(
mask
<<
shift
);
NVWriteCRTC
(
dev
,
0
,
reg
,
value
|
(
NVReadCRTC
(
dev
,
0
,
reg
)
&
mask
));
...
...
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