forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/amd/display/dc/inc/hw/abm.h
....@@ -27,32 +27,32 @@
2727
2828 #include "dm_services_types.h"
2929
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
-
3730 struct abm {
3831 struct dc_context *ctx;
3932 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;
4334 };
4435
4536 struct abm_funcs {
46
- void (*abm_init)(struct abm *abm);
37
+ void (*abm_init)(struct abm *abm, uint32_t back_light);
4738 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,
5247 unsigned int frame_ramp,
5348 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);
5656 };
5757
5858 #endif