Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: remove DC_FP_* wrapper from dml folder

FPU documentation states that developers must not use DC_FP_START/END
inside dml files, but use this macro to wrap calls to FPU functions in
dc folder (outside dml folder). Therefore, this patch removes DC_FP_*
wrappers from dml folder and wraps calls for these FPU operations
outside dml, as required.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Melissa Wen and committed by
Alex Deucher
9696679b 851c5f24

+10 -18
+8 -2
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
··· 2983 2983 true); 2984 2984 dcn10_stereo_hw_frame_pack_wa(dc, context); 2985 2985 2986 - if (dc->debug.pplib_wm_report_mode == WM_REPORT_OVERRIDE) 2986 + if (dc->debug.pplib_wm_report_mode == WM_REPORT_OVERRIDE) { 2987 + DC_FP_START(); 2987 2988 dcn_bw_notify_pplib_of_wm_ranges(dc); 2989 + DC_FP_END(); 2990 + } 2988 2991 2989 2992 if (dc->debug.sanity_checks) 2990 2993 hws->funcs.verify_allow_pstate_change_high(dc); ··· 3020 3017 3021 3018 dcn10_stereo_hw_frame_pack_wa(dc, context); 3022 3019 3023 - if (dc->debug.pplib_wm_report_mode == WM_REPORT_OVERRIDE) 3020 + if (dc->debug.pplib_wm_report_mode == WM_REPORT_OVERRIDE) { 3021 + DC_FP_START(); 3024 3022 dcn_bw_notify_pplib_of_wm_ranges(dc); 3023 + DC_FP_END(); 3024 + } 3025 3025 3026 3026 if (dc->debug.sanity_checks) 3027 3027 hws->funcs.verify_allow_pstate_change_high(dc);
+2
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
··· 1506 1506 && pool->base.pp_smu->rv_funcs.set_pme_wa_enable != NULL) 1507 1507 dc->debug.az_endpoint_mute_only = false; 1508 1508 1509 + DC_FP_START(); 1509 1510 if (!dc->debug.disable_pplib_clock_request) 1510 1511 dcn_bw_update_from_pplib(dc); 1511 1512 dcn_bw_sync_calcs_and_dml(dc); ··· 1514 1513 dc->res_pool = &pool->base; 1515 1514 dcn_bw_notify_pplib_of_wm_ranges(dc); 1516 1515 } 1516 + DC_FP_END(); 1517 1517 1518 1518 { 1519 1519 struct irq_service_init_data init_data;
-14
drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c
··· 639 639 { 640 640 bool updated = false; 641 641 642 - DC_FP_START(); 643 642 if ((int)(dc->dcn_soc->sr_exit_time * 1000) != dc->debug.sr_exit_time_ns 644 643 && dc->debug.sr_exit_time_ns) { 645 644 updated = true; ··· 674 675 dc->dcn_soc->dram_clock_change_latency = 675 676 dc->debug.dram_clock_change_latency_ns / 1000.0; 676 677 } 677 - DC_FP_END(); 678 678 679 679 return updated; 680 680 } ··· 1490 1492 res = dm_pp_get_clock_levels_by_type_with_voltage( 1491 1493 ctx, DM_PP_CLOCK_TYPE_FCLK, &fclks); 1492 1494 1493 - DC_FP_START(); 1494 - 1495 1495 if (res) 1496 1496 res = verify_clock_values(&fclks); 1497 1497 ··· 1519 1523 } else 1520 1524 BREAK_TO_DEBUGGER(); 1521 1525 1522 - DC_FP_END(); 1523 - 1524 1526 res = dm_pp_get_clock_levels_by_type_with_voltage( 1525 1527 ctx, DM_PP_CLOCK_TYPE_DCFCLK, &dcfclks); 1526 - 1527 - DC_FP_START(); 1528 1528 1529 1529 if (res) 1530 1530 res = verify_clock_values(&dcfclks); ··· 1532 1540 dc->dcn_soc->dcfclkv_max0p9 = dcfclks.data[dcfclks.num_levels - 1].clocks_in_khz / 1000.0; 1533 1541 } else 1534 1542 BREAK_TO_DEBUGGER(); 1535 - 1536 - DC_FP_END(); 1537 1543 } 1538 1544 1539 1545 void dcn_bw_notify_pplib_of_wm_ranges(struct dc *dc) ··· 1546 1556 if (!pp || !pp->set_wm_ranges) 1547 1557 return; 1548 1558 1549 - DC_FP_START(); 1550 1559 min_fclk_khz = dc->dcn_soc->fabric_and_dram_bandwidth_vmin0p65 * 1000000 / 32; 1551 1560 min_dcfclk_khz = dc->dcn_soc->dcfclkv_min0p65 * 1000; 1552 1561 socclk_khz = dc->dcn_soc->socclk * 1000; 1553 - DC_FP_END(); 1554 1562 1555 1563 /* Now notify PPLib/SMU about which Watermarks sets they should select 1556 1564 * depending on DPM state they are in. And update BW MGR GFX Engine and ··· 1599 1611 1600 1612 void dcn_bw_sync_calcs_and_dml(struct dc *dc) 1601 1613 { 1602 - DC_FP_START(); 1603 1614 DC_LOG_BANDWIDTH_CALCS("sr_exit_time: %f ns\n" 1604 1615 "sr_enter_plus_exit_time: %f ns\n" 1605 1616 "urgent_latency: %f ns\n" ··· 1787 1800 dc->dml.ip.bug_forcing_LC_req_same_size_fixed = 1788 1801 dc->dcn_ip->bug_forcing_luma_and_chroma_request_to_same_size_fixed == dcn_bw_yes; 1789 1802 dc->dml.ip.dcfclk_cstate_latency = dc->dcn_ip->dcfclk_cstate_latency; 1790 - DC_FP_END(); 1791 1803 }
-2
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
··· 1302 1302 } 1303 1303 1304 1304 /* populate writeback information */ 1305 - DC_FP_START(); 1306 1305 dc->res_pool->funcs->populate_dml_writeback_from_context(dc, res_ctx, pipes); 1307 - DC_FP_END(); 1308 1306 1309 1307 return pipe_cnt; 1310 1308 }