Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 248cbed6 authored by Eric Bernstein's avatar Eric Bernstein Committed by Alex Deucher
Browse files

drm/amd/display: use dc_is_virtual instead of ENUM

parent a5706c61
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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 */

+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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