drm/amd/display: Minor update to DML
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 13 Oct 2017 02:45:25 +0000 (22:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:52:32 +0000 (16:52 -0400)
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@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/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h
drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h

index 741b5e0..63c2f52 100644 (file)
@@ -2015,10 +2015,11 @@ static void dcn10_power_on_fe(
                                plane_state->dst_rect.height);
 
                dm_logger_write(dc->ctx->logger, LOG_DC,
-                               "Pipe %d: width, height, x, y\n"
+                               "Pipe %d: width, height, x, y         format:%d\n"
                                "viewport:%d, %d, %d, %d\n"
                                "recout:  %d, %d, %d, %d\n",
                                pipe_ctx->pipe_idx,
+                               plane_state->format,
                                pipe_ctx->plane_res.scl_data.viewport.width,
                                pipe_ctx->plane_res.scl_data.viewport.height,
                                pipe_ctx->plane_res.scl_data.viewport.x,
index 09d2328..4c31fa5 100644 (file)
@@ -127,17 +127,11 @@ static void set_ip_params(struct _vcs_dpi_ip_params_st *ip, enum dml_project pro
        }
 }
 
-static void set_mode_evaluation(struct _vcs_dpi_mode_evaluation_st *me, enum dml_project project)
-{
-       me->voltage_override = dm_vmin;
-}
-
 void dml_init_instance(struct display_mode_lib *lib, enum dml_project project)
 {
        if (lib->project != project) {
                set_soc_bounding_box(&lib->soc, project);
                set_ip_params(&lib->ip, project);
-               set_mode_evaluation(&lib->me, project);
                lib->project = project;
        }
 }
index ed77f96..26f4f2a 100644 (file)
@@ -40,7 +40,6 @@ enum dml_project {
 struct display_mode_lib {
        struct _vcs_dpi_ip_params_st ip;
        struct _vcs_dpi_soc_bounding_box_st soc;
-       struct _vcs_dpi_mode_evaluation_st me;
        enum dml_project project;
        struct vba_vars_st vba;
        struct dal_logger *logger;
index 27e2046..baf1821 100644 (file)
@@ -27,7 +27,6 @@
 
 typedef struct _vcs_dpi_voltage_scaling_st     voltage_scaling_st;
 typedef struct _vcs_dpi_soc_bounding_box_st    soc_bounding_box_st;
-typedef struct _vcs_dpi_mode_evaluation_st     mode_evaluation_st;
 typedef struct _vcs_dpi_ip_params_st   ip_params_st;
 typedef struct _vcs_dpi_display_pipe_source_params_st  display_pipe_source_params_st;
 typedef struct _vcs_dpi_display_output_params_st       display_output_params_st;
@@ -60,10 +59,6 @@ typedef struct _vcs_dpi_display_dlg_prefetch_param_st        display_dlg_prefetch_param
 typedef struct _vcs_dpi_display_pipe_clock_st  display_pipe_clock_st;
 typedef struct _vcs_dpi_display_arb_params_st  display_arb_params_st;
 
-struct _vcs_dpi_mode_evaluation_st {
-       int voltage_override;
-};
-
 struct _vcs_dpi_voltage_scaling_st {
        int state;
        double dscclk_mhz;
@@ -96,6 +91,7 @@ struct        _vcs_dpi_soc_bounding_box_st    {
        double fabric_datapath_to_dcn_data_return_bytes;
        double dcn_downspread_percent;
        double dispclk_dppclk_vco_speed_mhz;
+       double dfs_vco_period_ps;
        unsigned int    round_trip_ping_latency_dcfclk_cycles;
        unsigned int    urgent_out_of_order_return_per_channel_bytes;
        unsigned int    channel_interleave_bytes;
@@ -105,6 +101,7 @@ struct      _vcs_dpi_soc_bounding_box_st    {
        double  dram_clock_change_latency_us;
        double  writeback_dram_clock_change_latency_us;
        unsigned int    return_bus_width_bytes;
+       unsigned int    voltage_override;
        double  xfc_bus_transport_time_us;
        double  xfc_xbuf_latency_tolerance_us;
        struct _vcs_dpi_voltage_scaling_st clock_limits[7];
index ffd1d8d..e337c2c 100644 (file)
@@ -251,19 +251,14 @@ unsigned int dml_get_voltage_level(
                const display_e2e_pipe_params_st *pipes,
                unsigned int num_pipes)
 {
-       bool need_recalculate = memcmp(
-                       &mode_lib->soc,
-                       &mode_lib->vba.soc,
-                       sizeof(mode_lib->vba.soc)) != 0
+       bool need_recalculate = memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
                        || memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-                       || memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
                        || num_pipes != mode_lib->vba.cache_num_pipes
                        || memcmp(pipes, mode_lib->vba.cache_pipes,
                                        sizeof(display_e2e_pipe_params_st) * num_pipes) != 0;
 
        mode_lib->vba.soc = mode_lib->soc;
        mode_lib->vba.ip = mode_lib->ip;
-       mode_lib->vba.me = mode_lib->me;
        memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
        mode_lib->vba.cache_num_pipes = num_pipes;
 
@@ -772,7 +767,6 @@ static void recalculate_params(
        // This is only safe to use memcmp because there are non-POD types in struct display_mode_lib
        if (memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
                        || memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-                       || memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
                        || num_pipes != mode_lib->vba.cache_num_pipes
                        || memcmp(
                                        pipes,
@@ -780,7 +774,6 @@ static void recalculate_params(
                                        sizeof(display_e2e_pipe_params_st) * num_pipes) != 0) {
                mode_lib->vba.soc = mode_lib->soc;
                mode_lib->vba.ip = mode_lib->ip;
-               mode_lib->vba.me = mode_lib->me;
                memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
                mode_lib->vba.cache_num_pipes = num_pipes;
                recalculate(mode_lib);
index 4b8c1b9..c8d1a05 100644 (file)
@@ -98,7 +98,6 @@ bool Calculate256BBlockSizes(
 struct vba_vars_st {
        ip_params_st    ip;
        soc_bounding_box_st     soc;
-       mode_evaluation_st me;
 
        unsigned int MaximumMaxVStartupLines;
        double cursor_bw[DC__NUM_DPP__MAX];