Skip to content

Commit 59d3191

Browse files
Harry Wentlandalexdeucher
authored andcommitted
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 Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 1e29303 commit 59d3191

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,12 +1348,12 @@ void dcn_bw_update_from_pplib(struct dc *dc)
13481348
struct dm_pp_clock_levels_with_voltage fclks = {0}, dcfclks = {0};
13491349
bool res;
13501350

1351-
kernel_fpu_begin();
1352-
13531351
/* TODO: This is not the proper way to obtain fabric_and_dram_bandwidth, should be min(fclk, memclk) */
13541352
res = dm_pp_get_clock_levels_by_type_with_voltage(
13551353
ctx, DM_PP_CLOCK_TYPE_FCLK, &fclks);
13561354

1355+
kernel_fpu_begin();
1356+
13571357
if (res)
13581358
res = verify_clock_values(&fclks);
13591359

@@ -1372,9 +1372,13 @@ void dcn_bw_update_from_pplib(struct dc *dc)
13721372
} else
13731373
BREAK_TO_DEBUGGER();
13741374

1375+
kernel_fpu_end();
1376+
13751377
res = dm_pp_get_clock_levels_by_type_with_voltage(
13761378
ctx, DM_PP_CLOCK_TYPE_DCFCLK, &dcfclks);
13771379

1380+
kernel_fpu_begin();
1381+
13781382
if (res)
13791383
res = verify_clock_values(&dcfclks);
13801384

0 commit comments

Comments
 (0)