0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "dm_services.h"
0026 #include "dcn301_hubbub.h"
0027 #include "reg_helper.h"
0028
0029 #define REG(reg)\
0030 hubbub1->regs->reg
0031 #define DC_LOGGER \
0032 hubbub1->base.ctx->logger
0033 #define CTX \
0034 hubbub1->base.ctx
0035
0036 #undef FN
0037 #define FN(reg_name, field_name) \
0038 hubbub1->shifts->field_name, hubbub1->masks->field_name
0039
0040 #define REG(reg)\
0041 hubbub1->regs->reg
0042
0043 #define CTX \
0044 hubbub1->base.ctx
0045
0046 #undef FN
0047 #define FN(reg_name, field_name) \
0048 hubbub1->shifts->field_name, hubbub1->masks->field_name
0049
0050
0051 static const struct hubbub_funcs hubbub301_funcs = {
0052 .update_dchub = hubbub2_update_dchub,
0053 .init_dchub_sys_ctx = hubbub21_init_dchub,
0054 .init_vm_ctx = hubbub2_init_vm_ctx,
0055 .dcc_support_swizzle = hubbub3_dcc_support_swizzle,
0056 .dcc_support_pixel_format = hubbub2_dcc_support_pixel_format,
0057 .get_dcc_compression_cap = hubbub3_get_dcc_compression_cap,
0058 .wm_read_state = hubbub21_wm_read_state,
0059 .get_dchub_ref_freq = hubbub2_get_dchub_ref_freq,
0060 .program_watermarks = hubbub3_program_watermarks,
0061 .allow_self_refresh_control = hubbub1_allow_self_refresh_control,
0062 .is_allow_self_refresh_enabled = hubbub1_is_allow_self_refresh_enabled,
0063 .verify_allow_pstate_change_high = hubbub1_verify_allow_pstate_change_high,
0064 .force_wm_propagate_to_pipes = hubbub3_force_wm_propagate_to_pipes,
0065 .force_pstate_change_control = hubbub3_force_pstate_change_control,
0066 .hubbub_read_state = hubbub2_read_state,
0067 };
0068
0069 void hubbub301_construct(struct dcn20_hubbub *hubbub3,
0070 struct dc_context *ctx,
0071 const struct dcn_hubbub_registers *hubbub_regs,
0072 const struct dcn_hubbub_shift *hubbub_shift,
0073 const struct dcn_hubbub_mask *hubbub_mask)
0074 {
0075 hubbub3->base.ctx = ctx;
0076 hubbub3->base.funcs = &hubbub301_funcs;
0077 hubbub3->regs = hubbub_regs;
0078 hubbub3->shifts = hubbub_shift;
0079 hubbub3->masks = hubbub_mask;
0080
0081 hubbub3->debug_test_index_pstate = 0xB;
0082 hubbub3->detile_buf_size = 184 * 1024;
0083 }