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: check if ext_caps is valid in BL setup

LVDS connectors don't have extended backlight caps so check
if the pointer is valid before accessing it.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5012
Fixes: 1454642960b0 ("drm/amd: Re-introduce property to control adaptive backlight modulation")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+1 -1
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 5418 5418 caps = &dm->backlight_caps[aconnector->bl_idx]; 5419 5419 5420 5420 /* Only offer ABM property when non-OLED and user didn't turn off by module parameter */ 5421 - if (!caps->ext_caps->bits.oled && amdgpu_dm_abm_level < 0) 5421 + if (caps->ext_caps && !caps->ext_caps->bits.oled && amdgpu_dm_abm_level < 0) 5422 5422 drm_object_attach_property(&aconnector->base.base, 5423 5423 dm->adev->mode_info.abm_level_property, 5424 5424 ABM_SYSFS_CONTROL);