[PATCH] drm/amd/display: Fix AMDGPU_MAX_BL_LEVEL value
Alex Deucher
alexdeucher at gmail.com
Mon Jun 23 15:31:59 UTC 2025
On Mon, Jun 23, 2025 at 10:49 AM Mario Limonciello
<mario.limonciello at amd.com> wrote:
>
> commit 16dc8bc27c2aa ("drm/amd/display: Export full brightness range to
> userspace") adjusted the brightness range to scale to larger values, but
> missed updating AMDGPU_MAX_BL_LEVEL which is needed to make sure that
> scaling works properly with custom brightness curves.
>
> Fixes: 16dc8bc27c2aa ("drm/amd/display: Export full brightness range to userspace")
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
I think this will break the old non-DAL backlight handling. See
atombios_encoders.c. Might be better to just add a new #define for
them.
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> index 6da4f946cac0..004450cc41c0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
> @@ -435,7 +435,7 @@ struct amdgpu_mode_info {
> struct drm_property *regamma_tf_property;
> };
>
> -#define AMDGPU_MAX_BL_LEVEL 0xFF
> +#define AMDGPU_MAX_BL_LEVEL 0xFFFF
>
> struct amdgpu_backlight_privdata {
> struct amdgpu_encoder *encoder;
> --
> 2.49.0
>
More information about the amd-gfx
mailing list