mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/amd/display: Add helpers to get DMUB FW boot options
[Why & How] To query the bits and print them out for debug purposes. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by: Alan Liu <haoping.liu@amd.com> Signed-off-by: Cruise Hung <cruise.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
65e9d632e3
commit
6c3162d03b
|
|
@ -378,6 +378,7 @@ struct dmub_srv_hw_funcs {
|
|||
|
||||
union dmub_fw_boot_status (*get_fw_status)(struct dmub_srv *dmub);
|
||||
|
||||
union dmub_fw_boot_options (*get_fw_boot_option)(struct dmub_srv *dmub);
|
||||
|
||||
void (*set_gpint)(struct dmub_srv *dmub,
|
||||
union dmub_gpint_data_register reg);
|
||||
|
|
@ -778,6 +779,9 @@ void dmub_flush_buffer_mem(const struct dmub_fb *fb);
|
|||
enum dmub_status dmub_srv_get_fw_boot_status(struct dmub_srv *dmub,
|
||||
union dmub_fw_boot_status *status);
|
||||
|
||||
enum dmub_status dmub_srv_get_fw_boot_option(struct dmub_srv *dmub,
|
||||
union dmub_fw_boot_options *option);
|
||||
|
||||
enum dmub_status dmub_srv_cmd_with_reply_data(struct dmub_srv *dmub,
|
||||
union dmub_rb_cmd *cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -352,6 +352,14 @@ union dmub_fw_boot_status dmub_dcn31_get_fw_boot_status(struct dmub_srv *dmub)
|
|||
return status;
|
||||
}
|
||||
|
||||
union dmub_fw_boot_options dmub_dcn31_get_fw_boot_option(struct dmub_srv *dmub)
|
||||
{
|
||||
union dmub_fw_boot_options option;
|
||||
|
||||
option.all = REG_READ(DMCUB_SCRATCH14);
|
||||
return option;
|
||||
}
|
||||
|
||||
void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmub_srv_hw_params *params)
|
||||
{
|
||||
union dmub_fw_boot_options boot_options = {0};
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@ void dmub_dcn31_skip_dmub_panel_power_sequence(struct dmub_srv *dmub, bool skip)
|
|||
|
||||
union dmub_fw_boot_status dmub_dcn31_get_fw_boot_status(struct dmub_srv *dmub);
|
||||
|
||||
union dmub_fw_boot_options dmub_dcn31_get_fw_boot_option(struct dmub_srv *dmub);
|
||||
|
||||
void dmub_dcn31_setup_outbox0(struct dmub_srv *dmub,
|
||||
const struct dmub_region *outbox0);
|
||||
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
|
|||
funcs->get_gpint_response = dmub_dcn31_get_gpint_response;
|
||||
funcs->get_gpint_dataout = dmub_dcn31_get_gpint_dataout;
|
||||
funcs->get_fw_status = dmub_dcn31_get_fw_boot_status;
|
||||
funcs->get_fw_boot_option = dmub_dcn31_get_fw_boot_option;
|
||||
funcs->enable_dmub_boot_options = dmub_dcn31_enable_dmub_boot_options;
|
||||
funcs->skip_dmub_panel_power_sequence = dmub_dcn31_skip_dmub_panel_power_sequence;
|
||||
//outbox0 call stacks
|
||||
|
|
@ -846,6 +847,20 @@ enum dmub_status dmub_srv_get_fw_boot_status(struct dmub_srv *dmub,
|
|||
return DMUB_STATUS_OK;
|
||||
}
|
||||
|
||||
enum dmub_status dmub_srv_get_fw_boot_option(struct dmub_srv *dmub,
|
||||
union dmub_fw_boot_options *option)
|
||||
{
|
||||
option->all = 0;
|
||||
|
||||
if (!dmub->sw_init)
|
||||
return DMUB_STATUS_INVALID;
|
||||
|
||||
if (dmub->hw_funcs.get_fw_boot_option)
|
||||
*option = dmub->hw_funcs.get_fw_boot_option(dmub);
|
||||
|
||||
return DMUB_STATUS_OK;
|
||||
}
|
||||
|
||||
enum dmub_status dmub_srv_cmd_with_reply_data(struct dmub_srv *dmub,
|
||||
union dmub_rb_cmd *cmd)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user