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: Rework comments on dc file

The file dc.c has multiple comments that do not follow the kernel-doc or
are made in a distracting way. This commit alleviates part of this issue
by reorganizing some comments inside the dc file.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rodrigo Siqueira and committed by
Alex Deucher
e366f369 9552b19e

+70 -123
+62 -99
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 135 135 * one or two (in the pipe-split case). 136 136 */ 137 137 138 - /******************************************************************************* 139 - * Private functions 140 - ******************************************************************************/ 138 + /* Private functions */ 141 139 142 140 static inline void elevate_update_type(enum surface_update_type *original, enum surface_update_type new) 143 141 { ··· 419 421 } 420 422 421 423 /** 422 - ***************************************************************************** 423 - * Function: dc_stream_get_last_vrr_vtotal 424 + * dc_stream_get_last_used_drr_vtotal - dc_stream_get_last_vrr_vtotal 424 425 * 425 - * @brief 426 - * Looks up the pipe context of dc_stream_state and gets the 427 - * last VTOTAL used by DRR (Dynamic Refresh Rate) 426 + * @dc: [in] dc reference 427 + * @stream: [in] Initial dc stream state 428 + * @adjust: [in] Updated parameters for vertical_total_min and 428 429 * 429 - * @param [in] dc: dc reference 430 - * @param [in] stream: Initial dc stream state 431 - * @param [in] adjust: Updated parameters for vertical_total_min and 432 - * vertical_total_max 433 - ***************************************************************************** 430 + * Looks up the pipe context of dc_stream_state and gets the last VTOTAL used 431 + * by DRR (Dynamic Refresh Rate) 434 432 */ 435 433 bool dc_stream_get_last_used_drr_vtotal(struct dc *dc, 436 434 struct dc_stream_state *stream, ··· 1203 1209 PERF_TRACE(); 1204 1210 } 1205 1211 1206 - /******************************************************************************* 1207 - * Public functions 1208 - ******************************************************************************/ 1212 + /* Public functions */ 1209 1213 1210 1214 struct dc *dc_create(const struct dc_init_data *init_params) 1211 1215 { ··· 4544 4552 dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching_shut_down = true; 4545 4553 } 4546 4554 4547 - /* 4548 - ***************************************************************************** 4549 - * Function: dc_is_dmub_outbox_supported - 4555 + /** 4556 + * dc_is_dmub_outbox_supported - Check if DMUB firmware support outbox notification 4550 4557 * 4551 - * @brief 4552 - * Checks whether DMUB FW supports outbox notifications, if supported 4553 - * DM should register outbox interrupt prior to actually enabling interrupts 4554 - * via dc_enable_dmub_outbox 4558 + * @dc: [in] dc structure 4555 4559 * 4556 - * @param 4557 - * [in] dc: dc structure 4560 + * Checks whether DMUB FW supports outbox notifications, if supported DM 4561 + * should register outbox interrupt prior to actually enabling interrupts 4562 + * via dc_enable_dmub_outbox 4558 4563 * 4559 - * @return 4560 - * True if DMUB FW supports outbox notifications, False otherwise 4561 - ***************************************************************************** 4564 + * Return: 4565 + * True if DMUB FW supports outbox notifications, False otherwise 4562 4566 */ 4563 4567 bool dc_is_dmub_outbox_supported(struct dc *dc) 4564 4568 { ··· 4572 4584 return dc->debug.enable_dmub_aux_for_legacy_ddc; 4573 4585 } 4574 4586 4575 - /* 4576 - ***************************************************************************** 4577 - * Function: dc_enable_dmub_notifications 4587 + /** 4588 + * dc_enable_dmub_notifications - Check if dmub fw supports outbox 4578 4589 * 4579 - * @brief 4580 - * Calls dc_is_dmub_outbox_supported to check if dmub fw supports outbox 4581 - * notifications. All DMs shall switch to dc_is_dmub_outbox_supported. 4582 - * This API shall be removed after switching. 4590 + * @dc: [in] dc structure 4583 4591 * 4584 - * @param 4585 - * [in] dc: dc structure 4592 + * Calls dc_is_dmub_outbox_supported to check if dmub fw supports outbox 4593 + * notifications. All DMs shall switch to dc_is_dmub_outbox_supported. This 4594 + * API shall be removed after switching. 4586 4595 * 4587 - * @return 4588 - * True if DMUB FW supports outbox notifications, False otherwise 4589 - ***************************************************************************** 4596 + * Return: 4597 + * True if DMUB FW supports outbox notifications, False otherwise 4590 4598 */ 4591 4599 bool dc_enable_dmub_notifications(struct dc *dc) 4592 4600 { ··· 4590 4606 } 4591 4607 4592 4608 /** 4593 - ***************************************************************************** 4594 - * Function: dc_enable_dmub_outbox 4609 + * dc_enable_dmub_outbox - Enables DMUB unsolicited notification 4595 4610 * 4596 - * @brief 4597 - * Enables DMUB unsolicited notifications to x86 via outbox 4611 + * dc: [in] dc structure 4598 4612 * 4599 - * @param 4600 - * [in] dc: dc structure 4601 - * 4602 - * @return 4603 - * None 4604 - ***************************************************************************** 4613 + * Enables DMUB unsolicited notifications to x86 via outbox. 4605 4614 */ 4606 4615 void dc_enable_dmub_outbox(struct dc *dc) 4607 4616 { ··· 4695 4718 } 4696 4719 4697 4720 /** 4698 - ***************************************************************************** 4699 - * Function: dc_process_dmub_set_config_async 4721 + * dc_process_dmub_set_config_async - Submits set_config command 4700 4722 * 4701 - * @brief 4702 - * Submits set_config command to dmub via inbox message 4723 + * @dc: [in] dc structure 4724 + * @link_index: [in] link_index: link index 4725 + * @payload: [in] aux payload 4726 + * @notify: [out] set_config immediate reply 4703 4727 * 4704 - * @param 4705 - * [in] dc: dc structure 4706 - * [in] link_index: link index 4707 - * [in] payload: aux payload 4708 - * [out] notify: set_config immediate reply 4728 + * Submits set_config command to dmub via inbox message. 4709 4729 * 4710 - * @return 4711 - * True if successful, False if failure 4712 - ***************************************************************************** 4730 + * Return: 4731 + * True if successful, False if failure 4713 4732 */ 4714 4733 bool dc_process_dmub_set_config_async(struct dc *dc, 4715 4734 uint32_t link_index, ··· 4741 4768 } 4742 4769 4743 4770 /** 4744 - ***************************************************************************** 4745 - * Function: dc_process_dmub_set_mst_slots 4771 + * dc_process_dmub_set_mst_slots - Submits MST solt allocation 4746 4772 * 4747 - * @brief 4748 - * Submits mst slot allocation command to dmub via inbox message 4773 + * @dc: [in] dc structure 4774 + * @link_index: [in] link index 4775 + * @mst_alloc_slots: [in] mst slots to be allotted 4776 + * @mst_slots_in_use: [out] mst slots in use returned in failure case 4749 4777 * 4750 - * @param 4751 - * [in] dc: dc structure 4752 - * [in] link_index: link index 4753 - * [in] mst_alloc_slots: mst slots to be allotted 4754 - * [out] mst_slots_in_use: mst slots in use returned in failure case 4778 + * Submits mst slot allocation command to dmub via inbox message 4755 4779 * 4756 - * @return 4757 - * DC_OK if successful, DC_ERROR if failure 4758 - ***************************************************************************** 4780 + * Return: 4781 + * DC_OK if successful, DC_ERROR if failure 4759 4782 */ 4760 4783 enum dc_status dc_process_dmub_set_mst_slots(const struct dc *dc, 4761 4784 uint32_t link_index, ··· 4791 4822 } 4792 4823 4793 4824 /** 4794 - ***************************************************************************** 4795 - * Function: dc_process_dmub_dpia_hpd_int_enable 4825 + * dc_process_dmub_dpia_hpd_int_enable - Submits DPIA DPD interruption 4796 4826 * 4797 - * @brief 4798 - * Submits dpia hpd int enable command to dmub via inbox message 4827 + * @dc [in]: dc structure 4828 + * @hpd_int_enable [in]: 1 for hpd int enable, 0 to disable 4799 4829 * 4800 - * @param 4801 - * [in] dc: dc structure 4802 - * [in] hpd_int_enable: 1 for hpd int enable, 0 to disable 4803 - * 4804 - * @return 4805 - * None 4806 - ***************************************************************************** 4830 + * Submits dpia hpd int enable command to dmub via inbox message 4807 4831 */ 4808 4832 void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc, 4809 4833 uint32_t hpd_int_enable) ··· 4825 4863 4826 4864 4827 4865 /** 4828 - ***************************************************************************** 4829 - * dc_notify_vsync_int_state() - notifies vsync enable/disable state 4866 + * dc_notify_vsync_int_state - notifies vsync enable/disable state 4830 4867 * @dc: dc structure 4831 - * @stream: stream where vsync int state changed 4832 - * @enable: whether vsync is enabled or disabled 4868 + * @stream: stream where vsync int state changed 4869 + * @enable: whether vsync is enabled or disabled 4833 4870 * 4834 - * Called when vsync is enabled/disabled 4835 - * Will notify DMUB to start/stop ABM interrupts after steady state is reached 4836 - * 4837 - ***************************************************************************** 4871 + * Called when vsync is enabled/disabled Will notify DMUB to start/stop ABM 4872 + * interrupts after steady state is reached. 4838 4873 */ 4839 4874 void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable) 4840 4875 { ··· 4873 4914 if (pipe->stream_res.abm && pipe->stream_res.abm->funcs->set_abm_pause) 4874 4915 pipe->stream_res.abm->funcs->set_abm_pause(pipe->stream_res.abm, !enable, i, pipe->stream_res.tg->inst); 4875 4916 } 4876 - /* 4877 - * dc_extended_blank_supported: Decide whether extended blank is supported 4917 + 4918 + /** 4919 + * dc_extended_blank_supported 0 Decide whether extended blank is supported 4878 4920 * 4879 - * Extended blank is a freesync optimization feature to be enabled in the future. 4880 - * During the extra vblank period gained from freesync, we have the ability to enter z9/z10. 4921 + * @dc: [in] Current DC state 4881 4922 * 4882 - * @param [in] dc: Current DC state 4883 - * @return: Indicate whether extended blank is supported (true or false) 4923 + * Extended blank is a freesync optimization feature to be enabled in the 4924 + * future. During the extra vblank period gained from freesync, we have the 4925 + * ability to enter z9/z10. 4926 + * 4927 + * Return: 4928 + * Indicate whether extended blank is supported (true or false) 4884 4929 */ 4885 4930 bool dc_extended_blank_supported(struct dc *dc) 4886 4931 {
+8 -24
drivers/gpu/drm/amd/display/dc/dc.h
··· 56 56 #define MIN_VIEWPORT_SIZE 12 57 57 #define MAX_NUM_EDP 2 58 58 59 - /******************************************************************************* 60 - * Display Core Interfaces 61 - ******************************************************************************/ 59 + /* Display Core Interfaces */ 62 60 struct dc_versions { 63 61 const char *dc_ver; 64 62 struct dmcu_version dmcu_version; ··· 998 1000 void dc_deinit_callbacks(struct dc *dc); 999 1001 void dc_destroy(struct dc **dc); 1000 1002 1001 - /******************************************************************************* 1002 - * Surface Interfaces 1003 - ******************************************************************************/ 1003 + /* Surface Interfaces */ 1004 1004 1005 1005 enum { 1006 1006 TRANSFER_FUNC_POINTS = 1025 ··· 1359 1363 void dc_retain_state(struct dc_state *context); 1360 1364 void dc_release_state(struct dc_state *context); 1361 1365 1362 - /******************************************************************************* 1363 - * Link Interfaces 1364 - ******************************************************************************/ 1366 + /* Link Interfaces */ 1365 1367 1366 1368 struct dpcd_caps { 1367 1369 union dpcd_rev dpcd_rev; ··· 1461 1467 1462 1468 uint32_t dc_get_opp_for_plane(struct dc *dc, struct dc_plane_state *plane); 1463 1469 1464 - /******************************************************************************* 1465 - * Sink Interfaces - A sink corresponds to a display output device 1466 - ******************************************************************************/ 1470 + /* Sink Interfaces - A sink corresponds to a display output device */ 1467 1471 1468 1472 struct dc_container_id { 1469 1473 // 128bit GUID in binary form ··· 1544 1552 }; 1545 1553 1546 1554 1547 - /******************************************************************************* 1548 - * Interrupt interfaces 1549 - ******************************************************************************/ 1555 + /* Interrupt interfaces */ 1550 1556 enum dc_irq_source dc_interrupt_to_irq_source( 1551 1557 struct dc *dc, 1552 1558 uint32_t src_id, ··· 1556 1566 1557 1567 void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable); 1558 1568 1559 - /******************************************************************************* 1560 - * Power Interfaces 1561 - ******************************************************************************/ 1569 + /* Power Interfaces */ 1562 1570 1563 1571 void dc_set_power_state( 1564 1572 struct dc *dc, ··· 1629 1641 void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc, 1630 1642 uint32_t hpd_int_enable); 1631 1643 1632 - /******************************************************************************* 1633 - * DSC Interfaces 1634 - ******************************************************************************/ 1644 + /* DSC Interfaces */ 1635 1645 #include "dc_dsc.h" 1636 1646 1637 - /******************************************************************************* 1638 - * Disable acc mode Interfaces 1639 - ******************************************************************************/ 1647 + /* Disable acc mode Interfaces */ 1640 1648 void dc_disable_accelerated_mode(struct dc *dc); 1641 1649 1642 1650 #endif /* DC_INTERFACE_H_ */