Re: wsdisplay brightness issue on amd64

Jonathan Gray <[email protected]>
Newsgroups gmane.os.openbsd.bugs
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 07:12:24AM +0100, Jason McIntyre wrote:
> > try this revert of 6.18.42's
> > drm/amd/display: Fix backlight max_brightness to match exported range
> > 
> 
> yes, the revert fixes it.
> 
> thanks,
> jmc

appears to be the same problem described in
https://gitlab.freedesktop.org/drm/amd/-/work_items/5562

Can you drop the previous patch and try the one below?

adapted from
drm/amd/display: Set default backlight without ACPI support
https://lore.kernel.org/amd-gfx/[email protected]/

Index: sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c,v
diff -u -p -r1.204 amdgpu_dm.c
--- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c	10 Aug 2026 06:28:36 -0000	1.204
+++ sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c	10 Aug 2026 12:49:15 -0000
@@ -4933,20 +4933,16 @@ static void amdgpu_dm_update_backlight_c
 			caps->caps_valid = false;
 		}
 	}
-
+#else
+	if (caps->aux_support)
+		return;
+#endif
 	if (!caps->caps_valid) {
 		caps->min_input_signal = AMDGPU_DM_DEFAULT_MIN_BACKLIGHT;
 		caps->max_input_signal = AMDGPU_DM_DEFAULT_MAX_BACKLIGHT;
+		caps->ac_level = caps->dc_level = 50;
 		caps->caps_valid = true;
 	}
-#else
-	if (caps->aux_support)
-		return;
-
-	caps->min_input_signal = AMDGPU_DM_DEFAULT_MIN_BACKLIGHT;
-	caps->max_input_signal = AMDGPU_DM_DEFAULT_MAX_BACKLIGHT;
-	caps->caps_valid = true;
-#endif
 }
 
 static int get_brightness_range(const struct amdgpu_dm_backlight_caps *caps,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.