Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Indicate when custom brightness curves are in use

[Why]
There is a `scale` sysfs attribute that can be used to indicate when
non-linear brightness scaling is in use. As Custom brightness curves
work by linear interpolation of points the scale is no longer linear.

[How]
Indicate non-linear scaling when custom brightness curves in use and
linear scaling otherwise.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <superm1@kernel.org>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mario Limonciello and committed by
Alex Deucher
68f3c044 895b6139

+4 -1
+4 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 5060 5060 } else 5061 5061 props.brightness = props.max_brightness = MAX_BACKLIGHT_LEVEL; 5062 5062 5063 - if (caps->data_points && !(amdgpu_dc_debug_mask & DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE)) 5063 + if (caps->data_points && !(amdgpu_dc_debug_mask & DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE)) { 5064 5064 drm_info(drm, "Using custom brightness curve\n"); 5065 + props.scale = BACKLIGHT_SCALE_NON_LINEAR; 5066 + } else 5067 + props.scale = BACKLIGHT_SCALE_LINEAR; 5065 5068 props.type = BACKLIGHT_RAW; 5066 5069 5067 5070 snprintf(bl_name, sizeof(bl_name), "amdgpu_bl%d",