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: Fix a debugfs null pointer error

[WHY & HOW]
Check whether get_subvp_en() callback exists before calling it.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Alex Hung <alex.hung@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Aurabindo Pillai and committed by
Alex Deucher
efb91fea f4fac416

+5 -1
+5 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
··· 3647 3647 bool mall_supported = dc->caps.mall_size_total; 3648 3648 bool subvp_supported = dc->caps.subvp_fw_processing_delay_us; 3649 3649 unsigned int mall_in_use = false; 3650 - unsigned int subvp_in_use = dc->cap_funcs.get_subvp_en(dc, dc->current_state); 3650 + unsigned int subvp_in_use = false; 3651 + 3651 3652 struct hubbub *hubbub = dc->res_pool->hubbub; 3652 3653 3653 3654 if (hubbub->funcs->get_mall_en) 3654 3655 hubbub->funcs->get_mall_en(hubbub, &mall_in_use); 3656 + 3657 + if (dc->cap_funcs.get_subvp_en) 3658 + subvp_in_use = dc->cap_funcs.get_subvp_en(dc, dc->current_state); 3655 3659 3656 3660 seq_printf(m, "mall supported: %s, enabled: %s\n", 3657 3661 mall_supported ? "yes" : "no", mall_in_use ? "yes" : "no");