* Question about ACPI Video
@ 2010-01-25 9:45 luke lin
2010-01-26 0:58 ` Zhang Rui
0 siblings, 1 reply; 5+ messages in thread
From: luke lin @ 2010-01-25 9:45 UTC (permalink / raw)
To: linux-acpi; +Cc: Luke lin
Hi all,
I read the drivers/acpi/video.c:
895 result = acpi_video_device_lcd_set_level(device, max_level);
896 if (result)
897 goto out_free_levels;
898
899 result = acpi_video_device_lcd_get_level_current(device, &level);
900 if (result)
901 goto out_free_levels;
902
903 br->flags._BQC_use_index = (level == max_level ? 0 : 1);
904
905 if (!br->flags._BQC_use_index) {
912 for (i = 2; i < br->count; i++)
913 if (level_old == br->levels[i])
914 level = level_old;
915 goto set_level;
916 }
why after level == max_level, it will still need set_level again?
is this a bug, or it is necessary.
thx
luke
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Question about ACPI Video 2010-01-25 9:45 Question about ACPI Video luke lin @ 2010-01-26 0:58 ` Zhang Rui 2010-01-26 3:24 ` Len Brown 2010-01-27 18:02 ` Edward Shao 0 siblings, 2 replies; 5+ messages in thread From: Zhang Rui @ 2010-01-26 0:58 UTC (permalink / raw) To: luke lin; +Cc: linux-acpi@vger.kernel.org, Luke lin On Mon, 2010-01-25 at 17:45 +0800, luke lin wrote: > Hi all, > > I read the drivers/acpi/video.c: > > 895 result = acpi_video_device_lcd_set_level(device, max_level); > 896 if (result) > 897 goto out_free_levels; > 898 > 899 result = acpi_video_device_lcd_get_level_current(device, &level); > 900 if (result) > 901 goto out_free_levels; > 902 > 903 br->flags._BQC_use_index = (level == max_level ? 0 : 1); > 904 > 905 if (!br->flags._BQC_use_index) { > 912 for (i = 2; i < br->count; i++) > 913 if (level_old == br->levels[i]) > 914 level = level_old; > 915 goto set_level; > 916 } > why after level == max_level, it will still need set_level again? > is this a bug, or it is necessary. > Because setting the backlight to max_level is just to check if _BQC uses indexed value. We need to set the backlight back after this is done. thanks, rui > thx > luke > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ACPI Video 2010-01-26 0:58 ` Zhang Rui @ 2010-01-26 3:24 ` Len Brown 2010-01-27 18:02 ` Edward Shao 1 sibling, 0 replies; 5+ messages in thread From: Len Brown @ 2010-01-26 3:24 UTC (permalink / raw) To: Zhang Rui; +Cc: luke lin, linux-acpi@vger.kernel.org, Luke lin > > why after level == max_level, it will still need set_level again? > > is this a bug, or it is necessary. > > > Because setting the backlight to max_level is just to check if _BQC uses > indexed value. We need to set the backlight back after this is done. perhaps a good place for a comment? thanks, Len Brown, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ACPI Video 2010-01-26 0:58 ` Zhang Rui 2010-01-26 3:24 ` Len Brown @ 2010-01-27 18:02 ` Edward Shao 2010-01-28 7:04 ` Zhang Rui 1 sibling, 1 reply; 5+ messages in thread From: Edward Shao @ 2010-01-27 18:02 UTC (permalink / raw) To: Zhang Rui; +Cc: linux-acpi@vger.kernel.org, Luke lin On Tue, Jan 26, 2010 at 8:58 AM, Zhang Rui <rui.zhang@intel.com> wrote: > On Mon, 2010-01-25 at 17:45 +0800, luke lin wrote: >> Hi all, >> >> I read the drivers/acpi/video.c: >> >> 895 result = acpi_video_device_lcd_set_level(device, max_level); >> 896 if (result) >> 897 goto out_free_levels; >> 898 >> 899 result = acpi_video_device_lcd_get_level_current(device, &level); >> 900 if (result) >> 901 goto out_free_levels; >> 902 >> 903 br->flags._BQC_use_index = (level == max_level ? 0 : 1); >> 904 >> 905 if (!br->flags._BQC_use_index) { >> 912 for (i = 2; i < br->count; i++) >> 913 if (level_old == br->levels[i]) >> 914 level = level_old; >> 915 goto set_level; >> 916 } >> why after level == max_level, it will still need set_level again? >> is this a bug, or it is necessary. >> > Because setting the backlight to max_level is just to check if _BQC uses > indexed value. We need to set the backlight back after this is done. > > thanks, > rui Hi~ I'm wondering why check (level == max_level) can make sure if _BQC uses indexed value? Is it possible that both level and max_level is indexed value? Thank you very much. -- Best Regards, Edward -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ACPI Video 2010-01-27 18:02 ` Edward Shao @ 2010-01-28 7:04 ` Zhang Rui 0 siblings, 0 replies; 5+ messages in thread From: Zhang Rui @ 2010-01-28 7:04 UTC (permalink / raw) To: Edward Shao; +Cc: linux-acpi@vger.kernel.org, Luke lin On Thu, 2010-01-28 at 02:02 +0800, Edward Shao wrote: > On Tue, Jan 26, 2010 at 8:58 AM, Zhang Rui <rui.zhang@intel.com> wrote: > > On Mon, 2010-01-25 at 17:45 +0800, luke lin wrote: > >> Hi all, > >> > >> I read the drivers/acpi/video.c: > >> > >> 895 result = acpi_video_device_lcd_set_level(device, max_level); > >> 896 if (result) > >> 897 goto out_free_levels; > >> 898 > >> 899 result = acpi_video_device_lcd_get_level_current(device, &level); > >> 900 if (result) > >> 901 goto out_free_levels; > >> 902 > >> 903 br->flags._BQC_use_index = (level == max_level ? 0 : 1); > >> 904 > >> 905 if (!br->flags._BQC_use_index) { > >> 912 for (i = 2; i < br->count; i++) > >> 913 if (level_old == br->levels[i]) > >> 914 level = level_old; > >> 915 goto set_level; > >> 916 } > >> why after level == max_level, it will still need set_level again? > >> is this a bug, or it is necessary. > >> > > Because setting the backlight to max_level is just to check if _BQC uses > > indexed value. We need to set the backlight back after this is done. > > > > thanks, > > rui > > Hi~ > > I'm wondering why check (level == max_level) can make sure if _BQC > uses indexed value? > Is it possible that both level and max_level is indexed value? > If both _BQC and _BCL uses indexed value, then we don't need to treat them as indexed value. :p for example, _BCL returns {0, 1, 2, 3, 4, 5, ... }, the index of level n is n. If _BQC uses indexed value, it should returns n for level n. so this equals a BIOS that both _BCL and _BQC use percentage values. thanks, rui > Thank you very much. > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-28 7:06 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-25 9:45 Question about ACPI Video luke lin 2010-01-26 0:58 ` Zhang Rui 2010-01-26 3:24 ` Len Brown 2010-01-27 18:02 ` Edward Shao 2010-01-28 7:04 ` Zhang Rui
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox