drm/amd/display: Define dp_alt_mode
authorCharlene Liu <charlene.liu@amd.com>
Wed, 30 May 2018 19:58:08 +0000 (15:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:38:35 +0000 (16:38 -0500)
Also cleanup command_table2.c. No need for a lot of forward
declarations.

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/command_table2.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
drivers/gpu/drm/amd/display/include/grph_object_id.h

index 752b08a42d3ec238cc2a02f2298458ed8273d348..2b5dc499a35edafd6cc4f37b37d9d16ed69ff6c6 100644 (file)
        bios_cmd_table_para_revision(bp->base.ctx->driver_context, \
                        GET_INDEX_INTO_MASTER_TABLE(command, fname))
 
-static void init_dig_encoder_control(struct bios_parser *bp);
-static void init_transmitter_control(struct bios_parser *bp);
-static void init_set_pixel_clock(struct bios_parser *bp);
 
-static void init_set_crtc_timing(struct bios_parser *bp);
-
-static void init_select_crtc_source(struct bios_parser *bp);
-static void init_enable_crtc(struct bios_parser *bp);
-
-static void init_external_encoder_control(struct bios_parser *bp);
-static void init_enable_disp_power_gating(struct bios_parser *bp);
-static void init_set_dce_clock(struct bios_parser *bp);
-static void init_get_smu_clock_info(struct bios_parser *bp);
-
-void dal_firmware_parser_init_cmd_tbl(struct bios_parser *bp)
-{
-       init_dig_encoder_control(bp);
-       init_transmitter_control(bp);
-       init_set_pixel_clock(bp);
-
-       init_set_crtc_timing(bp);
-
-       init_select_crtc_source(bp);
-       init_enable_crtc(bp);
-
-       init_external_encoder_control(bp);
-       init_enable_disp_power_gating(bp);
-       init_set_dce_clock(bp);
-       init_get_smu_clock_info(bp);
-}
 
 static uint32_t bios_cmd_table_para_revision(void *dev,
                                             uint32_t index)
@@ -829,3 +800,20 @@ static unsigned int get_smu_clock_info_v3_1(struct bios_parser *bp, uint8_t id)
        return 0;
 }
 
+void dal_firmware_parser_init_cmd_tbl(struct bios_parser *bp)
+{
+       init_dig_encoder_control(bp);
+       init_transmitter_control(bp);
+       init_set_pixel_clock(bp);
+
+       init_set_crtc_timing(bp);
+
+       init_select_crtc_source(bp);
+       init_enable_crtc(bp);
+
+       init_external_encoder_control(bp);
+       init_enable_disp_power_gating(bp);
+       init_set_dce_clock(bp);
+       init_get_smu_clock_info(bp);
+
+}
index 21fa40ac0786b61c4435f61015e11a763321c9b7..fd9dc70190a88b26a8d5424fc8bb3a1b03aaea6d 100644 (file)
@@ -995,6 +995,8 @@ void dcn10_link_encoder_disable_output(
 
        if (!dcn10_is_dig_enabled(enc)) {
                /* OF_SKIP_POWER_DOWN_INACTIVE_ENCODER */
+       /*in DP_Alt_No_Connect case, we turn off the dig already,
+       after excuation the PHY w/a sequence, not allow touch PHY any more*/
                return;
        }
        /* Power-down RX and disable GPU PHY should be paired.
index c4197432eb7c34542952364fc4027ff4819f63f3..92cc6c112ea6926653b005685bd796d8a46cb689 100644 (file)
@@ -197,6 +197,11 @@ enum transmitter_color_depth {
        TRANSMITTER_COLOR_DEPTH_48       /* 16 bits */
 };
 
+enum dp_alt_mode {
+       DP_Alt_mode__Unknown = 0,
+       DP_Alt_mode__Connect,
+       DP_Alt_mode__NoConnect,
+};
 /*
  *****************************************************************************
  * graphics_object_id struct