drm/amd/display: Rework comments on dc file
[ Upstream commit e366f36958f60c431a7430c8c421c9db0ec6738d ] 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> Stable-dep-of: 2a9482e55968 ("drm/amd/display: Prevent vtotal from being set to 0") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4eed29e8a8
commit
549f205819
@ -135,9 +135,7 @@ static const char DC_BUILD_ID[] = "production-build";
|
|||||||
* one or two (in the pipe-split case).
|
* one or two (in the pipe-split case).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Private functions */
|
||||||
* Private functions
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static inline void elevate_update_type(enum surface_update_type *original, enum surface_update_type new)
|
static inline void elevate_update_type(enum surface_update_type *original, enum surface_update_type new)
|
||||||
{
|
{
|
||||||
@ -429,18 +427,14 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_stream_get_last_used_drr_vtotal - dc_stream_get_last_vrr_vtotal
|
||||||
* Function: dc_stream_get_last_vrr_vtotal
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc: [in] dc reference
|
||||||
* Looks up the pipe context of dc_stream_state and gets the
|
* @stream: [in] Initial dc stream state
|
||||||
* last VTOTAL used by DRR (Dynamic Refresh Rate)
|
* @adjust: [in] Updated parameters for vertical_total_min and
|
||||||
*
|
*
|
||||||
* @param [in] dc: dc reference
|
* Looks up the pipe context of dc_stream_state and gets the last VTOTAL used
|
||||||
* @param [in] stream: Initial dc stream state
|
* by DRR (Dynamic Refresh Rate)
|
||||||
* @param [in] adjust: Updated parameters for vertical_total_min and
|
|
||||||
* vertical_total_max
|
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
bool dc_stream_get_last_used_drr_vtotal(struct dc *dc,
|
bool dc_stream_get_last_used_drr_vtotal(struct dc *dc,
|
||||||
struct dc_stream_state *stream,
|
struct dc_stream_state *stream,
|
||||||
@ -1236,9 +1230,7 @@ static void wait_for_no_pipes_pending(struct dc *dc, struct dc_state *context)
|
|||||||
PERF_TRACE();
|
PERF_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Public functions */
|
||||||
* Public functions
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
struct dc *dc_create(const struct dc_init_data *init_params)
|
struct dc *dc_create(const struct dc_init_data *init_params)
|
||||||
{
|
{
|
||||||
@ -4560,21 +4552,17 @@ void dc_mclk_switch_using_fw_based_vblank_stretch_shut_down(struct dc *dc)
|
|||||||
dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching_shut_down = true;
|
dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching_shut_down = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*****************************************************************************
|
* dc_is_dmub_outbox_supported - Check if DMUB firmware support outbox notification
|
||||||
* Function: dc_is_dmub_outbox_supported -
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc: [in] dc structure
|
||||||
* Checks whether DMUB FW supports outbox notifications, if supported
|
|
||||||
* DM should register outbox interrupt prior to actually enabling interrupts
|
|
||||||
* via dc_enable_dmub_outbox
|
|
||||||
*
|
*
|
||||||
* @param
|
* Checks whether DMUB FW supports outbox notifications, if supported DM
|
||||||
* [in] dc: dc structure
|
* should register outbox interrupt prior to actually enabling interrupts
|
||||||
|
* via dc_enable_dmub_outbox
|
||||||
*
|
*
|
||||||
* @return
|
* Return:
|
||||||
* True if DMUB FW supports outbox notifications, False otherwise
|
* True if DMUB FW supports outbox notifications, False otherwise
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
bool dc_is_dmub_outbox_supported(struct dc *dc)
|
bool dc_is_dmub_outbox_supported(struct dc *dc)
|
||||||
{
|
{
|
||||||
@ -4592,21 +4580,17 @@ bool dc_is_dmub_outbox_supported(struct dc *dc)
|
|||||||
return dc->debug.enable_dmub_aux_for_legacy_ddc;
|
return dc->debug.enable_dmub_aux_for_legacy_ddc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
*****************************************************************************
|
* dc_enable_dmub_notifications - Check if dmub fw supports outbox
|
||||||
* Function: dc_enable_dmub_notifications
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc: [in] dc structure
|
||||||
* Calls dc_is_dmub_outbox_supported to check if dmub fw supports outbox
|
|
||||||
* notifications. All DMs shall switch to dc_is_dmub_outbox_supported.
|
|
||||||
* This API shall be removed after switching.
|
|
||||||
*
|
*
|
||||||
* @param
|
* Calls dc_is_dmub_outbox_supported to check if dmub fw supports outbox
|
||||||
* [in] dc: dc structure
|
* notifications. All DMs shall switch to dc_is_dmub_outbox_supported. This
|
||||||
|
* API shall be removed after switching.
|
||||||
*
|
*
|
||||||
* @return
|
* Return:
|
||||||
* True if DMUB FW supports outbox notifications, False otherwise
|
* True if DMUB FW supports outbox notifications, False otherwise
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
bool dc_enable_dmub_notifications(struct dc *dc)
|
bool dc_enable_dmub_notifications(struct dc *dc)
|
||||||
{
|
{
|
||||||
@ -4614,18 +4598,11 @@ bool dc_enable_dmub_notifications(struct dc *dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_enable_dmub_outbox - Enables DMUB unsolicited notification
|
||||||
* Function: dc_enable_dmub_outbox
|
|
||||||
*
|
*
|
||||||
* @brief
|
* dc: [in] dc structure
|
||||||
* Enables DMUB unsolicited notifications to x86 via outbox
|
|
||||||
*
|
*
|
||||||
* @param
|
* Enables DMUB unsolicited notifications to x86 via outbox.
|
||||||
* [in] dc: dc structure
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* None
|
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
void dc_enable_dmub_outbox(struct dc *dc)
|
void dc_enable_dmub_outbox(struct dc *dc)
|
||||||
{
|
{
|
||||||
@ -4726,21 +4703,17 @@ uint8_t get_link_index_from_dpia_port_index(const struct dc *dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_process_dmub_set_config_async - Submits set_config command
|
||||||
* Function: dc_process_dmub_set_config_async
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc: [in] dc structure
|
||||||
* Submits set_config command to dmub via inbox message
|
* @link_index: [in] link_index: link index
|
||||||
|
* @payload: [in] aux payload
|
||||||
|
* @notify: [out] set_config immediate reply
|
||||||
*
|
*
|
||||||
* @param
|
* Submits set_config command to dmub via inbox message.
|
||||||
* [in] dc: dc structure
|
|
||||||
* [in] link_index: link index
|
|
||||||
* [in] payload: aux payload
|
|
||||||
* [out] notify: set_config immediate reply
|
|
||||||
*
|
*
|
||||||
* @return
|
* Return:
|
||||||
* True if successful, False if failure
|
* True if successful, False if failure
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
bool dc_process_dmub_set_config_async(struct dc *dc,
|
bool dc_process_dmub_set_config_async(struct dc *dc,
|
||||||
uint32_t link_index,
|
uint32_t link_index,
|
||||||
@ -4776,21 +4749,17 @@ bool dc_process_dmub_set_config_async(struct dc *dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_process_dmub_set_mst_slots - Submits MST solt allocation
|
||||||
* Function: dc_process_dmub_set_mst_slots
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc: [in] dc structure
|
||||||
* Submits mst slot allocation command to dmub via inbox message
|
* @link_index: [in] link index
|
||||||
|
* @mst_alloc_slots: [in] mst slots to be allotted
|
||||||
|
* @mst_slots_in_use: [out] mst slots in use returned in failure case
|
||||||
*
|
*
|
||||||
* @param
|
* Submits mst slot allocation command to dmub via inbox message
|
||||||
* [in] dc: dc structure
|
|
||||||
* [in] link_index: link index
|
|
||||||
* [in] mst_alloc_slots: mst slots to be allotted
|
|
||||||
* [out] mst_slots_in_use: mst slots in use returned in failure case
|
|
||||||
*
|
*
|
||||||
* @return
|
* Return:
|
||||||
* DC_OK if successful, DC_ERROR if failure
|
* DC_OK if successful, DC_ERROR if failure
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
enum dc_status dc_process_dmub_set_mst_slots(const struct dc *dc,
|
enum dc_status dc_process_dmub_set_mst_slots(const struct dc *dc,
|
||||||
uint32_t link_index,
|
uint32_t link_index,
|
||||||
@ -4830,19 +4799,12 @@ enum dc_status dc_process_dmub_set_mst_slots(const struct dc *dc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_process_dmub_dpia_hpd_int_enable - Submits DPIA DPD interruption
|
||||||
* Function: dc_process_dmub_dpia_hpd_int_enable
|
|
||||||
*
|
*
|
||||||
* @brief
|
* @dc [in]: dc structure
|
||||||
* Submits dpia hpd int enable command to dmub via inbox message
|
* @hpd_int_enable [in]: 1 for hpd int enable, 0 to disable
|
||||||
*
|
*
|
||||||
* @param
|
* Submits dpia hpd int enable command to dmub via inbox message
|
||||||
* [in] dc: dc structure
|
|
||||||
* [in] hpd_int_enable: 1 for hpd int enable, 0 to disable
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* None
|
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,
|
void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,
|
||||||
uint32_t hpd_int_enable)
|
uint32_t hpd_int_enable)
|
||||||
@ -4871,16 +4833,13 @@ void dc_disable_accelerated_mode(struct dc *dc)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*****************************************************************************
|
* dc_notify_vsync_int_state - notifies vsync enable/disable state
|
||||||
* dc_notify_vsync_int_state() - notifies vsync enable/disable state
|
|
||||||
* @dc: dc structure
|
* @dc: dc structure
|
||||||
* @stream: stream where vsync int state changed
|
* @stream: stream where vsync int state changed
|
||||||
* @enable: whether vsync is enabled or disabled
|
* @enable: whether vsync is enabled or disabled
|
||||||
*
|
*
|
||||||
* Called when vsync is enabled/disabled
|
* Called when vsync is enabled/disabled Will notify DMUB to start/stop ABM
|
||||||
* Will notify DMUB to start/stop ABM interrupts after steady state is reached
|
* interrupts after steady state is reached.
|
||||||
*
|
|
||||||
*****************************************************************************
|
|
||||||
*/
|
*/
|
||||||
void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable)
|
void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable)
|
||||||
{
|
{
|
||||||
@ -4922,14 +4881,18 @@ void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bo
|
|||||||
if (pipe->stream_res.abm && pipe->stream_res.abm->funcs->set_abm_pause)
|
if (pipe->stream_res.abm && pipe->stream_res.abm->funcs->set_abm_pause)
|
||||||
pipe->stream_res.abm->funcs->set_abm_pause(pipe->stream_res.abm, !enable, i, pipe->stream_res.tg->inst);
|
pipe->stream_res.abm->funcs->set_abm_pause(pipe->stream_res.abm, !enable, i, pipe->stream_res.tg->inst);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* dc_extended_blank_supported: Decide whether extended blank is supported
|
/**
|
||||||
|
* dc_extended_blank_supported 0 Decide whether extended blank is supported
|
||||||
*
|
*
|
||||||
* Extended blank is a freesync optimization feature to be enabled in the future.
|
* @dc: [in] Current DC state
|
||||||
* During the extra vblank period gained from freesync, we have the ability to enter z9/z10.
|
|
||||||
*
|
*
|
||||||
* @param [in] dc: Current DC state
|
* Extended blank is a freesync optimization feature to be enabled in the
|
||||||
* @return: Indicate whether extended blank is supported (true or false)
|
* future. During the extra vblank period gained from freesync, we have the
|
||||||
|
* ability to enter z9/z10.
|
||||||
|
*
|
||||||
|
* Return:
|
||||||
|
* Indicate whether extended blank is supported (true or false)
|
||||||
*/
|
*/
|
||||||
bool dc_extended_blank_supported(struct dc *dc)
|
bool dc_extended_blank_supported(struct dc *dc)
|
||||||
{
|
{
|
||||||
|
@ -56,9 +56,7 @@ struct dmub_notification;
|
|||||||
#define MIN_VIEWPORT_SIZE 12
|
#define MIN_VIEWPORT_SIZE 12
|
||||||
#define MAX_NUM_EDP 2
|
#define MAX_NUM_EDP 2
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Display Core Interfaces */
|
||||||
* Display Core Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
struct dc_versions {
|
struct dc_versions {
|
||||||
const char *dc_ver;
|
const char *dc_ver;
|
||||||
struct dmcu_version dmcu_version;
|
struct dmcu_version dmcu_version;
|
||||||
@ -993,9 +991,7 @@ void dc_init_callbacks(struct dc *dc,
|
|||||||
void dc_deinit_callbacks(struct dc *dc);
|
void dc_deinit_callbacks(struct dc *dc);
|
||||||
void dc_destroy(struct dc **dc);
|
void dc_destroy(struct dc **dc);
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Surface Interfaces */
|
||||||
* Surface Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TRANSFER_FUNC_POINTS = 1025
|
TRANSFER_FUNC_POINTS = 1025
|
||||||
@ -1350,9 +1346,7 @@ struct dc_state *dc_copy_state(struct dc_state *src_ctx);
|
|||||||
void dc_retain_state(struct dc_state *context);
|
void dc_retain_state(struct dc_state *context);
|
||||||
void dc_release_state(struct dc_state *context);
|
void dc_release_state(struct dc_state *context);
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Link Interfaces */
|
||||||
* Link Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
struct dpcd_caps {
|
struct dpcd_caps {
|
||||||
union dpcd_rev dpcd_rev;
|
union dpcd_rev dpcd_rev;
|
||||||
@ -1454,9 +1448,7 @@ struct hdcp_caps {
|
|||||||
|
|
||||||
uint32_t dc_get_opp_for_plane(struct dc *dc, struct dc_plane_state *plane);
|
uint32_t dc_get_opp_for_plane(struct dc *dc, struct dc_plane_state *plane);
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Sink Interfaces - A sink corresponds to a display output device */
|
||||||
* Sink Interfaces - A sink corresponds to a display output device
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
struct dc_container_id {
|
struct dc_container_id {
|
||||||
// 128bit GUID in binary form
|
// 128bit GUID in binary form
|
||||||
@ -1539,9 +1531,7 @@ struct dc_cursor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Interrupt interfaces */
|
||||||
* Interrupt interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
enum dc_irq_source dc_interrupt_to_irq_source(
|
enum dc_irq_source dc_interrupt_to_irq_source(
|
||||||
struct dc *dc,
|
struct dc *dc,
|
||||||
uint32_t src_id,
|
uint32_t src_id,
|
||||||
@ -1553,9 +1543,7 @@ enum dc_irq_source dc_get_hpd_irq_source_at_index(
|
|||||||
|
|
||||||
void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable);
|
void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable);
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Power Interfaces */
|
||||||
* Power Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
void dc_set_power_state(
|
void dc_set_power_state(
|
||||||
struct dc *dc,
|
struct dc *dc,
|
||||||
@ -1628,14 +1616,10 @@ enum dc_status dc_process_dmub_set_mst_slots(const struct dc *dc,
|
|||||||
void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,
|
void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,
|
||||||
uint32_t hpd_int_enable);
|
uint32_t hpd_int_enable);
|
||||||
|
|
||||||
/*******************************************************************************
|
/* DSC Interfaces */
|
||||||
* DSC Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
#include "dc_dsc.h"
|
#include "dc_dsc.h"
|
||||||
|
|
||||||
/*******************************************************************************
|
/* Disable acc mode Interfaces */
|
||||||
* Disable acc mode Interfaces
|
|
||||||
******************************************************************************/
|
|
||||||
void dc_disable_accelerated_mode(struct dc *dc);
|
void dc_disable_accelerated_mode(struct dc *dc);
|
||||||
|
|
||||||
#endif /* DC_INTERFACE_H_ */
|
#endif /* DC_INTERFACE_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user