.. | .. |
---|
27 | 27 | |
---|
28 | 28 | #include "dm_services_types.h" |
---|
29 | 29 | |
---|
30 | | -struct abm_backlight_registers { |
---|
31 | | - unsigned int BL_PWM_CNTL; |
---|
32 | | - unsigned int BL_PWM_CNTL2; |
---|
33 | | - unsigned int BL_PWM_PERIOD_CNTL; |
---|
34 | | - unsigned int LVTMA_PWRSEQ_REF_DIV_BL_PWM_REF_DIV; |
---|
35 | | -}; |
---|
36 | | - |
---|
37 | 30 | struct abm { |
---|
38 | 31 | struct dc_context *ctx; |
---|
39 | 32 | const struct abm_funcs *funcs; |
---|
40 | | - |
---|
41 | | - /* registers setting needs to be saved and restored at InitBacklight */ |
---|
42 | | - struct abm_backlight_registers stored_backlight_registers; |
---|
| 33 | + bool dmcu_is_running; |
---|
43 | 34 | }; |
---|
44 | 35 | |
---|
45 | 36 | struct abm_funcs { |
---|
46 | | - void (*abm_init)(struct abm *abm); |
---|
| 37 | + void (*abm_init)(struct abm *abm, uint32_t back_light); |
---|
47 | 38 | bool (*set_abm_level)(struct abm *abm, unsigned int abm_level); |
---|
48 | | - bool (*set_abm_immediate_disable)(struct abm *abm); |
---|
49 | | - bool (*init_backlight)(struct abm *abm); |
---|
50 | | - bool (*set_backlight_level)(struct abm *abm, |
---|
51 | | - unsigned int backlight_level, |
---|
| 39 | + bool (*set_abm_immediate_disable)(struct abm *abm, unsigned int panel_inst); |
---|
| 40 | + bool (*set_pipe)(struct abm *abm, unsigned int controller_id, unsigned int panel_inst); |
---|
| 41 | + |
---|
| 42 | + /* backlight_pwm_u16_16 is unsigned 32 bit, |
---|
| 43 | + * 16 bit integer + 16 fractional, where 1.0 is max backlight value. |
---|
| 44 | + */ |
---|
| 45 | + bool (*set_backlight_level_pwm)(struct abm *abm, |
---|
| 46 | + unsigned int backlight_pwm_u16_16, |
---|
52 | 47 | unsigned int frame_ramp, |
---|
53 | 48 | unsigned int controller_id, |
---|
54 | | - bool use_smooth_brightness); |
---|
55 | | - unsigned int (*get_current_backlight_8_bit)(struct abm *abm); |
---|
| 49 | + unsigned int panel_inst); |
---|
| 50 | + |
---|
| 51 | + unsigned int (*get_current_backlight)(struct abm *abm); |
---|
| 52 | + unsigned int (*get_target_backlight)(struct abm *abm); |
---|
| 53 | + bool (*init_abm_config)(struct abm *abm, |
---|
| 54 | + const char *src, |
---|
| 55 | + unsigned int bytes); |
---|
56 | 56 | }; |
---|
57 | 57 | |
---|
58 | 58 | #endif |
---|