diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1568-drm-amd-display-don-t-call-dm_pp_-function-from-an-f.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1568-drm-amd-display-don-t-call-dm_pp_-function-from-an-f.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1568-drm-amd-display-don-t-call-dm_pp_-function-from-an-f.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1568-drm-amd-display-don-t-call-dm_pp_-function-from-an-f.patch new file mode 100644 index 00000000..6601bcb1 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1568-drm-amd-display-don-t-call-dm_pp_-function-from-an-f.patch @@ -0,0 +1,55 @@ +From 69d23e1c8d41cceea4f452012d3a644820010475 Mon Sep 17 00:00:00 2001 +From: Harry Wentland <harry.wentland@amd.com> +Date: Wed, 30 Jan 2019 15:45:18 -0500 +Subject: [PATCH 1568/2940] drm/amd/display: don't call dm_pp_ function from an + fpu block + +Powerplay functions called from dm_pp_* functions tend to do a +mutex_lock which isn't safe to do inside a kernel_fpu_begin/end block as +those will disable/enable preemption. + +Rearrange the dm_pp_get_clock_levels_by_type_with_voltage calls to make +sure they happen outside of kernel_fpu_begin/end. + +Cc: stable@vger.kernel.org +Signed-off-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +index 8ee182be394a..43344dc85360 100644 +--- a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c ++++ b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +@@ -1348,12 +1348,12 @@ void dcn_bw_update_from_pplib(struct dc *dc) + struct dm_pp_clock_levels_with_voltage fclks = {0}, dcfclks = {0}; + bool res; + +- kernel_fpu_begin(); +- + /* TODO: This is not the proper way to obtain fabric_and_dram_bandwidth, should be min(fclk, memclk) */ + res = dm_pp_get_clock_levels_by_type_with_voltage( + ctx, DM_PP_CLOCK_TYPE_FCLK, &fclks); + ++ kernel_fpu_begin(); ++ + if (res) + res = verify_clock_values(&fclks); + +@@ -1372,9 +1372,13 @@ void dcn_bw_update_from_pplib(struct dc *dc) + } else + BREAK_TO_DEBUGGER(); + ++ kernel_fpu_end(); ++ + res = dm_pp_get_clock_levels_by_type_with_voltage( + ctx, DM_PP_CLOCK_TYPE_DCFCLK, &dcfclks); + ++ kernel_fpu_begin(); ++ + if (res) + res = verify_clock_values(&dcfclks); + +-- +2.17.1 + |