Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ACPI: acpi_video: update doc for acpi_video_bus_DOS
@ 2019-10-07 15:48 Kacper Piwiński
  2019-10-11  9:41 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Kacper Piwiński @ 2019-10-07 15:48 UTC (permalink / raw)
  To: rui.zhang, rjw, lenb; +Cc: linux-acpi, linux-kernel, Kacper Piwiński

commit:
efaa14c

"Starting from win8, MS backlight control driver will set bit 2 of the
parameter of control method _DOS, to inform firmware it should not
perform any automatic brightness changes. This mostly affects hotkey
notification deliver - if we do not set this bit, on hotkey press,
firmware may choose to adjust brightness level instead of sending out
notification and doing nothing."

win7:
https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/BrightnessCtrl.docx

"To avoid problems that might occur if both the system firmware and
the monitor driver control the brightness of the display, the display
miniport driver should set bit 2 of the argument to the _DOS method.
Setting this bit notifies the system firmware that it should not
perform any automatic display brightness changes. The WDDM
driver must set this particular bit because it controls the _DOS
method. The other bits in the _DOS method control the behavior of
the firmware in response to the display switch hot keys."

win8:
http://read.pudn.com/downloads193/doc/907411/Brightness.doc

Signed-off-by: Kacper Piwiński <cosiekvfj@o2.pl>
---
 drivers/acpi/acpi_video.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 4f325e47519f..2f380e7381d6 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -699,9 +699,13 @@ acpi_video_device_EDID(struct acpi_video_device *device,
  *			event notify code.
  *	lcd_flag	:
  *		0.	The system BIOS should automatically control the brightness level
- *			of the LCD when the power changes from AC to DC
+ *			of the LCD when:
+ *			- the power changes from AC to DC (ACPI appendix B)
+ *			- a brightness hotkey gets pressed (implied by Win7/8 backlight docs)
  *		1.	The system BIOS should NOT automatically control the brightness
- *			level of the LCD when the power changes from AC to DC.
+ *			level of the LCD when:
+ *			- the power changes from AC to DC (ACPI appendix B)
+ *			- a brightness hotkey gets pressed (implied by Win7/8 backlight docs)
  *  Return Value:
  *		-EINVAL	wrong arg.
  */
-- 
2.23.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: acpi_video: update doc for acpi_video_bus_DOS
  2019-10-07 15:48 [PATCH] ACPI: acpi_video: update doc for acpi_video_bus_DOS Kacper Piwiński
@ 2019-10-11  9:41 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2019-10-11  9:41 UTC (permalink / raw)
  To: Kacper Piwiński; +Cc: rui.zhang, lenb, linux-acpi, linux-kernel

On Monday, October 7, 2019 5:48:18 PM CEST Kacper Piwiński wrote:
> commit:
> efaa14c
> 
> "Starting from win8, MS backlight control driver will set bit 2 of the
> parameter of control method _DOS, to inform firmware it should not
> perform any automatic brightness changes. This mostly affects hotkey
> notification deliver - if we do not set this bit, on hotkey press,
> firmware may choose to adjust brightness level instead of sending out
> notification and doing nothing."
> 
> win7:
> https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/BrightnessCtrl.docx
> 
> "To avoid problems that might occur if both the system firmware and
> the monitor driver control the brightness of the display, the display
> miniport driver should set bit 2 of the argument to the _DOS method.
> Setting this bit notifies the system firmware that it should not
> perform any automatic display brightness changes. The WDDM
> driver must set this particular bit because it controls the _DOS
> method. The other bits in the _DOS method control the behavior of
> the firmware in response to the display switch hot keys."
> 
> win8:
> http://read.pudn.com/downloads193/doc/907411/Brightness.doc
> 
> Signed-off-by: Kacper Piwiński <cosiekvfj@o2.pl>
> ---
>  drivers/acpi/acpi_video.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
> index 4f325e47519f..2f380e7381d6 100644
> --- a/drivers/acpi/acpi_video.c
> +++ b/drivers/acpi/acpi_video.c
> @@ -699,9 +699,13 @@ acpi_video_device_EDID(struct acpi_video_device *device,
>   *			event notify code.
>   *	lcd_flag	:
>   *		0.	The system BIOS should automatically control the brightness level
> - *			of the LCD when the power changes from AC to DC
> + *			of the LCD when:
> + *			- the power changes from AC to DC (ACPI appendix B)
> + *			- a brightness hotkey gets pressed (implied by Win7/8 backlight docs)
>   *		1.	The system BIOS should NOT automatically control the brightness
> - *			level of the LCD when the power changes from AC to DC.
> + *			level of the LCD when:
> + *			- the power changes from AC to DC (ACPI appendix B)
> + *			- a brightness hotkey gets pressed (implied by Win7/8 backlight docs)
>   *  Return Value:
>   *		-EINVAL	wrong arg.
>   */
> 

Applying as 5.5 material, thanks!





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 15:48 [PATCH] ACPI: acpi_video: update doc for acpi_video_bus_DOS Kacper Piwiński
2019-10-11  9:41 ` Rafael J. Wysocki

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git