Lines Matching refs:connector

53 static u32 clamp_user_to_hw(struct intel_connector *connector,  in clamp_user_to_hw()  argument
56 struct intel_panel *panel = &connector->panel; in clamp_user_to_hw()
66 static u32 scale_hw_to_user(struct intel_connector *connector, in scale_hw_to_user() argument
69 struct intel_panel *panel = &connector->panel; in scale_hw_to_user()
75 u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 val) in intel_backlight_invert_pwm_level() argument
77 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_invert_pwm_level()
78 struct intel_panel *panel = &connector->panel; in intel_backlight_invert_pwm_level()
95 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_backlight_set_pwm_level() local
96 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_backlight_set_pwm_level()
97 struct intel_panel *panel = &connector->panel; in intel_backlight_set_pwm_level()
103 u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 val) in intel_backlight_level_to_pwm() argument
105 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_level_to_pwm()
106 struct intel_panel *panel = &connector->panel; in intel_backlight_level_to_pwm()
114 return intel_backlight_invert_pwm_level(connector, val); in intel_backlight_level_to_pwm()
117 u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val) in intel_backlight_level_from_pwm() argument
119 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_level_from_pwm()
120 struct intel_panel *panel = &connector->panel; in intel_backlight_level_from_pwm()
133 static u32 lpt_get_backlight(struct intel_connector *connector, enum pipe unused) in lpt_get_backlight() argument
135 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_get_backlight()
140 static u32 pch_get_backlight(struct intel_connector *connector, enum pipe unused) in pch_get_backlight() argument
142 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_get_backlight()
147 static u32 i9xx_get_backlight(struct intel_connector *connector, enum pipe unused) in i9xx_get_backlight() argument
149 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i9xx_get_backlight()
150 struct intel_panel *panel = &connector->panel; in i9xx_get_backlight()
167 static u32 vlv_get_backlight(struct intel_connector *connector, enum pipe pipe) in vlv_get_backlight() argument
169 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_get_backlight()
177 static u32 bxt_get_backlight(struct intel_connector *connector, enum pipe unused) in bxt_get_backlight() argument
179 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in bxt_get_backlight()
180 struct intel_panel *panel = &connector->panel; in bxt_get_backlight()
186 static u32 ext_pwm_get_backlight(struct intel_connector *connector, enum pipe unused) in ext_pwm_get_backlight() argument
188 struct intel_panel *panel = &connector->panel; in ext_pwm_get_backlight()
197 struct intel_connector *connector = to_intel_connector(conn_state->connector); in lpt_set_backlight() local
198 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_set_backlight()
206 struct intel_connector *connector = to_intel_connector(conn_state->connector); in pch_set_backlight() local
207 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_set_backlight()
216 struct intel_connector *connector = to_intel_connector(conn_state->connector); in i9xx_set_backlight() local
217 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i9xx_set_backlight()
218 struct intel_panel *panel = &connector->panel; in i9xx_set_backlight()
244 struct intel_connector *connector = to_intel_connector(conn_state->connector); in vlv_set_backlight() local
245 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_set_backlight()
255 struct intel_connector *connector = to_intel_connector(conn_state->connector); in bxt_set_backlight() local
256 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in bxt_set_backlight()
257 struct intel_panel *panel = &connector->panel; in bxt_set_backlight()
265 struct intel_panel *panel = &to_intel_connector(conn_state->connector)->panel; in ext_pwm_set_backlight()
274 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_panel_actually_set_backlight() local
275 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_actually_set_backlight()
276 struct intel_panel *panel = &connector->panel; in intel_panel_actually_set_backlight()
289 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_backlight_set_acpi() local
290 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_set_acpi()
291 struct intel_panel *panel = &connector->panel; in intel_backlight_set_acpi()
307 hw_level = clamp_user_to_hw(connector, user_level, user_max); in intel_backlight_set_acpi()
312 scale_hw_to_user(connector, in intel_backlight_set_acpi()
324 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in lpt_disable_backlight() local
325 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_disable_backlight()
352 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in pch_disable_backlight() local
353 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_disable_backlight()
372 struct drm_i915_private *dev_priv = to_i915(old_conn_state->connector->dev); in i965_disable_backlight()
383 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in vlv_disable_backlight() local
384 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_disable_backlight()
397 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in bxt_disable_backlight() local
398 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in bxt_disable_backlight()
399 struct intel_panel *panel = &connector->panel; in bxt_disable_backlight()
418 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in cnp_disable_backlight() local
419 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in cnp_disable_backlight()
420 struct intel_panel *panel = &connector->panel; in cnp_disable_backlight()
433 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in ext_pwm_disable_backlight() local
434 struct intel_panel *panel = &connector->panel; in ext_pwm_disable_backlight()
442 struct intel_connector *connector = to_intel_connector(old_conn_state->connector); in intel_backlight_disable() local
443 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_disable()
444 struct intel_panel *panel = &connector->panel; in intel_backlight_disable()
474 struct intel_connector *connector = to_intel_connector(conn_state->connector); in lpt_enable_backlight() local
475 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_enable_backlight()
476 struct intel_panel *panel = &connector->panel; in lpt_enable_backlight()
525 struct intel_connector *connector = to_intel_connector(conn_state->connector); in pch_enable_backlight() local
526 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_enable_backlight()
527 struct intel_panel *panel = &connector->panel; in pch_enable_backlight()
572 struct intel_connector *connector = to_intel_connector(conn_state->connector); in i9xx_enable_backlight() local
573 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i9xx_enable_backlight()
574 struct intel_panel *panel = &connector->panel; in i9xx_enable_backlight()
611 struct intel_connector *connector = to_intel_connector(conn_state->connector); in i965_enable_backlight() local
612 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i965_enable_backlight()
613 struct intel_panel *panel = &connector->panel; in i965_enable_backlight()
646 struct intel_connector *connector = to_intel_connector(conn_state->connector); in vlv_enable_backlight() local
647 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_enable_backlight()
648 struct intel_panel *panel = &connector->panel; in vlv_enable_backlight()
677 struct intel_connector *connector = to_intel_connector(conn_state->connector); in bxt_enable_backlight() local
678 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in bxt_enable_backlight()
679 struct intel_panel *panel = &connector->panel; in bxt_enable_backlight()
731 struct intel_connector *connector = to_intel_connector(conn_state->connector); in cnp_enable_backlight() local
732 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in cnp_enable_backlight()
733 struct intel_panel *panel = &connector->panel; in cnp_enable_backlight()
767 struct intel_connector *connector = to_intel_connector(conn_state->connector); in ext_pwm_enable_backlight() local
768 struct intel_panel *panel = &connector->panel; in ext_pwm_enable_backlight()
778 struct intel_connector *connector = to_intel_connector(conn_state->connector); in __intel_backlight_enable() local
779 struct intel_panel *panel = &connector->panel; in __intel_backlight_enable()
787 scale_hw_to_user(connector, in __intel_backlight_enable()
801 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_backlight_enable() local
802 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_enable()
803 struct intel_panel *panel = &connector->panel; in intel_backlight_enable()
819 static u32 intel_panel_get_backlight(struct intel_connector *connector) in intel_panel_get_backlight() argument
821 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_get_backlight()
822 struct intel_panel *panel = &connector->panel; in intel_panel_get_backlight()
828 val = panel->backlight.funcs->get(connector, intel_connector_get_pipe(connector)); in intel_panel_get_backlight()
837 static u32 scale_user_to_hw(struct intel_connector *connector, in scale_user_to_hw() argument
840 struct intel_panel *panel = &connector->panel; in scale_user_to_hw()
850 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_panel_set_backlight() local
851 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_set_backlight()
852 struct intel_panel *panel = &connector->panel; in intel_panel_set_backlight()
862 hw_level = scale_user_to_hw(connector, user_level, user_max); in intel_panel_set_backlight()
873 struct intel_connector *connector = bl_get_data(bd); in intel_backlight_device_update_status() local
874 struct intel_panel *panel = &connector->panel; in intel_backlight_device_update_status()
875 struct drm_device *dev = connector->base.dev; in intel_backlight_device_update_status()
880 intel_panel_set_backlight(connector->base.state, bd->props.brightness, in intel_backlight_device_update_status()
893 panel->backlight.power(connector, enable); in intel_backlight_device_update_status()
905 struct intel_connector *connector = bl_get_data(bd); in intel_backlight_device_get_brightness() local
906 struct drm_device *dev = connector->base.dev; in intel_backlight_device_get_brightness()
916 hw_level = intel_panel_get_backlight(connector); in intel_backlight_device_get_brightness()
917 ret = scale_hw_to_user(connector, in intel_backlight_device_get_brightness()
931 int intel_backlight_device_register(struct intel_connector *connector) in intel_backlight_device_register() argument
933 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_backlight_device_register()
934 struct intel_panel *panel = &connector->panel; in intel_backlight_device_register()
956 props.brightness = scale_hw_to_user(connector, in intel_backlight_device_register()
969 bd = backlight_device_register(name, connector->base.kdev, connector, in intel_backlight_device_register()
982 i915->drm.primary->index, connector->base.name); in intel_backlight_device_register()
986 bd = backlight_device_register(name, connector->base.kdev, connector, in intel_backlight_device_register()
993 connector->base.base.id, connector->base.name, name, PTR_ERR(bd)); in intel_backlight_device_register()
1002 connector->base.base.id, connector->base.name, name); in intel_backlight_device_register()
1010 void intel_backlight_device_unregister(struct intel_connector *connector) in intel_backlight_device_unregister() argument
1012 struct intel_panel *panel = &connector->panel; in intel_backlight_device_unregister()
1025 static u32 cnp_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in cnp_hz_to_pwm() argument
1027 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in cnp_hz_to_pwm()
1036 static u32 bxt_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in bxt_hz_to_pwm() argument
1046 static u32 spt_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in spt_hz_to_pwm() argument
1048 struct intel_panel *panel = &connector->panel; in spt_hz_to_pwm()
1064 static u32 lpt_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in lpt_hz_to_pwm() argument
1066 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_hz_to_pwm()
1067 struct intel_panel *panel = &connector->panel; in lpt_hz_to_pwm()
1087 static u32 pch_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in pch_hz_to_pwm() argument
1089 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_hz_to_pwm()
1103 static u32 i9xx_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in i9xx_hz_to_pwm() argument
1105 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i9xx_hz_to_pwm()
1121 static u32 i965_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in i965_hz_to_pwm() argument
1123 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i965_hz_to_pwm()
1139 static u32 vlv_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz) in vlv_hz_to_pwm() argument
1141 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_hz_to_pwm()
1176 static u32 get_backlight_max_vbt(struct intel_connector *connector) in get_backlight_max_vbt() argument
1178 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in get_backlight_max_vbt()
1179 struct intel_panel *panel = &connector->panel; in get_backlight_max_vbt()
1189 pwm = panel->backlight.pwm_funcs->hz_to_pwm(connector, pwm_freq_hz); in get_backlight_max_vbt()
1202 static u32 get_backlight_min_vbt(struct intel_connector *connector) in get_backlight_min_vbt() argument
1204 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in get_backlight_min_vbt()
1205 struct intel_panel *panel = &connector->panel; in get_backlight_min_vbt()
1228 static int lpt_setup_backlight(struct intel_connector *connector, enum pipe unused) in lpt_setup_backlight() argument
1230 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in lpt_setup_backlight()
1231 struct intel_panel *panel = &connector->panel; in lpt_setup_backlight()
1250 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in lpt_setup_backlight()
1255 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in lpt_setup_backlight()
1264 val = pch_get_backlight(connector, unused); in lpt_setup_backlight()
1270 lpt_set_backlight(connector->base.state, val); in lpt_setup_backlight()
1281 static int pch_setup_backlight(struct intel_connector *connector, enum pipe unused) in pch_setup_backlight() argument
1283 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in pch_setup_backlight()
1284 struct intel_panel *panel = &connector->panel; in pch_setup_backlight()
1294 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in pch_setup_backlight()
1299 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in pch_setup_backlight()
1308 static int i9xx_setup_backlight(struct intel_connector *connector, enum pipe unused) in i9xx_setup_backlight() argument
1310 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i9xx_setup_backlight()
1311 struct intel_panel *panel = &connector->panel; in i9xx_setup_backlight()
1325 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in i9xx_setup_backlight()
1335 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in i9xx_setup_backlight()
1337 val = i9xx_get_backlight(connector, unused); in i9xx_setup_backlight()
1338 val = intel_backlight_invert_pwm_level(connector, val); in i9xx_setup_backlight()
1346 static int i965_setup_backlight(struct intel_connector *connector, enum pipe unused) in i965_setup_backlight() argument
1348 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in i965_setup_backlight()
1349 struct intel_panel *panel = &connector->panel; in i965_setup_backlight()
1360 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in i965_setup_backlight()
1368 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in i965_setup_backlight()
1375 static int vlv_setup_backlight(struct intel_connector *connector, enum pipe pipe) in vlv_setup_backlight() argument
1377 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in vlv_setup_backlight()
1378 struct intel_panel *panel = &connector->panel; in vlv_setup_backlight()
1391 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in vlv_setup_backlight()
1396 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in vlv_setup_backlight()
1404 bxt_setup_backlight(struct intel_connector *connector, enum pipe unused) in bxt_setup_backlight() argument
1406 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in bxt_setup_backlight()
1407 struct intel_panel *panel = &connector->panel; in bxt_setup_backlight()
1427 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in bxt_setup_backlight()
1432 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in bxt_setup_backlight()
1440 cnp_setup_backlight(struct intel_connector *connector, enum pipe unused) in cnp_setup_backlight() argument
1442 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in cnp_setup_backlight()
1443 struct intel_panel *panel = &connector->panel; in cnp_setup_backlight()
1461 panel->backlight.pwm_level_max = get_backlight_max_vbt(connector); in cnp_setup_backlight()
1466 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in cnp_setup_backlight()
1473 static int ext_pwm_setup_backlight(struct intel_connector *connector, in ext_pwm_setup_backlight() argument
1476 struct drm_device *dev = connector->base.dev; in ext_pwm_setup_backlight()
1478 struct intel_panel *panel = &connector->panel; in ext_pwm_setup_backlight()
1499 panel->backlight.pwm_level_min = get_backlight_min_vbt(connector); in ext_pwm_setup_backlight()
1507 level = intel_backlight_invert_pwm_level(connector, level); in ext_pwm_setup_backlight()
1526 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_pwm_set_backlight() local
1527 struct intel_panel *panel = &connector->panel; in intel_pwm_set_backlight()
1530 intel_backlight_invert_pwm_level(connector, level)); in intel_pwm_set_backlight()
1533 static u32 intel_pwm_get_backlight(struct intel_connector *connector, enum pipe pipe) in intel_pwm_get_backlight() argument
1535 struct intel_panel *panel = &connector->panel; in intel_pwm_get_backlight()
1537 return intel_backlight_invert_pwm_level(connector, in intel_pwm_get_backlight()
1538 panel->backlight.pwm_funcs->get(connector, pipe)); in intel_pwm_get_backlight()
1544 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_pwm_enable_backlight() local
1545 struct intel_panel *panel = &connector->panel; in intel_pwm_enable_backlight()
1548 intel_backlight_invert_pwm_level(connector, level)); in intel_pwm_enable_backlight()
1553 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_pwm_disable_backlight() local
1554 struct intel_panel *panel = &connector->panel; in intel_pwm_disable_backlight()
1557 intel_backlight_invert_pwm_level(connector, level)); in intel_pwm_disable_backlight()
1560 static int intel_pwm_setup_backlight(struct intel_connector *connector, enum pipe pipe) in intel_pwm_setup_backlight() argument
1562 struct intel_panel *panel = &connector->panel; in intel_pwm_setup_backlight()
1563 int ret = panel->backlight.pwm_funcs->setup(connector, pipe); in intel_pwm_setup_backlight()
1570 panel->backlight.level = intel_pwm_get_backlight(connector, pipe); in intel_pwm_setup_backlight()
1581 struct intel_connector *connector = to_intel_connector(conn_state->connector); in intel_backlight_update() local
1582 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_update()
1583 struct intel_panel *panel = &connector->panel; in intel_backlight_update()
1595 int intel_backlight_setup(struct intel_connector *connector, enum pipe pipe) in intel_backlight_setup() argument
1597 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_setup()
1598 struct intel_panel *panel = &connector->panel; in intel_backlight_setup()
1618 ret = panel->backlight.funcs->setup(connector, pipe); in intel_backlight_setup()
1624 connector->base.name); in intel_backlight_setup()
1632 connector->base.name, in intel_backlight_setup()
1739 struct intel_connector *connector = in intel_backlight_init_funcs() local
1741 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_backlight_init_funcs()
1743 if (connector->base.connector_type == DRM_MODE_CONNECTOR_DSI && in intel_backlight_init_funcs()
1744 intel_dsi_dcs_init_backlight_funcs(connector) == 0) in intel_backlight_init_funcs()
1759 if (connector->base.connector_type == DRM_MODE_CONNECTOR_DSI) { in intel_backlight_init_funcs()
1770 if (connector->base.connector_type == DRM_MODE_CONNECTOR_eDP && in intel_backlight_init_funcs()
1771 intel_dp_aux_init_backlight_funcs(connector) == 0) in intel_backlight_init_funcs()