mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
drm/amd/display: Notify DMUB on HW Release
[Why & How] DMUB shall be notified on driver hardware release. Implement notification. Reviewed-by: Duncan Ma <duncan.ma@amd.com> Signed-off-by: Duncan Ma <Duncan.Ma@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f9dbe8eb1b
commit
a8a21bafa1
|
|
@ -2176,3 +2176,20 @@ bool dmub_lsdma_send_poll_reg_write_command(struct dc_dmub_srv *dc_dmub_srv, uin
|
|||
return result;
|
||||
}
|
||||
|
||||
void dc_dmub_srv_release_hw(const struct dc *dc)
|
||||
{
|
||||
struct dc_dmub_srv *dc_dmub_srv = dc->ctx->dmub_srv;
|
||||
union dmub_rb_cmd cmd = {0};
|
||||
|
||||
if (!dc_dmub_srv || !dc_dmub_srv->dmub)
|
||||
return;
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.idle_opt_notify_idle.header.type = DMUB_CMD__IDLE_OPT;
|
||||
cmd.idle_opt_notify_idle.header.sub_type = DMUB_CMD__IDLE_OPT_RELEASE_HW;
|
||||
cmd.idle_opt_notify_idle.header.payload_bytes =
|
||||
sizeof(cmd.idle_opt_notify_idle) -
|
||||
sizeof(cmd.idle_opt_notify_idle.header);
|
||||
|
||||
dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,4 +291,10 @@ bool dc_dmub_srv_ips_query_residency_info(const struct dc_context *ctx, uint8_t
|
|||
struct dmub_ips_residency_info *driver_info,
|
||||
enum ips_residency_mode ips_mode);
|
||||
|
||||
/**
|
||||
* dc_dmub_srv_release_hw() - Notifies DMUB service that HW access is no longer required.
|
||||
*
|
||||
* @dc - pointer to DC object
|
||||
*/
|
||||
void dc_dmub_srv_release_hw(const struct dc *dc);
|
||||
#endif /* _DMUB_DC_SRV_H_ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user