• Home
  • Raw
  • Download

Lines Matching refs:bl

3129 int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,  in drm_edp_backlight_set_level()  argument
3135 if (bl->lsb_reg_used) { in drm_edp_backlight_set_level()
3155 drm_edp_backlight_set_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl, in drm_edp_backlight_set_enable() argument
3162 if (!bl->aux_enable) in drm_edp_backlight_set_enable()
3204 int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl, in drm_edp_backlight_enable() argument
3210 if (bl->pwmgen_bit_count) { in drm_edp_backlight_enable()
3211 ret = drm_dp_dpcd_writeb(aux, DP_EDP_PWMGEN_BIT_COUNT, bl->pwmgen_bit_count); in drm_edp_backlight_enable()
3217 if (bl->pwm_freq_pre_divider) { in drm_edp_backlight_enable()
3218 ret = drm_dp_dpcd_writeb(aux, DP_EDP_BACKLIGHT_FREQ_SET, bl->pwm_freq_pre_divider); in drm_edp_backlight_enable()
3234 ret = drm_edp_backlight_set_level(aux, bl, level); in drm_edp_backlight_enable()
3237 ret = drm_edp_backlight_set_enable(aux, bl, true); in drm_edp_backlight_enable()
3259 int drm_edp_backlight_disable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl) in drm_edp_backlight_disable() argument
3263 ret = drm_edp_backlight_set_enable(aux, bl, false); in drm_edp_backlight_disable()
3272 drm_edp_backlight_probe_max(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl, in drm_edp_backlight_probe_max() argument
3287 bl->max = (1 << pn) - 1; in drm_edp_backlight_probe_max()
3351 bl->pwmgen_bit_count = pn; in drm_edp_backlight_probe_max()
3352 bl->max = (1 << pn) - 1; in drm_edp_backlight_probe_max()
3355 bl->pwm_freq_pre_divider = f; in drm_edp_backlight_probe_max()
3364 drm_edp_backlight_probe_level(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl, in drm_edp_backlight_probe_level() argument
3380 int size = 1 + bl->lsb_reg_used; in drm_edp_backlight_probe_level()
3389 if (bl->lsb_reg_used) in drm_edp_backlight_probe_level()
3399 return bl->max; in drm_edp_backlight_probe_level()
3421 drm_edp_backlight_init(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl, in drm_edp_backlight_init() argument
3428 bl->aux_enable = true; in drm_edp_backlight_init()
3430 bl->lsb_reg_used = true; in drm_edp_backlight_init()
3432 ret = drm_edp_backlight_probe_max(aux, bl, driver_pwm_freq_hz, edp_dpcd); in drm_edp_backlight_init()
3436 ret = drm_edp_backlight_probe_level(aux, bl, current_mode); in drm_edp_backlight_init()
3443 aux->name, *current_level, bl->max, bl->pwm_freq_pre_divider, *current_mode); in drm_edp_backlight_init()
3446 aux->name, bl->pwmgen_bit_count, bl->lsb_reg_used, bl->aux_enable); in drm_edp_backlight_init()
3456 struct dp_aux_backlight *bl = bl_get_data(bd); in dp_aux_backlight_update_status() local
3461 if (!bl->enabled) { in dp_aux_backlight_update_status()
3462 drm_edp_backlight_enable(bl->aux, &bl->info, brightness); in dp_aux_backlight_update_status()
3463 bl->enabled = true; in dp_aux_backlight_update_status()
3466 ret = drm_edp_backlight_set_level(bl->aux, &bl->info, brightness); in dp_aux_backlight_update_status()
3468 if (bl->enabled) { in dp_aux_backlight_update_status()
3469 drm_edp_backlight_disable(bl->aux, &bl->info); in dp_aux_backlight_update_status()
3470 bl->enabled = false; in dp_aux_backlight_update_status()
3507 struct dp_aux_backlight *bl; in drm_panel_dp_aux_backlight() local
3527 bl = devm_kzalloc(panel->dev, sizeof(*bl), GFP_KERNEL); in drm_panel_dp_aux_backlight()
3528 if (!bl) in drm_panel_dp_aux_backlight()
3531 bl->aux = aux; in drm_panel_dp_aux_backlight()
3533 ret = drm_edp_backlight_init(aux, &bl->info, 0, edp_dpcd, in drm_panel_dp_aux_backlight()
3540 props.max_brightness = bl->info.max; in drm_panel_dp_aux_backlight()
3542 bl->base = devm_backlight_device_register(panel->dev, "dp_aux_backlight", in drm_panel_dp_aux_backlight()
3543 panel->dev, bl, in drm_panel_dp_aux_backlight()
3545 if (IS_ERR(bl->base)) in drm_panel_dp_aux_backlight()
3546 return PTR_ERR(bl->base); in drm_panel_dp_aux_backlight()
3548 backlight_disable(bl->base); in drm_panel_dp_aux_backlight()
3550 panel->backlight = bl->base; in drm_panel_dp_aux_backlight()