1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#include "dm_services.h"
26#include "dcn301_hubbub.h"
27#include "reg_helper.h"
28
29#define REG(reg)\
30 hubbub1->regs->reg
31#define DC_LOGGER \
32 hubbub1->base.ctx->logger
33#define CTX \
34 hubbub1->base.ctx
35
36#undef FN
37#define FN(reg_name, field_name) \
38 hubbub1->shifts->field_name, hubbub1->masks->field_name
39
40#define REG(reg)\
41 hubbub1->regs->reg
42
43#define CTX \
44 hubbub1->base.ctx
45
46#undef FN
47#define FN(reg_name, field_name) \
48 hubbub1->shifts->field_name, hubbub1->masks->field_name
49
50
51static const struct hubbub_funcs hubbub301_funcs = {
52 .update_dchub = hubbub2_update_dchub,
53 .init_dchub_sys_ctx = hubbub21_init_dchub,
54 .init_vm_ctx = hubbub2_init_vm_ctx,
55 .dcc_support_swizzle = hubbub3_dcc_support_swizzle,
56 .dcc_support_pixel_format = hubbub2_dcc_support_pixel_format,
57 .get_dcc_compression_cap = hubbub3_get_dcc_compression_cap,
58 .wm_read_state = hubbub21_wm_read_state,
59 .get_dchub_ref_freq = hubbub2_get_dchub_ref_freq,
60 .program_watermarks = hubbub3_program_watermarks,
61 .allow_self_refresh_control = hubbub1_allow_self_refresh_control,
62 .is_allow_self_refresh_enabled = hubbub1_is_allow_self_refresh_enabled,
63 .force_wm_propagate_to_pipes = hubbub3_force_wm_propagate_to_pipes,
64 .force_pstate_change_control = hubbub3_force_pstate_change_control,
65 .hubbub_read_state = hubbub2_read_state,
66};
67
68void hubbub301_construct(struct dcn20_hubbub *hubbub3,
69 struct dc_context *ctx,
70 const struct dcn_hubbub_registers *hubbub_regs,
71 const struct dcn_hubbub_shift *hubbub_shift,
72 const struct dcn_hubbub_mask *hubbub_mask)
73{
74 hubbub3->base.ctx = ctx;
75 hubbub3->base.funcs = &hubbub301_funcs;
76 hubbub3->regs = hubbub_regs;
77 hubbub3->shifts = hubbub_shift;
78 hubbub3->masks = hubbub_mask;
79
80 hubbub3->debug_test_index_pstate = 0xB;
81 hubbub3->detile_buf_size = 184 * 1024;
82}
83