mirror of https://gitee.com/openkylin/linux.git
drm/amd/display: use dc_is_virtual instead of ENUM
Signed-off-by: Eric Bernstein <eric.bernstein@amd.com> Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
a5706c61cb
commit
248cbed60d
|
@ -640,7 +640,8 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
|
|||
bool same_dpcd = true;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
DC_LOGGER_INIT(link->ctx->logger);
|
||||
if (link->connector_signal == SIGNAL_TYPE_VIRTUAL)
|
||||
|
||||
if (dc_is_virtual_signal(link->connector_signal))
|
||||
return false;
|
||||
|
||||
if (false == dc_link_detect_sink(link, &new_connection_type)) {
|
||||
|
@ -1171,8 +1172,6 @@ static bool construct(
|
|||
goto create_fail;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* TODO: #DAL3 Implement id to str function.*/
|
||||
LINK_INFO("Connector[%d] description:"
|
||||
"signal %d\n",
|
||||
|
@ -2562,7 +2561,7 @@ void core_link_enable_stream(
|
|||
enum dc_status status;
|
||||
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
|
||||
|
||||
if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL) {
|
||||
if (!dc_is_virtual_signal(pipe_ctx->stream->signal)) {
|
||||
stream->link->link_enc->funcs->setup(
|
||||
stream->link->link_enc,
|
||||
pipe_ctx->stream->signal);
|
||||
|
|
|
@ -2788,10 +2788,11 @@ enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream)
|
|||
if (!tg->funcs->validate_timing(tg, &stream->timing))
|
||||
res = DC_FAIL_CONTROLLER_VALIDATE;
|
||||
|
||||
if (res == DC_OK)
|
||||
if (res == DC_OK) {
|
||||
if (!link->link_enc->funcs->validate_output_with_stream(
|
||||
link->link_enc, stream))
|
||||
res = DC_FAIL_ENC_VALIDATE;
|
||||
}
|
||||
|
||||
/* TODO: validate audio ASIC caps, encoder */
|
||||
|
||||
|
|
|
@ -1368,7 +1368,7 @@ static enum dc_status apply_single_controller_ctx_to_hw(
|
|||
pipe_ctx->stream_res.tg->funcs->set_static_screen_control(
|
||||
pipe_ctx->stream_res.tg, event_triggers);
|
||||
|
||||
if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL)
|
||||
if (!dc_is_virtual_signal(pipe_ctx->stream->signal))
|
||||
pipe_ctx->stream_res.stream_enc->funcs->dig_connect_to_otg(
|
||||
pipe_ctx->stream_res.stream_enc,
|
||||
pipe_ctx->stream_res.tg->inst);
|
||||
|
|
|
@ -892,7 +892,7 @@ enum dc_status resource_map_phy_clock_resources(
|
|||
return DC_ERROR_UNEXPECTED;
|
||||
|
||||
if (dc_is_dp_signal(pipe_ctx->stream->signal)
|
||||
|| pipe_ctx->stream->signal == SIGNAL_TYPE_VIRTUAL)
|
||||
|| dc_is_virtual_signal(pipe_ctx->stream->signal))
|
||||
pipe_ctx->clock_source =
|
||||
dc->res_pool->dp_clock_source;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue