From 6fe3a560bd59bd07d7ce35d36ae8f8ad2a1eb2bd Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Sat, 23 May 2020 14:01:14 +0200 Subject: [PATCH] radeon_hd: tell ATOMbios that we handle brightness control In hrev55767, a previous patch added the needed code for Haiku to control the display brightness. However, we didn't tell the video card BIOS about it, and so the card could also control the brightness by itself. This disables BIOS based brightness control and lets Haiku take over cleanly. Change-Id: Ie0e8f7e653c2d4773c463d21246f2ccc6ec8f441 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7116 Reviewed-by: nephele nephele Tested-by: Commit checker robot Reviewed-by: Adrien Destugues Reviewed-by: waddlesplash --- src/add-ons/accelerants/radeon_hd/bios.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/bios.cpp b/src/add-ons/accelerants/radeon_hd/bios.cpp index 4d29bb0e52..c72533815a 100644 --- a/src/add-ons/accelerants/radeon_hd/bios.cpp +++ b/src/add-ons/accelerants/radeon_hd/bios.cpp @@ -44,8 +44,8 @@ radeon_bios_init_scratch() biosScratch6 = Read32(OUT, RADEON_BIOS_6_SCRATCH); } - biosScratch2 &= ~ATOM_S2_VRI_BRIGHT_ENABLE; - // bios should control backlight + biosScratch2 |= ATOM_S2_VRI_BRIGHT_ENABLE; + // bios should not control backlight biosScratch6 |= ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH; // bios shouldn't handle mode switching