diff options
author | Dmytro Laktyushkin | 2017-05-02 23:29:48 +0200 |
---|---|---|
committer | Alex Deucher | 2017-09-27 00:07:01 +0200 |
commit | 9037d802a97812cb8d614b48f817a5532cf1558c (patch) | |
tree | f3cfa77ff65c30a08def6759aeb7f28e70d76587 /drivers/gpu/drm/amd/display/dc/inc/core_types.h | |
parent | drm/amd/display: prevent assert on error of 1 in calc_freesync_range (diff) | |
download | kernel-qcow2-linux-9037d802a97812cb8d614b48f817a5532cf1558c.tar.gz kernel-qcow2-linux-9037d802a97812cb8d614b48f817a5532cf1558c.tar.xz kernel-qcow2-linux-9037d802a97812cb8d614b48f817a5532cf1558c.zip |
drm/amd/display: refactor bw related variable structure in val_ctx
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/core_types.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/core_types.h | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h index 919c6632ee3e..46bd0318e6be 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h +++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h @@ -31,8 +31,8 @@ #include "dcn_calcs.h" #include "ddc_service_types.h" #include "dc_bios_types.h" -#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #include "mem_input.h" +#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #include "mpc.h" #endif @@ -312,7 +312,48 @@ struct resource_context { bool is_audio_acquired[MAX_PIPES]; uint8_t clock_source_ref_count[MAX_CLOCK_SOURCES]; uint8_t dp_clock_source_ref_count; - }; +}; + +struct dce_bw_output { + bool cpuc_state_change_enable; + bool cpup_state_change_enable; + bool stutter_mode_enable; + bool nbp_state_change_enable; + bool all_displays_in_sync; + struct dce_watermarks urgent_wm_ns[MAX_PIPES]; + struct dce_watermarks stutter_exit_wm_ns[MAX_PIPES]; + struct dce_watermarks nbp_state_change_wm_ns[MAX_PIPES]; + int sclk_khz; + int sclk_deep_sleep_khz; + int yclk_khz; + int dispclk_khz; + int blackout_recovery_time_us; +}; + +#ifdef CONFIG_DRM_AMD_DC_DCN1_0 +struct dcn_bw_clocks { + int dispclk_khz; + bool dppclk_div; + int dcfclk_khz; + int dcfclk_deep_sleep_khz; + int fclk_khz; + int dram_ccm_us; + int min_active_dram_ccm_us; +}; + +struct dcn_bw_output { + struct dcn_bw_clocks cur_clk; + struct dcn_bw_clocks calc_clk; + struct dcn_watermark_set watermarks; +}; +#endif + +union bw_context { +#ifdef CONFIG_DRM_AMD_DC_DCN1_0 + struct dcn_bw_output dcn; +#endif + struct dce_bw_output dce; +}; struct validate_context { struct core_stream *streams[MAX_PIPES]; @@ -322,20 +363,11 @@ struct validate_context { struct resource_context res_ctx; /* The output from BW and WM calculations. */ - struct bw_calcs_output bw_results; + union bw_context bw; + /* Note: these are big structures, do *not* put on stack! */ struct dm_pp_display_configuration pp_display_cfg; - int dispclk_khz; #ifdef CONFIG_DRM_AMD_DC_DCN1_0 - int dppclk_khz; - bool dppclk_div; - int dcfclk_khz; - int dcfclk_deep_sleep_khz; - int socclk_khz; - int fclk_khz; - int dram_ccm_us; - int min_active_dram_ccm_us; - struct dcn_watermark_set watermarks; struct dcn_bw_internal_vars dcn_bw_vars; #endif }; |