]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: use dc_is_virtual instead of ENUM
authorEric Bernstein <eric.bernstein@amd.com>
Thu, 28 Feb 2019 19:45:13 +0000 (14:45 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Mar 2019 03:42:51 +0000 (22:42 -0500)
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>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c

index f5ec65ec14603a410f111877a7f7126dd32cf6eb..b39f76e6103962c1c541edc8150ecffee9d6df34 100644 (file)
@@ -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);
index 42ef04230ea2aacf4966ccd32a85ed9ef95cad6d..caf9d894f95f29d2b8b4fe3618e1ee751a191f7a 100644 (file)
@@ -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 */
 
index 951fdf189ef59bd96374c7fc6ccf73c79c4c5f33..1019c59c2e3be4f095c0c6c0a5e9fe00f2832327 100644 (file)
@@ -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);
index 188fc992e94173c032362c93599865b7b18c5862..3d31c273f41f21d6b3cdc885e33a0db01cffc801 100644 (file)
@@ -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