#include "dc_dmub_srv.h"
#include "dc_state_priv.h"
#include "dc_stream_priv.h"
-#include "dce/dmub_hw_lock_mgr.h"
#define DC_LOGGER dc->ctx->logger
#ifndef MIN
struct resource_context *res_ctx;
struct pipe_ctx *pipe_to_program = NULL;
bool enable_cursor_offload = dc_dmub_srv_is_cursor_offload_enabled(dc);
- bool unlock_dmub = false;
if (!stream)
return;
if (enable_cursor_offload && dc->hwss.begin_cursor_offload_update) {
dc->hwss.begin_cursor_offload_update(dc, pipe_ctx);
} else {
- if (dc->hwss.dmub_hw_control_lock && pipe_ctx->stream &&
- should_use_dmub_inbox0_lock_for_link(dc, pipe_ctx->stream->link)) {
- dc->hwss.dmub_hw_control_lock(dc, dc->current_state, true);
- unlock_dmub = true;
- }
-
dc->hwss.cursor_lock(dc, pipe_to_program, true);
if (pipe_to_program->next_odm_pipe)
dc->hwss.cursor_lock(dc, pipe_to_program->next_odm_pipe, true);
dc->hwss.cursor_lock(dc, pipe_to_program, false);
if (pipe_to_program->next_odm_pipe)
dc->hwss.cursor_lock(dc, pipe_to_program->next_odm_pipe, false);
-
- if (unlock_dmub)
- dc->hwss.dmub_hw_control_lock(dc, dc->current_state, false);
}
}
}
struct resource_context *res_ctx;
struct pipe_ctx *pipe_to_program = NULL;
bool enable_cursor_offload = dc_dmub_srv_is_cursor_offload_enabled(dc);
- bool unlock_dmub = false;
if (!stream)
return;
if (!pipe_to_program) {
pipe_to_program = pipe_ctx;
- if (enable_cursor_offload && dc->hwss.begin_cursor_offload_update) {
+ if (enable_cursor_offload && dc->hwss.begin_cursor_offload_update)
dc->hwss.begin_cursor_offload_update(dc, pipe_ctx);
- } else {
- if (dc->hwss.dmub_hw_control_lock && pipe_ctx->stream &&
- should_use_dmub_inbox0_lock_for_link(dc, pipe_ctx->stream->link)) {
- dc->hwss.dmub_hw_control_lock(dc, dc->current_state, true);
- unlock_dmub = true;
- }
+ else
dc->hwss.cursor_lock(dc, pipe_to_program, true);
- }
}
dc->hwss.set_cursor_position(pipe_ctx);
}
if (pipe_to_program) {
- if (enable_cursor_offload && dc->hwss.commit_cursor_offload_update) {
+ if (enable_cursor_offload && dc->hwss.commit_cursor_offload_update)
dc->hwss.commit_cursor_offload_update(dc, pipe_to_program);
- } else {
+ else
dc->hwss.cursor_lock(dc, pipe_to_program, false);
-
- if (unlock_dmub)
- dc->hwss.dmub_hw_control_lock(dc, dc->current_state, false);
- }
}
}