Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 305394 Details for
Bug 433697
only 5 of 8 brightness levels are available
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch from 2.6.25
acpi_video.diff (text/plain), 2.02 KB, created by
Matthew Garrett
on 2008-05-14 18:54:17 UTC
(
hide
)
Description:
Patch from 2.6.25
Filename:
MIME Type:
Creator:
Matthew Garrett
Created:
2008-05-14 18:54:17 UTC
Size:
2.02 KB
patch
obsolete
>diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c >index bd77e81..59639c9 100644 >--- a/drivers/acpi/video.c >+++ b/drivers/acpi/video.c >@@ -292,18 +292,26 @@ static int acpi_video_device_set_state(struct acpi_video_device *device, int sta > static int acpi_video_get_brightness(struct backlight_device *bd) > { > unsigned long cur_level; >+ int i; > struct acpi_video_device *vd = > (struct acpi_video_device *)bl_get_data(bd); > acpi_video_device_lcd_get_level_current(vd, &cur_level); >- return (int) cur_level; >+ for (i = 2; i < vd->brightness->count; i++) { >+ if (vd->brightness->levels[i] == cur_level) >+ /* The first two entries are special - see page 575 >+ of the ACPI spec 3.0 */ >+ return i-2; >+ } >+ return 0; > } > > static int acpi_video_set_brightness(struct backlight_device *bd) > { >- int request_level = bd->props.brightness; >+ int request_level = bd->props.brightness+2; > struct acpi_video_device *vd = > (struct acpi_video_device *)bl_get_data(bd); >- acpi_video_device_lcd_set_level(vd, request_level); >+ acpi_video_device_lcd_set_level(vd, >+ vd->brightness->levels[request_level]); > return 0; > } > >@@ -652,7 +660,6 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) > kfree(obj); > > if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ >- unsigned long tmp; > static int count = 0; > char *name; > name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); >@@ -660,11 +667,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) > return; > > sprintf(name, "acpi_video%d", count++); >- acpi_video_device_lcd_get_level_current(device, &tmp); > device->backlight = backlight_device_register(name, > NULL, device, &acpi_backlight_ops); >- device->backlight->props.max_brightness = max_level; >- device->backlight->props.brightness = (int)tmp; >+ device->backlight->props.max_brightness = device->brightness->count-3; >+ device->backlight->props.brightness = acpi_video_get_brightness(device->backlight); > backlight_update_status(device->backlight); > > kfree(name);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 433697
: 305394