Skip to content

Commit 9da4f99

Browse files
committed
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: 1454642 ("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> (cherry picked from commit 3f79739) Cc: stable@vger.kernel.org
1 parent 7150850 commit 9da4f99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5423,7 +5423,7 @@ static void setup_backlight_device(struct amdgpu_display_manager *dm,
54235423
caps = &dm->backlight_caps[aconnector->bl_idx];
54245424

54255425
/* Only offer ABM property when non-OLED and user didn't turn off by module parameter */
5426-
if (!caps->ext_caps->bits.oled && amdgpu_dm_abm_level < 0)
5426+
if (caps->ext_caps && !caps->ext_caps->bits.oled && amdgpu_dm_abm_level < 0)
54275427
drm_object_attach_property(&aconnector->base.base,
54285428
dm->adev->mode_info.abm_level_property,
54295429
ABM_SYSFS_CONTROL);

0 commit comments

Comments
 (0)