Lines Matching full:panel

65 	struct intel_panel *panel = &connector->panel;  in clamp_user_to_hw()  local
68 hw_level = scale(user_level, 0, user_max, 0, panel->backlight.max); in clamp_user_to_hw()
69 hw_level = clamp(hw_level, panel->backlight.min, panel->backlight.max); in clamp_user_to_hw()
78 struct intel_panel *panel = &connector->panel; in scale_hw_to_user() local
80 return scale(hw_level, panel->backlight.min, panel->backlight.max, in scale_hw_to_user()
87 struct intel_panel *panel = &connector->panel; in intel_backlight_invert_pwm_level() local
89 drm_WARN_ON(&i915->drm, panel->backlight.pwm_level_max == 0); in intel_backlight_invert_pwm_level()
96 return panel->backlight.pwm_level_max - val + panel->backlight.pwm_level_min; in intel_backlight_invert_pwm_level()
106 struct intel_panel *panel = &connector->panel; in intel_backlight_set_pwm_level() local
110 panel->backlight.pwm_funcs->set(conn_state, val); in intel_backlight_set_pwm_level()
116 struct intel_panel *panel = &connector->panel; in intel_backlight_level_to_pwm() local
119 panel->backlight.max == 0 || panel->backlight.pwm_level_max == 0); in intel_backlight_level_to_pwm()
121 val = scale(val, panel->backlight.min, panel->backlight.max, in intel_backlight_level_to_pwm()
122 panel->backlight.pwm_level_min, panel->backlight.pwm_level_max); in intel_backlight_level_to_pwm()
130 struct intel_panel *panel = &connector->panel; in intel_backlight_level_from_pwm() local
133 panel->backlight.max == 0 || panel->backlight.pwm_level_max == 0); in intel_backlight_level_from_pwm()
137 val = panel->backlight.pwm_level_max - (val - panel->backlight.pwm_level_min); in intel_backlight_level_from_pwm()
139 return scale(val, panel->backlight.pwm_level_min, panel->backlight.pwm_level_max, in intel_backlight_level_from_pwm()
140 panel->backlight.min, panel->backlight.max); in intel_backlight_level_from_pwm()
160 struct intel_panel *panel = &connector->panel; in i9xx_get_backlight() local
167 if (panel->backlight.combination_mode) { in i9xx_get_backlight()
190 struct intel_panel *panel = &connector->panel; in bxt_get_backlight() local
192 return intel_de_read(i915, BXT_BLC_PWM_DUTY(panel->backlight.controller)); in bxt_get_backlight()
197 struct intel_panel *panel = &connector->panel; in ext_pwm_get_backlight() local
200 pwm_get_state(panel->backlight.pwm, &state); in ext_pwm_get_backlight()
228 struct intel_panel *panel = &connector->panel; in i9xx_set_backlight() local
231 drm_WARN_ON(&i915->drm, panel->backlight.pwm_level_max == 0); in i9xx_set_backlight()
233 if (panel->backlight.combination_mode) { in i9xx_set_backlight()
236 lbpc = level * 0xfe / panel->backlight.pwm_level_max + 1; in i9xx_set_backlight()
267 struct intel_panel *panel = &connector->panel; in bxt_set_backlight() local
269 intel_de_write(i915, BXT_BLC_PWM_DUTY(panel->backlight.controller), level); in bxt_set_backlight()
274 struct intel_panel *panel = &to_intel_connector(conn_state->connector)->panel; in ext_pwm_set_backlight() local
276 pwm_set_relative_duty_cycle(&panel->backlight.pwm_state, level, 100); in ext_pwm_set_backlight()
277 pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state); in ext_pwm_set_backlight()
285 struct intel_panel *panel = &connector->panel; in intel_panel_actually_set_backlight() local
290 panel->backlight.funcs->set(conn_state, level); in intel_panel_actually_set_backlight()
301 struct intel_panel *panel = &connector->panel; in intel_backlight_set_acpi() local
310 if (!panel->backlight.present || !conn_state->crtc) in intel_backlight_set_acpi()
315 drm_WARN_ON(&i915->drm, panel->backlight.max == 0); in intel_backlight_set_acpi()
318 panel->backlight.level = hw_level; in intel_backlight_set_acpi()
320 if (panel->backlight.device) in intel_backlight_set_acpi()
321 panel->backlight.device->props.brightness = in intel_backlight_set_acpi()
323 panel->backlight.level, in intel_backlight_set_acpi()
324 panel->backlight.device->props.max_brightness); in intel_backlight_set_acpi()
326 if (panel->backlight.enabled) in intel_backlight_set_acpi()
399 struct intel_panel *panel = &connector->panel; in bxt_disable_backlight() local
403 intel_de_rmw(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in bxt_disable_backlight()
406 if (panel->backlight.controller == 1) in bxt_disable_backlight()
414 struct intel_panel *panel = &connector->panel; in cnp_disable_backlight() local
418 intel_de_rmw(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in cnp_disable_backlight()
425 struct intel_panel *panel = &connector->panel; in ext_pwm_disable_backlight() local
429 panel->backlight.pwm_state.enabled = false; in ext_pwm_disable_backlight()
430 pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state); in ext_pwm_disable_backlight()
437 struct intel_panel *panel = &connector->panel; in intel_backlight_disable() local
439 if (!panel->backlight.present) in intel_backlight_disable()
456 if (panel->backlight.device) in intel_backlight_disable()
457 panel->backlight.device->props.power = FB_BLANK_POWERDOWN; in intel_backlight_disable()
458 panel->backlight.enabled = false; in intel_backlight_disable()
459 panel->backlight.funcs->disable(old_conn_state, 0); in intel_backlight_disable()
469 struct intel_panel *panel = &connector->panel; in lpt_enable_backlight() local
482 panel->backlight.alternate_pwm_increment ? in lpt_enable_backlight()
486 panel->backlight.alternate_pwm_increment ? in lpt_enable_backlight()
489 pch_ctl2 = panel->backlight.pwm_level_max << 16; in lpt_enable_backlight()
493 if (panel->backlight.active_low_pwm) in lpt_enable_backlight()
513 struct intel_panel *panel = &connector->panel; in pch_enable_backlight() local
544 pch_ctl2 = panel->backlight.pwm_level_max << 16; in pch_enable_backlight()
548 if (panel->backlight.active_low_pwm) in pch_enable_backlight()
561 struct intel_panel *panel = &connector->panel; in i9xx_enable_backlight() local
571 freq = panel->backlight.pwm_level_max; in i9xx_enable_backlight()
572 if (panel->backlight.combination_mode) in i9xx_enable_backlight()
576 if (panel->backlight.combination_mode) in i9xx_enable_backlight()
578 if (IS_PINEVIEW(i915) && panel->backlight.active_low_pwm) in i9xx_enable_backlight()
601 struct intel_panel *panel = &connector->panel; in i965_enable_backlight() local
613 freq = panel->backlight.pwm_level_max; in i965_enable_backlight()
614 if (panel->backlight.combination_mode) in i965_enable_backlight()
621 if (panel->backlight.combination_mode) in i965_enable_backlight()
623 if (panel->backlight.active_low_pwm) in i965_enable_backlight()
637 struct intel_panel *panel = &connector->panel; in vlv_enable_backlight() local
649 ctl = panel->backlight.pwm_level_max << 16; in vlv_enable_backlight()
656 if (panel->backlight.active_low_pwm) in vlv_enable_backlight()
668 struct intel_panel *panel = &connector->panel; in bxt_enable_backlight() local
673 if (panel->backlight.controller == 1) { in bxt_enable_backlight()
683 if (panel->backlight.util_pin_active_low) in bxt_enable_backlight()
689 pwm_ctl = intel_de_read(i915, BXT_BLC_PWM_CTL(panel->backlight.controller)); in bxt_enable_backlight()
694 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in bxt_enable_backlight()
698 intel_de_write(i915, BXT_BLC_PWM_FREQ(panel->backlight.controller), in bxt_enable_backlight()
699 panel->backlight.pwm_level_max); in bxt_enable_backlight()
704 if (panel->backlight.active_low_pwm) in bxt_enable_backlight()
707 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), pwm_ctl); in bxt_enable_backlight()
708 intel_de_posting_read(i915, BXT_BLC_PWM_CTL(panel->backlight.controller)); in bxt_enable_backlight()
709 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in bxt_enable_backlight()
718 struct intel_panel *panel = &connector->panel; in cnp_enable_backlight() local
721 pwm_ctl = intel_de_read(i915, BXT_BLC_PWM_CTL(panel->backlight.controller)); in cnp_enable_backlight()
725 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in cnp_enable_backlight()
729 intel_de_write(i915, BXT_BLC_PWM_FREQ(panel->backlight.controller), in cnp_enable_backlight()
730 panel->backlight.pwm_level_max); in cnp_enable_backlight()
735 if (panel->backlight.active_low_pwm) in cnp_enable_backlight()
738 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), pwm_ctl); in cnp_enable_backlight()
739 intel_de_posting_read(i915, BXT_BLC_PWM_CTL(panel->backlight.controller)); in cnp_enable_backlight()
740 intel_de_write(i915, BXT_BLC_PWM_CTL(panel->backlight.controller), in cnp_enable_backlight()
748 struct intel_panel *panel = &connector->panel; in ext_pwm_enable_backlight() local
750 pwm_set_relative_duty_cycle(&panel->backlight.pwm_state, level, 100); in ext_pwm_enable_backlight()
751 panel->backlight.pwm_state.enabled = true; in ext_pwm_enable_backlight()
752 pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state); in ext_pwm_enable_backlight()
759 struct intel_panel *panel = &connector->panel; in __intel_backlight_enable() local
761 WARN_ON(panel->backlight.max == 0); in __intel_backlight_enable()
763 if (panel->backlight.level <= panel->backlight.min) { in __intel_backlight_enable()
764 panel->backlight.level = panel->backlight.max; in __intel_backlight_enable()
765 if (panel->backlight.device) in __intel_backlight_enable()
766 panel->backlight.device->props.brightness = in __intel_backlight_enable()
768 panel->backlight.level, in __intel_backlight_enable()
769 panel->backlight.device->props.max_brightness); in __intel_backlight_enable()
772 panel->backlight.funcs->enable(crtc_state, conn_state, panel->backlight.level); in __intel_backlight_enable()
773 panel->backlight.enabled = true; in __intel_backlight_enable()
774 if (panel->backlight.device) in __intel_backlight_enable()
775 panel->backlight.device->props.power = FB_BLANK_UNBLANK; in __intel_backlight_enable()
783 struct intel_panel *panel = &connector->panel; in intel_backlight_enable() local
786 if (!panel->backlight.present) in intel_backlight_enable()
802 struct intel_panel *panel = &connector->panel; in intel_panel_get_backlight() local
807 if (panel->backlight.enabled) in intel_panel_get_backlight()
808 val = panel->backlight.funcs->get(connector, intel_connector_get_pipe(connector)); in intel_panel_get_backlight()
820 struct intel_panel *panel = &connector->panel; in scale_user_to_hw() local
823 panel->backlight.min, panel->backlight.max); in scale_user_to_hw()
832 struct intel_panel *panel = &connector->panel; in intel_panel_set_backlight() local
835 if (!panel->backlight.present) in intel_panel_set_backlight()
840 drm_WARN_ON(&i915->drm, panel->backlight.max == 0); in intel_panel_set_backlight()
843 panel->backlight.level = hw_level; in intel_panel_set_backlight()
845 if (panel->backlight.enabled) in intel_panel_set_backlight()
855 struct intel_panel *panel = &connector->panel; in intel_backlight_device_update_status() local
870 if (panel->backlight.enabled) { in intel_backlight_device_update_status()
871 if (panel->backlight.power) { in intel_backlight_device_update_status()
874 panel->backlight.power(connector, enable); in intel_backlight_device_update_status()
915 struct intel_panel *panel = &connector->panel; in intel_backlight_device_register() local
921 if (WARN_ON(panel->backlight.device)) in intel_backlight_device_register()
924 if (!panel->backlight.present) in intel_backlight_device_register()
927 WARN_ON(panel->backlight.max == 0); in intel_backlight_device_register()
941 props.max_brightness = panel->backlight.max; in intel_backlight_device_register()
943 panel->backlight.level, in intel_backlight_device_register()
946 if (panel->backlight.enabled) in intel_backlight_device_register()
982 panel->backlight.device = bd; in intel_backlight_device_register()
996 struct intel_panel *panel = &connector->panel; in intel_backlight_device_unregister() local
998 if (panel->backlight.device) { in intel_backlight_device_unregister()
999 backlight_device_unregister(panel->backlight.device); in intel_backlight_device_unregister()
1000 panel->backlight.device = NULL; in intel_backlight_device_unregister()
1032 struct intel_panel *panel = &connector->panel; in spt_hz_to_pwm() local
1035 if (panel->backlight.alternate_pwm_increment) in spt_hz_to_pwm()
1051 struct intel_panel *panel = &connector->panel; in lpt_hz_to_pwm() local
1054 if (panel->backlight.alternate_pwm_increment) in lpt_hz_to_pwm()
1145 u16 pwm_freq_hz = connector->panel.vbt.backlight.pwm_freq_hz; in get_vbt_pwm_freq()
1164 struct intel_panel *panel = &connector->panel; in get_backlight_max_vbt() local
1168 if (!panel->backlight.pwm_funcs->hz_to_pwm) { in get_backlight_max_vbt()
1174 pwm = panel->backlight.pwm_funcs->hz_to_pwm(connector, pwm_freq_hz); in get_backlight_max_vbt()
1190 struct intel_panel *panel = &connector->panel; in get_backlight_min_vbt() local
1193 drm_WARN_ON(&i915->drm, panel->backlight.pwm_level_max == 0); in get_backlight_min_vbt()
1202 min = clamp_t(int, connector->panel.vbt.backlight.min_brightness, 0, 64); in get_backlight_min_vbt()
1203 if (min != connector->panel.vbt.backlight.min_brightness) { in get_backlight_min_vbt()
1206 connector->panel.vbt.backlight.min_brightness, min); in get_backlight_min_vbt()
1210 return scale(min, 0, 255, 0, panel->backlight.pwm_level_max); in get_backlight_min_vbt()
1216 struct intel_panel *panel = &connector->panel; in lpt_setup_backlight() local
1224 panel->backlight.alternate_pwm_increment = alt; in lpt_setup_backlight()
1227 panel->backlight.active_low_pwm = pch_ctl1 & BLM_PCH_POLARITY; in lpt_setup_backlight()
1230 panel->backlight.pwm_level_max = pch_ctl2 >> 16; in lpt_setup_backlight()
1234 if (!panel->backlight.pwm_level_max) in lpt_setup_backlight()
1235 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in lpt_setup_backlight()
1237 if (!panel->backlight.pwm_level_max) in lpt_setup_backlight()
1240 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in lpt_setup_backlight()
1242 panel->backlight.pwm_enabled = pch_ctl1 & BLM_PCH_PWM_ENABLE; in lpt_setup_backlight()
1244 cpu_mode = panel->backlight.pwm_enabled && HAS_PCH_LPT(i915) && in lpt_setup_backlight()
1273 struct intel_panel *panel = &connector->panel; in pch_setup_backlight() local
1277 panel->backlight.active_low_pwm = pch_ctl1 & BLM_PCH_POLARITY; in pch_setup_backlight()
1280 panel->backlight.pwm_level_max = pch_ctl2 >> 16; in pch_setup_backlight()
1282 if (!panel->backlight.pwm_level_max) in pch_setup_backlight()
1283 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in pch_setup_backlight()
1285 if (!panel->backlight.pwm_level_max) in pch_setup_backlight()
1288 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in pch_setup_backlight()
1291 panel->backlight.pwm_enabled = (cpu_ctl2 & BLM_PWM_ENABLE) && in pch_setup_backlight()
1304 struct intel_panel *panel = &connector->panel; in i9xx_setup_backlight() local
1310 panel->backlight.combination_mode = ctl & BLM_LEGACY_MODE; in i9xx_setup_backlight()
1313 panel->backlight.active_low_pwm = ctl & BLM_POLARITY_PNV; in i9xx_setup_backlight()
1315 panel->backlight.pwm_level_max = ctl >> 17; in i9xx_setup_backlight()
1317 if (!panel->backlight.pwm_level_max) { in i9xx_setup_backlight()
1318 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in i9xx_setup_backlight()
1319 panel->backlight.pwm_level_max >>= 1; in i9xx_setup_backlight()
1322 if (!panel->backlight.pwm_level_max) in i9xx_setup_backlight()
1325 if (panel->backlight.combination_mode) in i9xx_setup_backlight()
1326 panel->backlight.pwm_level_max *= 0xff; in i9xx_setup_backlight()
1328 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in i9xx_setup_backlight()
1332 val = clamp(val, panel->backlight.pwm_level_min, panel->backlight.pwm_level_max); in i9xx_setup_backlight()
1334 panel->backlight.pwm_enabled = val != 0; in i9xx_setup_backlight()
1346 struct intel_panel *panel = &connector->panel; in i965_setup_backlight() local
1350 panel->backlight.combination_mode = ctl2 & BLM_COMBINATION_MODE; in i965_setup_backlight()
1351 panel->backlight.active_low_pwm = ctl2 & BLM_POLARITY_I965; in i965_setup_backlight()
1354 panel->backlight.pwm_level_max = ctl >> 16; in i965_setup_backlight()
1356 if (!panel->backlight.pwm_level_max) in i965_setup_backlight()
1357 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in i965_setup_backlight()
1359 if (!panel->backlight.pwm_level_max) in i965_setup_backlight()
1362 if (panel->backlight.combination_mode) in i965_setup_backlight()
1363 panel->backlight.pwm_level_max *= 0xff; in i965_setup_backlight()
1365 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in i965_setup_backlight()
1367 panel->backlight.pwm_enabled = ctl2 & BLM_PWM_ENABLE; in i965_setup_backlight()
1379 struct intel_panel *panel = &connector->panel; in vlv_setup_backlight() local
1386 panel->backlight.active_low_pwm = ctl2 & BLM_POLARITY_I965; in vlv_setup_backlight()
1389 panel->backlight.pwm_level_max = ctl >> 16; in vlv_setup_backlight()
1391 if (!panel->backlight.pwm_level_max) in vlv_setup_backlight()
1392 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in vlv_setup_backlight()
1394 if (!panel->backlight.pwm_level_max) in vlv_setup_backlight()
1397 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in vlv_setup_backlight()
1399 panel->backlight.pwm_enabled = ctl2 & BLM_PWM_ENABLE; in vlv_setup_backlight()
1412 struct intel_panel *panel = &connector->panel; in bxt_setup_backlight() local
1415 panel->backlight.controller = connector->panel.vbt.backlight.controller; in bxt_setup_backlight()
1418 BXT_BLC_PWM_CTL(panel->backlight.controller)); in bxt_setup_backlight()
1421 if (panel->backlight.controller == 1) { in bxt_setup_backlight()
1423 panel->backlight.util_pin_active_low = in bxt_setup_backlight()
1427 panel->backlight.active_low_pwm = pwm_ctl & BXT_BLC_PWM_POLARITY; in bxt_setup_backlight()
1428 panel->backlight.pwm_level_max = in bxt_setup_backlight()
1429 intel_de_read(i915, BXT_BLC_PWM_FREQ(panel->backlight.controller)); in bxt_setup_backlight()
1431 if (!panel->backlight.pwm_level_max) in bxt_setup_backlight()
1432 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in bxt_setup_backlight()
1434 if (!panel->backlight.pwm_level_max) in bxt_setup_backlight()
1437 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in bxt_setup_backlight()
1439 panel->backlight.pwm_enabled = pwm_ctl & BXT_BLC_PWM_ENABLE; in bxt_setup_backlight()
1444 panel->backlight.controller); in bxt_setup_backlight()
1477 struct intel_panel *panel = &connector->panel; in cnp_setup_backlight() local
1484 panel->backlight.controller = connector->panel.vbt.backlight.controller; in cnp_setup_backlight()
1485 if (!cnp_backlight_controller_is_valid(i915, panel->backlight.controller)) { in cnp_setup_backlight()
1488 panel->backlight.controller); in cnp_setup_backlight()
1489 panel->backlight.controller = 0; in cnp_setup_backlight()
1493 BXT_BLC_PWM_CTL(panel->backlight.controller)); in cnp_setup_backlight()
1495 panel->backlight.active_low_pwm = pwm_ctl & BXT_BLC_PWM_POLARITY; in cnp_setup_backlight()
1496 panel->backlight.pwm_level_max = in cnp_setup_backlight()
1497 intel_de_read(i915, BXT_BLC_PWM_FREQ(panel->backlight.controller)); in cnp_setup_backlight()
1499 if (!panel->backlight.pwm_level_max) in cnp_setup_backlight()
1500 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in cnp_setup_backlight()
1502 if (!panel->backlight.pwm_level_max) in cnp_setup_backlight()
1505 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in cnp_setup_backlight()
1507 panel->backlight.pwm_enabled = pwm_ctl & BXT_BLC_PWM_ENABLE; in cnp_setup_backlight()
1512 panel->backlight.controller); in cnp_setup_backlight()
1521 struct intel_panel *panel = &connector->panel; in ext_pwm_setup_backlight() local
1526 if (connector->panel.vbt.dsi.config->pwm_blc == PPS_BLC_PMIC) { in ext_pwm_setup_backlight()
1527 panel->backlight.pwm = pwm_get(i915->drm.dev, "pwm_pmic_backlight"); in ext_pwm_setup_backlight()
1530 panel->backlight.pwm = pwm_get(i915->drm.dev, "pwm_soc_backlight"); in ext_pwm_setup_backlight()
1534 if (IS_ERR(panel->backlight.pwm)) { in ext_pwm_setup_backlight()
1537 panel->backlight.pwm = NULL; in ext_pwm_setup_backlight()
1541 panel->backlight.pwm_level_max = 100; /* 100% */ in ext_pwm_setup_backlight()
1542 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in ext_pwm_setup_backlight()
1544 if (pwm_is_enabled(panel->backlight.pwm)) { in ext_pwm_setup_backlight()
1546 pwm_get_state(panel->backlight.pwm, &panel->backlight.pwm_state); in ext_pwm_setup_backlight()
1548 level = pwm_get_relative_duty_cycle(&panel->backlight.pwm_state, in ext_pwm_setup_backlight()
1551 panel->backlight.pwm_enabled = true; in ext_pwm_setup_backlight()
1555 NSEC_PER_SEC / (unsigned long)panel->backlight.pwm_state.period, in ext_pwm_setup_backlight()
1559 panel->backlight.pwm_state.period = in ext_pwm_setup_backlight()
1573 struct intel_panel *panel = &connector->panel; in intel_pwm_set_backlight() local
1575 panel->backlight.pwm_funcs->set(conn_state, in intel_pwm_set_backlight()
1581 struct intel_panel *panel = &connector->panel; in intel_pwm_get_backlight() local
1584 panel->backlight.pwm_funcs->get(connector, pipe)); in intel_pwm_get_backlight()
1591 struct intel_panel *panel = &connector->panel; in intel_pwm_enable_backlight() local
1593 panel->backlight.pwm_funcs->enable(crtc_state, conn_state, in intel_pwm_enable_backlight()
1600 struct intel_panel *panel = &connector->panel; in intel_pwm_disable_backlight() local
1602 panel->backlight.pwm_funcs->disable(conn_state, in intel_pwm_disable_backlight()
1608 struct intel_panel *panel = &connector->panel; in intel_pwm_setup_backlight() local
1611 ret = panel->backlight.pwm_funcs->setup(connector, pipe); in intel_pwm_setup_backlight()
1615 panel->backlight.min = panel->backlight.pwm_level_min; in intel_pwm_setup_backlight()
1616 panel->backlight.max = panel->backlight.pwm_level_max; in intel_pwm_setup_backlight()
1617 panel->backlight.level = intel_pwm_get_backlight(connector, pipe); in intel_pwm_setup_backlight()
1618 panel->backlight.enabled = panel->backlight.pwm_enabled; in intel_pwm_setup_backlight()
1630 struct intel_panel *panel = &connector->panel; in intel_backlight_update() local
1632 if (!panel->backlight.present) in intel_backlight_update()
1636 if (!panel->backlight.enabled) in intel_backlight_update()
1645 struct intel_panel *panel = &connector->panel; in intel_backlight_setup() local
1648 if (!connector->panel.vbt.backlight.present) { in intel_backlight_setup()
1662 if (drm_WARN_ON(&i915->drm, !panel->backlight.funcs)) in intel_backlight_setup()
1665 /* set level and max in panel struct */ in intel_backlight_setup()
1667 ret = panel->backlight.funcs->setup(connector, pipe); in intel_backlight_setup()
1677 panel->backlight.present = true; in intel_backlight_setup()
1682 str_enabled_disabled(panel->backlight.enabled), in intel_backlight_setup()
1683 panel->backlight.level, panel->backlight.max); in intel_backlight_setup()
1688 void intel_backlight_destroy(struct intel_panel *panel) in intel_backlight_destroy() argument
1691 if (panel->backlight.pwm) in intel_backlight_destroy()
1692 pwm_put(panel->backlight.pwm); in intel_backlight_destroy()
1694 panel->backlight.present = false; in intel_backlight_destroy()
1786 void intel_backlight_init_funcs(struct intel_panel *panel) in intel_backlight_init_funcs() argument
1789 container_of(panel, struct intel_connector, panel); in intel_backlight_init_funcs()
1797 panel->backlight.pwm_funcs = &bxt_pwm_funcs; in intel_backlight_init_funcs()
1799 panel->backlight.pwm_funcs = &cnp_pwm_funcs; in intel_backlight_init_funcs()
1802 panel->backlight.pwm_funcs = &lpt_pwm_funcs; in intel_backlight_init_funcs()
1804 panel->backlight.pwm_funcs = &spt_pwm_funcs; in intel_backlight_init_funcs()
1806 panel->backlight.pwm_funcs = &pch_pwm_funcs; in intel_backlight_init_funcs()
1809 panel->backlight.pwm_funcs = &ext_pwm_funcs; in intel_backlight_init_funcs()
1811 panel->backlight.pwm_funcs = &vlv_pwm_funcs; in intel_backlight_init_funcs()
1814 panel->backlight.pwm_funcs = &i965_pwm_funcs; in intel_backlight_init_funcs()
1816 panel->backlight.pwm_funcs = &i9xx_pwm_funcs; in intel_backlight_init_funcs()
1824 connector->panel.backlight.power = intel_pps_backlight_power; in intel_backlight_init_funcs()
1828 panel->backlight.funcs = &pwm_bl_funcs; in intel_backlight_init_funcs()