Commit 1c994f2d authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

drm/amd/display: update dml interfaces and variables

Preparation for new asic support.
Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: default avatarEric Bernstein <Eric.Bernstein@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fe593296
...@@ -890,11 +890,6 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -890,11 +890,6 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
double refcyc_per_req_delivery_c; double refcyc_per_req_delivery_c;
unsigned int full_recout_width; unsigned int full_recout_width;
double xfc_transfer_delay;
double xfc_precharge_delay;
double xfc_remote_surface_flip_latency;
double xfc_dst_y_delta_drq_limit;
double xfc_prefetch_margin;
double refcyc_per_req_delivery_pre_cur0; double refcyc_per_req_delivery_pre_cur0;
double refcyc_per_req_delivery_cur0; double refcyc_per_req_delivery_cur0;
double refcyc_per_req_delivery_pre_cur1; double refcyc_per_req_delivery_pre_cur1;
...@@ -1344,22 +1339,6 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -1344,22 +1339,6 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13)); ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13));
} }
// XFC
xfc_transfer_delay = get_xfc_transfer_delay(mode_lib, e2e_pipe_param, num_pipes, pipe_idx);
xfc_precharge_delay = get_xfc_precharge_delay(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_remote_surface_flip_latency = get_xfc_remote_surface_flip_latency(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_dst_y_delta_drq_limit = xfc_remote_surface_flip_latency;
xfc_prefetch_margin = get_xfc_prefetch_margin(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
// TTU - Cursor // TTU - Cursor
refcyc_per_req_delivery_pre_cur0 = 0.0; refcyc_per_req_delivery_pre_cur0 = 0.0;
refcyc_per_req_delivery_cur0 = 0.0; refcyc_per_req_delivery_cur0 = 0.0;
...@@ -1510,17 +1489,7 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -1510,17 +1489,7 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
disp_dlg_regs->chunk_hdl_adjust_cur1 = 3; disp_dlg_regs->chunk_hdl_adjust_cur1 = 3;
disp_dlg_regs->dst_y_offset_cur1 = 0; disp_dlg_regs->dst_y_offset_cur1 = 0;
disp_dlg_regs->xfc_reg_transfer_delay = xfc_transfer_delay; disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_dlg_regs->xfc_reg_precharge_delay = xfc_precharge_delay;
disp_dlg_regs->xfc_reg_remote_surface_flip_latency = xfc_remote_surface_flip_latency;
disp_dlg_regs->xfc_reg_prefetch_margin = dml_ceil(xfc_prefetch_margin * refclk_freq_in_mhz,
1);
// slave has to have this value also set to off
if (src->xfc_enable && !src->xfc_slave)
disp_dlg_regs->dst_y_delta_drq_limit = dml_ceil(xfc_dst_y_delta_drq_limit, 1);
else
disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l
* dml_pow(2, 10)); * dml_pow(2, 10));
......
...@@ -890,11 +890,6 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -890,11 +890,6 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
double refcyc_per_req_delivery_c; double refcyc_per_req_delivery_c;
unsigned int full_recout_width; unsigned int full_recout_width;
double xfc_transfer_delay;
double xfc_precharge_delay;
double xfc_remote_surface_flip_latency;
double xfc_dst_y_delta_drq_limit;
double xfc_prefetch_margin;
double refcyc_per_req_delivery_pre_cur0; double refcyc_per_req_delivery_pre_cur0;
double refcyc_per_req_delivery_cur0; double refcyc_per_req_delivery_cur0;
double refcyc_per_req_delivery_pre_cur1; double refcyc_per_req_delivery_pre_cur1;
...@@ -1345,22 +1340,6 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -1345,22 +1340,6 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13)); ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13));
} }
// XFC
xfc_transfer_delay = get_xfc_transfer_delay(mode_lib, e2e_pipe_param, num_pipes, pipe_idx);
xfc_precharge_delay = get_xfc_precharge_delay(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_remote_surface_flip_latency = get_xfc_remote_surface_flip_latency(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_dst_y_delta_drq_limit = xfc_remote_surface_flip_latency;
xfc_prefetch_margin = get_xfc_prefetch_margin(mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
// TTU - Cursor // TTU - Cursor
refcyc_per_req_delivery_pre_cur0 = 0.0; refcyc_per_req_delivery_pre_cur0 = 0.0;
refcyc_per_req_delivery_cur0 = 0.0; refcyc_per_req_delivery_cur0 = 0.0;
...@@ -1511,17 +1490,7 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib, ...@@ -1511,17 +1490,7 @@ static void dml20v2_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
disp_dlg_regs->chunk_hdl_adjust_cur1 = 3; disp_dlg_regs->chunk_hdl_adjust_cur1 = 3;
disp_dlg_regs->dst_y_offset_cur1 = 0; disp_dlg_regs->dst_y_offset_cur1 = 0;
disp_dlg_regs->xfc_reg_transfer_delay = xfc_transfer_delay; disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_dlg_regs->xfc_reg_precharge_delay = xfc_precharge_delay;
disp_dlg_regs->xfc_reg_remote_surface_flip_latency = xfc_remote_surface_flip_latency;
disp_dlg_regs->xfc_reg_prefetch_margin = dml_ceil(xfc_prefetch_margin * refclk_freq_in_mhz,
1);
// slave has to have this value also set to off
if (src->xfc_enable && !src->xfc_slave)
disp_dlg_regs->dst_y_delta_drq_limit = dml_ceil(xfc_dst_y_delta_drq_limit, 1);
else
disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l
* dml_pow(2, 10)); * dml_pow(2, 10));
......
...@@ -936,11 +936,6 @@ static void dml_rq_dlg_get_dlg_params( ...@@ -936,11 +936,6 @@ static void dml_rq_dlg_get_dlg_params(
double refcyc_per_req_delivery_c; double refcyc_per_req_delivery_c;
unsigned int full_recout_width; unsigned int full_recout_width;
double xfc_transfer_delay;
double xfc_precharge_delay;
double xfc_remote_surface_flip_latency;
double xfc_dst_y_delta_drq_limit;
double xfc_prefetch_margin;
double refcyc_per_req_delivery_pre_cur0; double refcyc_per_req_delivery_pre_cur0;
double refcyc_per_req_delivery_cur0; double refcyc_per_req_delivery_cur0;
double refcyc_per_req_delivery_pre_cur1; double refcyc_per_req_delivery_pre_cur1;
...@@ -1412,25 +1407,6 @@ static void dml_rq_dlg_get_dlg_params( ...@@ -1412,25 +1407,6 @@ static void dml_rq_dlg_get_dlg_params(
ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13)); ASSERT(refcyc_per_req_delivery_c < dml_pow(2, 13));
} }
// XFC
xfc_transfer_delay = get_xfc_transfer_delay(mode_lib, e2e_pipe_param, num_pipes, pipe_idx);
xfc_precharge_delay = get_xfc_precharge_delay(
mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_remote_surface_flip_latency = get_xfc_remote_surface_flip_latency(
mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
xfc_dst_y_delta_drq_limit = xfc_remote_surface_flip_latency;
xfc_prefetch_margin = get_xfc_prefetch_margin(
mode_lib,
e2e_pipe_param,
num_pipes,
pipe_idx);
// TTU - Cursor // TTU - Cursor
refcyc_per_req_delivery_pre_cur0 = 0.0; refcyc_per_req_delivery_pre_cur0 = 0.0;
refcyc_per_req_delivery_cur0 = 0.0; refcyc_per_req_delivery_cur0 = 0.0;
...@@ -1621,17 +1597,7 @@ static void dml_rq_dlg_get_dlg_params( ...@@ -1621,17 +1597,7 @@ static void dml_rq_dlg_get_dlg_params(
disp_dlg_regs->chunk_hdl_adjust_cur1 = 3; disp_dlg_regs->chunk_hdl_adjust_cur1 = 3;
disp_dlg_regs->dst_y_offset_cur1 = 0; disp_dlg_regs->dst_y_offset_cur1 = 0;
disp_dlg_regs->xfc_reg_transfer_delay = xfc_transfer_delay; disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_dlg_regs->xfc_reg_precharge_delay = xfc_precharge_delay;
disp_dlg_regs->xfc_reg_remote_surface_flip_latency = xfc_remote_surface_flip_latency;
disp_dlg_regs->xfc_reg_prefetch_margin = dml_ceil(
xfc_prefetch_margin * refclk_freq_in_mhz, 1);
// slave has to have this value also set to off
if (src->xfc_enable && !src->xfc_slave)
disp_dlg_regs->dst_y_delta_drq_limit = dml_ceil(xfc_dst_y_delta_drq_limit, 1);
else
disp_dlg_regs->dst_y_delta_drq_limit = 0x7fff; // off
disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l disp_ttu_regs->refcyc_per_req_delivery_pre_l = (unsigned int) (refcyc_per_req_delivery_pre_l
* dml_pow(2, 10)); * dml_pow(2, 10));
......
...@@ -177,8 +177,14 @@ enum odm_combine_policy { ...@@ -177,8 +177,14 @@ enum odm_combine_policy {
}; };
enum immediate_flip_requirement { enum immediate_flip_requirement {
dm_immediate_flip_not_required,
dm_immediate_flip_required, dm_immediate_flip_required,
dm_immediate_flip_not_required,
};
enum unbounded_requesting_policy {
dm_unbounded_requesting,
dm_unbounded_requesting_edp_only,
dm_unbounded_requesting_disable
}; };
#endif #endif
...@@ -82,6 +82,7 @@ struct _vcs_dpi_soc_bounding_box_st { ...@@ -82,6 +82,7 @@ struct _vcs_dpi_soc_bounding_box_st {
double pct_ideal_dram_sdp_bw_after_urgent_pixel_only; // PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly double pct_ideal_dram_sdp_bw_after_urgent_pixel_only; // PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly
double pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm; double pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm;
double pct_ideal_dram_sdp_bw_after_urgent_vm_only; double pct_ideal_dram_sdp_bw_after_urgent_vm_only;
double pct_ideal_sdp_bw_after_urgent;
double max_avg_sdp_bw_use_normal_percent; double max_avg_sdp_bw_use_normal_percent;
double max_avg_dram_bw_use_normal_percent; double max_avg_dram_bw_use_normal_percent;
unsigned int max_request_size_bytes; unsigned int max_request_size_bytes;
...@@ -125,6 +126,7 @@ struct _vcs_dpi_ip_params_st { ...@@ -125,6 +126,7 @@ struct _vcs_dpi_ip_params_st {
bool use_min_dcfclk; bool use_min_dcfclk;
bool gpuvm_enable; bool gpuvm_enable;
bool hostvm_enable; bool hostvm_enable;
bool dsc422_native_support;
unsigned int gpuvm_max_page_table_levels; unsigned int gpuvm_max_page_table_levels;
unsigned int hostvm_max_page_table_levels; unsigned int hostvm_max_page_table_levels;
unsigned int hostvm_cached_page_table_levels; unsigned int hostvm_cached_page_table_levels;
...@@ -143,6 +145,7 @@ struct _vcs_dpi_ip_params_st { ...@@ -143,6 +145,7 @@ struct _vcs_dpi_ip_params_st {
unsigned char pte_enable; unsigned char pte_enable;
unsigned int pte_chunk_size_kbytes; unsigned int pte_chunk_size_kbytes;
unsigned int meta_chunk_size_kbytes; unsigned int meta_chunk_size_kbytes;
unsigned int min_meta_chunk_size_bytes;
unsigned int writeback_chunk_size_kbytes; unsigned int writeback_chunk_size_kbytes;
unsigned int line_buffer_size_bits; unsigned int line_buffer_size_bits;
unsigned int max_line_buffer_lines; unsigned int max_line_buffer_lines;
...@@ -158,6 +161,7 @@ struct _vcs_dpi_ip_params_st { ...@@ -158,6 +161,7 @@ struct _vcs_dpi_ip_params_st {
double writeback_max_vscl_ratio; double writeback_max_vscl_ratio;
double writeback_min_hscl_ratio; double writeback_min_hscl_ratio;
double writeback_min_vscl_ratio; double writeback_min_vscl_ratio;
double maximum_dsc_bits_per_component;
unsigned int writeback_max_hscl_taps; unsigned int writeback_max_hscl_taps;
unsigned int writeback_max_vscl_taps; unsigned int writeback_max_vscl_taps;
unsigned int writeback_line_buffer_luma_buffer_size; unsigned int writeback_line_buffer_luma_buffer_size;
...@@ -219,11 +223,14 @@ struct _vcs_dpi_display_xfc_params_st { ...@@ -219,11 +223,14 @@ struct _vcs_dpi_display_xfc_params_st {
struct _vcs_dpi_display_pipe_source_params_st { struct _vcs_dpi_display_pipe_source_params_st {
int source_format; int source_format;
double dcc_fraction_of_zs_req_luma;
double dcc_fraction_of_zs_req_chroma;
unsigned char dcc; unsigned char dcc;
unsigned int dcc_rate; unsigned int dcc_rate;
unsigned int dcc_rate_chroma; unsigned int dcc_rate_chroma;
unsigned char dcc_use_global; unsigned char dcc_use_global;
unsigned char vm; unsigned char vm;
bool unbounded_req_mode;
bool gpuvm; // gpuvm enabled bool gpuvm; // gpuvm enabled
bool hostvm; // hostvm enabled bool hostvm; // hostvm enabled
bool gpuvm_levels_force_en; bool gpuvm_levels_force_en;
...@@ -324,6 +331,8 @@ struct _vcs_dpi_display_pipe_dest_params_st { ...@@ -324,6 +331,8 @@ struct _vcs_dpi_display_pipe_dest_params_st {
unsigned int vblank_end; unsigned int vblank_end;
unsigned int htotal; unsigned int htotal;
unsigned int vtotal; unsigned int vtotal;
unsigned int refresh_rate;
unsigned int vfront_porch;
unsigned int vactive; unsigned int vactive;
unsigned int hactive; unsigned int hactive;
unsigned int vstartup_start; unsigned int vstartup_start;
...@@ -333,6 +342,7 @@ struct _vcs_dpi_display_pipe_dest_params_st { ...@@ -333,6 +342,7 @@ struct _vcs_dpi_display_pipe_dest_params_st {
unsigned char interlaced; unsigned char interlaced;
double pixel_rate_mhz; double pixel_rate_mhz;
unsigned char synchronized_vblank_all_planes; unsigned char synchronized_vblank_all_planes;
unsigned char synchronize_timing_if_single_refresh_rate;
unsigned char otg_inst; unsigned char otg_inst;
unsigned int odm_combine; unsigned int odm_combine;
unsigned char use_maximum_vstartup; unsigned char use_maximum_vstartup;
...@@ -469,6 +479,7 @@ struct _vcs_dpi_display_dlg_regs_st { ...@@ -469,6 +479,7 @@ struct _vcs_dpi_display_dlg_regs_st {
unsigned int refcyc_per_vm_req_vblank; unsigned int refcyc_per_vm_req_vblank;
unsigned int refcyc_per_vm_req_flip; unsigned int refcyc_per_vm_req_flip;
unsigned int refcyc_per_vm_dmdata; unsigned int refcyc_per_vm_dmdata;
unsigned int dmdata_dl_delta;
}; };
struct _vcs_dpi_display_ttu_regs_st { struct _vcs_dpi_display_ttu_regs_st {
......
...@@ -91,15 +91,13 @@ dml_get_attr_func(wm_stutter_exit, mode_lib->vba.StutterExitWatermark); ...@@ -91,15 +91,13 @@ dml_get_attr_func(wm_stutter_exit, mode_lib->vba.StutterExitWatermark);
dml_get_attr_func(wm_stutter_enter_exit, mode_lib->vba.StutterEnterPlusExitWatermark); dml_get_attr_func(wm_stutter_enter_exit, mode_lib->vba.StutterEnterPlusExitWatermark);
dml_get_attr_func(wm_dram_clock_change, mode_lib->vba.DRAMClockChangeWatermark); dml_get_attr_func(wm_dram_clock_change, mode_lib->vba.DRAMClockChangeWatermark);
dml_get_attr_func(wm_writeback_dram_clock_change, mode_lib->vba.WritebackDRAMClockChangeWatermark); dml_get_attr_func(wm_writeback_dram_clock_change, mode_lib->vba.WritebackDRAMClockChangeWatermark);
dml_get_attr_func(wm_xfc_underflow, mode_lib->vba.UrgentWatermark); // xfc_underflow maps to urgent
dml_get_attr_func(stutter_efficiency, mode_lib->vba.StutterEfficiency); dml_get_attr_func(stutter_efficiency, mode_lib->vba.StutterEfficiency);
dml_get_attr_func(stutter_efficiency_no_vblank, mode_lib->vba.StutterEfficiencyNotIncludingVBlank); dml_get_attr_func(stutter_efficiency_no_vblank, mode_lib->vba.StutterEfficiencyNotIncludingVBlank);
dml_get_attr_func(stutter_period, mode_lib->vba.StutterPeriod);
dml_get_attr_func(urgent_latency, mode_lib->vba.UrgentLatency); dml_get_attr_func(urgent_latency, mode_lib->vba.UrgentLatency);
dml_get_attr_func(urgent_extra_latency, mode_lib->vba.UrgentExtraLatency); dml_get_attr_func(urgent_extra_latency, mode_lib->vba.UrgentExtraLatency);
dml_get_attr_func(nonurgent_latency, mode_lib->vba.NonUrgentLatencyTolerance); dml_get_attr_func(nonurgent_latency, mode_lib->vba.NonUrgentLatencyTolerance);
dml_get_attr_func( dml_get_attr_func(dram_clock_change_latency, mode_lib->vba.MinActiveDRAMClockChangeLatencySupported);
dram_clock_change_latency,
mode_lib->vba.MinActiveDRAMClockChangeLatencySupported);
dml_get_attr_func(dispclk_calculated, mode_lib->vba.DISPCLK_calculated); dml_get_attr_func(dispclk_calculated, mode_lib->vba.DISPCLK_calculated);
dml_get_attr_func(total_data_read_bw, mode_lib->vba.TotalDataReadBandwidth); dml_get_attr_func(total_data_read_bw, mode_lib->vba.TotalDataReadBandwidth);
dml_get_attr_func(return_bw, mode_lib->vba.ReturnBW); dml_get_attr_func(return_bw, mode_lib->vba.ReturnBW);
...@@ -119,6 +117,7 @@ dml_get_pipe_attr_func(dsc_delay, mode_lib->vba.DSCDelay); ...@@ -119,6 +117,7 @@ dml_get_pipe_attr_func(dsc_delay, mode_lib->vba.DSCDelay);
dml_get_pipe_attr_func(dppclk_calculated, mode_lib->vba.DPPCLK_calculated); dml_get_pipe_attr_func(dppclk_calculated, mode_lib->vba.DPPCLK_calculated);
dml_get_pipe_attr_func(dscclk_calculated, mode_lib->vba.DSCCLK_calculated); dml_get_pipe_attr_func(dscclk_calculated, mode_lib->vba.DSCCLK_calculated);
dml_get_pipe_attr_func(min_ttu_vblank, mode_lib->vba.MinTTUVBlank); dml_get_pipe_attr_func(min_ttu_vblank, mode_lib->vba.MinTTUVBlank);
dml_get_pipe_attr_func(min_ttu_vblank_in_us, mode_lib->vba.MinTTUVBlank);
dml_get_pipe_attr_func(vratio_prefetch_l, mode_lib->vba.VRatioPrefetchY); dml_get_pipe_attr_func(vratio_prefetch_l, mode_lib->vba.VRatioPrefetchY);
dml_get_pipe_attr_func(vratio_prefetch_c, mode_lib->vba.VRatioPrefetchC); dml_get_pipe_attr_func(vratio_prefetch_c, mode_lib->vba.VRatioPrefetchC);
dml_get_pipe_attr_func(dst_x_after_scaler, mode_lib->vba.DSTXAfterScaler); dml_get_pipe_attr_func(dst_x_after_scaler, mode_lib->vba.DSTXAfterScaler);
...@@ -127,18 +126,37 @@ dml_get_pipe_attr_func(dst_y_per_vm_vblank, mode_lib->vba.DestinationLinesToRequ ...@@ -127,18 +126,37 @@ dml_get_pipe_attr_func(dst_y_per_vm_vblank, mode_lib->vba.DestinationLinesToRequ
dml_get_pipe_attr_func(dst_y_per_row_vblank, mode_lib->vba.DestinationLinesToRequestRowInVBlank); dml_get_pipe_attr_func(dst_y_per_row_vblank, mode_lib->vba.DestinationLinesToRequestRowInVBlank);
dml_get_pipe_attr_func(dst_y_prefetch, mode_lib->vba.DestinationLinesForPrefetch); dml_get_pipe_attr_func(dst_y_prefetch, mode_lib->vba.DestinationLinesForPrefetch);
dml_get_pipe_attr_func(dst_y_per_vm_flip, mode_lib->vba.DestinationLinesToRequestVMInImmediateFlip); dml_get_pipe_attr_func(dst_y_per_vm_flip, mode_lib->vba.DestinationLinesToRequestVMInImmediateFlip);
dml_get_pipe_attr_func( dml_get_pipe_attr_func(dst_y_per_row_flip, mode_lib->vba.DestinationLinesToRequestRowInImmediateFlip);
dst_y_per_row_flip,
mode_lib->vba.DestinationLinesToRequestRowInImmediateFlip);
dml_get_pipe_attr_func(xfc_transfer_delay, mode_lib->vba.XFCTransferDelay);
dml_get_pipe_attr_func(xfc_precharge_delay, mode_lib->vba.XFCPrechargeDelay);
dml_get_pipe_attr_func(xfc_remote_surface_flip_latency, mode_lib->vba.XFCRemoteSurfaceFlipLatency);
dml_get_pipe_attr_func(xfc_prefetch_margin, mode_lib->vba.XFCPrefetchMargin);
dml_get_pipe_attr_func(refcyc_per_vm_group_vblank, mode_lib->vba.TimePerVMGroupVBlank); dml_get_pipe_attr_func(refcyc_per_vm_group_vblank, mode_lib->vba.TimePerVMGroupVBlank);
dml_get_pipe_attr_func(refcyc_per_vm_group_flip, mode_lib->vba.TimePerVMGroupFlip); dml_get_pipe_attr_func(refcyc_per_vm_group_flip, mode_lib->vba.TimePerVMGroupFlip);
dml_get_pipe_attr_func(refcyc_per_vm_req_vblank, mode_lib->vba.TimePerVMRequestVBlank); dml_get_pipe_attr_func(refcyc_per_vm_req_vblank, mode_lib->vba.TimePerVMRequestVBlank);
dml_get_pipe_attr_func(refcyc_per_vm_req_flip, mode_lib->vba.TimePerVMRequestFlip); dml_get_pipe_attr_func(refcyc_per_vm_req_flip, mode_lib->vba.TimePerVMRequestFlip);
dml_get_pipe_attr_func(refcyc_per_vm_group_vblank_in_us, mode_lib->vba.TimePerVMGroupVBlank);
dml_get_pipe_attr_func(refcyc_per_vm_group_flip_in_us, mode_lib->vba.TimePerVMGroupFlip);
dml_get_pipe_attr_func(refcyc_per_vm_req_vblank_in_us, mode_lib->vba.TimePerVMRequestVBlank);
dml_get_pipe_attr_func(refcyc_per_vm_req_flip_in_us, mode_lib->vba.TimePerVMRequestFlip);
dml_get_pipe_attr_func(refcyc_per_vm_dmdata_in_us, mode_lib->vba.Tdmdl_vm);
dml_get_pipe_attr_func(dmdata_dl_delta_in_us, mode_lib->vba.Tdmdl);
dml_get_pipe_attr_func(refcyc_per_line_delivery_l_in_us, mode_lib->vba.DisplayPipeLineDeliveryTimeLuma);
dml_get_pipe_attr_func(refcyc_per_line_delivery_c_in_us, mode_lib->vba.DisplayPipeLineDeliveryTimeChroma);
dml_get_pipe_attr_func(refcyc_per_line_delivery_pre_l_in_us, mode_lib->vba.DisplayPipeLineDeliveryTimeLumaPrefetch);
dml_get_pipe_attr_func(refcyc_per_line_delivery_pre_c_in_us, mode_lib->vba.DisplayPipeLineDeliveryTimeChromaPrefetch);
dml_get_pipe_attr_func(refcyc_per_req_delivery_l_in_us, mode_lib->vba.DisplayPipeRequestDeliveryTimeLuma);
dml_get_pipe_attr_func(refcyc_per_req_delivery_c_in_us, mode_lib->vba.DisplayPipeRequestDeliveryTimeChroma);
dml_get_pipe_attr_func(refcyc_per_req_delivery_pre_l_in_us, mode_lib->vba.DisplayPipeRequestDeliveryTimeLumaPrefetch);
dml_get_pipe_attr_func(refcyc_per_req_delivery_pre_c_in_us, mode_lib->vba.DisplayPipeRequestDeliveryTimeChromaPrefetch);
dml_get_pipe_attr_func(refcyc_per_cursor_req_delivery_in_us, mode_lib->vba.CursorRequestDeliveryTime);
dml_get_pipe_attr_func(refcyc_per_cursor_req_delivery_pre_in_us, mode_lib->vba.CursorRequestDeliveryTimePrefetch);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_nom_l_in_us, mode_lib->vba.TimePerMetaChunkNominal);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_nom_c_in_us, mode_lib->vba.TimePerChromaMetaChunkNominal);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_vblank_l_in_us, mode_lib->vba.TimePerMetaChunkVBlank);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_vblank_c_in_us, mode_lib->vba.TimePerChromaMetaChunkVBlank);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_flip_l_in_us, mode_lib->vba.TimePerMetaChunkFlip);
dml_get_pipe_attr_func(refcyc_per_meta_chunk_flip_c_in_us, mode_lib->vba.TimePerChromaMetaChunkFlip);
dml_get_pipe_attr_func(vupdate_offset, mode_lib->vba.VUpdateOffsetPix);
dml_get_pipe_attr_func(vupdate_width, mode_lib->vba.VUpdateWidthPix);
dml_get_pipe_attr_func(vready_offset, mode_lib->vba.VReadyOffsetPix);
unsigned int get_vstartup_calculated( unsigned int get_vstartup_calculated(
struct display_mode_lib *mode_lib, struct display_mode_lib *mode_lib,
...@@ -293,8 +311,10 @@ static void fetch_ip_params(struct display_mode_lib *mode_lib) ...@@ -293,8 +311,10 @@ static void fetch_ip_params(struct display_mode_lib *mode_lib)
mode_lib->vba.MaxPSCLToLBThroughput = ip->max_pscl_lb_bw_pix_per_clk; mode_lib->vba.MaxPSCLToLBThroughput = ip->max_pscl_lb_bw_pix_per_clk;
mode_lib->vba.ROBBufferSizeInKByte = ip->rob_buffer_size_kbytes; mode_lib->vba.ROBBufferSizeInKByte = ip->rob_buffer_size_kbytes;
mode_lib->vba.DETBufferSizeInKByte = ip->det_buffer_size_kbytes; mode_lib->vba.DETBufferSizeInKByte = ip->det_buffer_size_kbytes;
mode_lib->vba.PixelChunkSizeInKByte = ip->pixel_chunk_size_kbytes; mode_lib->vba.PixelChunkSizeInKByte = ip->pixel_chunk_size_kbytes;
mode_lib->vba.MetaChunkSize = ip->meta_chunk_size_kbytes; mode_lib->vba.MetaChunkSize = ip->meta_chunk_size_kbytes;
mode_lib->vba.MinMetaChunkSizeBytes = ip->min_meta_chunk_size_bytes;
mode_lib->vba.WritebackChunkSize = ip->writeback_chunk_size_kbytes; mode_lib->vba.WritebackChunkSize = ip->writeback_chunk_size_kbytes;
mode_lib->vba.LineBufferSize = ip->line_buffer_size_bits; mode_lib->vba.LineBufferSize = ip->line_buffer_size_bits;
mode_lib->vba.MaxLineBufferLines = ip->max_line_buffer_lines; mode_lib->vba.MaxLineBufferLines = ip->max_line_buffer_lines;
...@@ -425,9 +445,7 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib) ...@@ -425,9 +445,7 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib)
/* TODO: Needs to be set based on src->dcc_rate_luma/chroma */ /* TODO: Needs to be set based on src->dcc_rate_luma/chroma */
mode_lib->vba.DCCRateLuma[mode_lib->vba.NumberOfActivePlanes] = src->dcc_rate; mode_lib->vba.DCCRateLuma[mode_lib->vba.NumberOfActivePlanes] = src->dcc_rate;
mode_lib->vba.DCCRateChroma[mode_lib->vba.NumberOfActivePlanes] = src->dcc_rate_chroma; mode_lib->vba.DCCRateChroma[mode_lib->vba.NumberOfActivePlanes] = src->dcc_rate_chroma;
mode_lib->vba.SourcePixelFormat[mode_lib->vba.NumberOfActivePlanes] = (enum source_format_class) (src->source_format);
mode_lib->vba.SourcePixelFormat[mode_lib->vba.NumberOfActivePlanes] =
(enum source_format_class) (src->source_format);
mode_lib->vba.HActive[mode_lib->vba.NumberOfActivePlanes] = dst->hactive; mode_lib->vba.HActive[mode_lib->vba.NumberOfActivePlanes] = dst->hactive;
mode_lib->vba.VActive[mode_lib->vba.NumberOfActivePlanes] = dst->vactive; mode_lib->vba.VActive[mode_lib->vba.NumberOfActivePlanes] = dst->vactive;
mode_lib->vba.SurfaceTiling[mode_lib->vba.NumberOfActivePlanes] = mode_lib->vba.SurfaceTiling[mode_lib->vba.NumberOfActivePlanes] =
...@@ -648,10 +666,12 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib) ...@@ -648,10 +666,12 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib)
// TODO: ODMCombineEnabled => 2 * DPPPerPlane...actually maybe not since all pipes are specified // TODO: ODMCombineEnabled => 2 * DPPPerPlane...actually maybe not since all pipes are specified
// Do we want the dscclk to automatically be halved? Guess not since the value is specified // Do we want the dscclk to automatically be halved? Guess not since the value is specified
mode_lib->vba.SynchronizeTimingsIfSingleRefreshRate = pipes[0].pipe.dest.synchronize_timing_if_single_refresh_rate;
mode_lib->vba.SynchronizedVBlank = pipes[0].pipe.dest.synchronized_vblank_all_planes; mode_lib->vba.SynchronizedVBlank = pipes[0].pipe.dest.synchronized_vblank_all_planes;
for (k = 1; k < mode_lib->vba.cache_num_pipes; ++k) for (k = 1; k < mode_lib->vba.cache_num_pipes; ++k) {
ASSERT(mode_lib->vba.SynchronizeTimingsIfSingleRefreshRate == pipes[k].pipe.dest.synchronize_timing_if_single_refresh_rate);
ASSERT(mode_lib->vba.SynchronizedVBlank == pipes[k].pipe.dest.synchronized_vblank_all_planes); ASSERT(mode_lib->vba.SynchronizedVBlank == pipes[k].pipe.dest.synchronized_vblank_all_planes);
}
mode_lib->vba.GPUVMEnable = false; mode_lib->vba.GPUVMEnable = false;
mode_lib->vba.HostVMEnable = false; mode_lib->vba.HostVMEnable = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment