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
b8ef914e
Commit
b8ef914e
authored
Jan 09, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and 'bugzilla-12257' into release
parents
a8e896e2
3e540486
935e5f29
7b37b5fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
21 deletions
+48
-21
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/acpi/boot.c
+11
-0
drivers/acpi/ec.c
drivers/acpi/ec.c
+22
-21
drivers/acpi/video.c
drivers/acpi/video.c
+15
-0
No files found.
arch/x86/kernel/acpi/boot.c
View file @
b8ef914e
...
@@ -1359,6 +1359,17 @@ static void __init acpi_process_madt(void)
...
@@ -1359,6 +1359,17 @@ static void __init acpi_process_madt(void)
"Invalid BIOS MADT, disabling ACPI
\n
"
);
"Invalid BIOS MADT, disabling ACPI
\n
"
);
disable_acpi
();
disable_acpi
();
}
}
}
else
{
/*
* ACPI found no MADT, and so ACPI wants UP PIC mode.
* In the event an MPS table was found, forget it.
* Boot with "acpi=off" to use MPS on such a system.
*/
if
(
smp_found_config
)
{
printk
(
KERN_WARNING
PREFIX
"No APIC-table, disabling MPS
\n
"
);
smp_found_config
=
0
;
}
}
}
#endif
#endif
return
;
return
;
...
...
drivers/acpi/ec.c
View file @
b8ef914e
...
@@ -982,9 +982,9 @@ static const struct acpi_device_id ec_device_ids[] = {
...
@@ -982,9 +982,9 @@ static const struct acpi_device_id ec_device_ids[] = {
int
__init
acpi_ec_ecdt_probe
(
void
)
int
__init
acpi_ec_ecdt_probe
(
void
)
{
{
int
ret
;
acpi_status
status
;
acpi_status
status
;
struct
acpi_table_ecdt
*
ecdt_ptr
;
struct
acpi_table_ecdt
*
ecdt_ptr
;
acpi_handle
dummy
;
boot_ec
=
make_acpi_ec
();
boot_ec
=
make_acpi_ec
();
if
(
!
boot_ec
)
if
(
!
boot_ec
)
...
@@ -1010,30 +1010,31 @@ int __init acpi_ec_ecdt_probe(void)
...
@@ -1010,30 +1010,31 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec
->
gpe
=
ecdt_ptr
->
gpe
;
boot_ec
->
gpe
=
ecdt_ptr
->
gpe
;
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
}
else
{
/* Add some basic check against completely broken table */
/* This workaround is needed only on some broken machines,
if
(
boot_ec
->
data_addr
!=
boot_ec
->
command_addr
)
* which require early EC, but fail to provide ECDT */
goto
install
;
acpi_handle
x
;
/* fall through */
printk
(
KERN_DEBUG
PREFIX
"Look up EC in DSDT
\n
"
);
status
=
acpi_get_devices
(
ec_device_ids
[
0
].
id
,
ec_parse_device
,
boot_ec
,
NULL
);
/* Check that acpi_get_devices actually find something */
if
(
ACPI_FAILURE
(
status
)
||
!
boot_ec
->
handle
)
goto
error
;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if
(
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
x
)))
return
-
ENODEV
;
}
}
/* This workaround is needed only on some broken machines,
ret
=
ec_install_handlers
(
boot_ec
);
* which require early EC, but fail to provide ECDT */
if
(
!
ret
)
{
printk
(
KERN_DEBUG
PREFIX
"Look up EC in DSDT
\n
"
);
status
=
acpi_get_devices
(
ec_device_ids
[
0
].
id
,
ec_parse_device
,
boot_ec
,
NULL
);
/* Check that acpi_get_devices actually find something */
if
(
ACPI_FAILURE
(
status
)
||
!
boot_ec
->
handle
)
goto
error
;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if
(
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
dummy
)))
return
-
ENODEV
;
install:
if
(
!
ec_install_handlers
(
boot_ec
))
{
first_ec
=
boot_ec
;
first_ec
=
boot_ec
;
return
0
;
return
0
;
}
}
error:
error:
kfree
(
boot_ec
);
kfree
(
boot_ec
);
boot_ec
=
NULL
;
boot_ec
=
NULL
;
return
-
ENODEV
;
return
-
ENODEV
;
...
...
drivers/acpi/video.c
View file @
b8ef914e
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include <linux/backlight.h>
#include <linux/backlight.h>
#include <linux/thermal.h>
#include <linux/thermal.h>
#include <linux/video_output.h>
#include <linux/video_output.h>
#include <linux/sort.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_bus.h>
...
@@ -625,6 +626,16 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
...
@@ -625,6 +626,16 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
return
status
;
return
status
;
}
}
/*
* Simple comparison function used to sort backlight levels.
*/
static
int
acpi_video_cmp_level
(
const
void
*
a
,
const
void
*
b
)
{
return
*
(
int
*
)
a
-
*
(
int
*
)
b
;
}
/*
/*
* Arg:
* Arg:
* device : video output device (LCD, CRT, ..)
* device : video output device (LCD, CRT, ..)
...
@@ -676,6 +687,10 @@ acpi_video_init_brightness(struct acpi_video_device *device)
...
@@ -676,6 +687,10 @@ acpi_video_init_brightness(struct acpi_video_device *device)
count
++
;
count
++
;
}
}
/* don't sort the first two brightness levels */
sort
(
&
br
->
levels
[
2
],
count
-
2
,
sizeof
(
br
->
levels
[
2
]),
acpi_video_cmp_level
,
NULL
);
if
(
count
<
2
)
if
(
count
<
2
)
goto
out_free_levels
;
goto
out_free_levels
;
...
...
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