Lines Matching full:connector
59 intel_panel_preferred_fixed_mode(struct intel_connector *connector) in intel_panel_preferred_fixed_mode() argument
61 return list_first_entry_or_null(&connector->panel.fixed_modes, in intel_panel_preferred_fixed_mode()
65 static bool is_best_fixed_mode(struct intel_connector *connector, in is_best_fixed_mode() argument
78 if (intel_vrr_is_in_range(connector, vrefresh) && in is_best_fixed_mode()
79 intel_vrr_is_in_range(connector, fixed_mode_vrefresh) && in is_best_fixed_mode()
89 intel_panel_fixed_mode(struct intel_connector *connector, in intel_panel_fixed_mode() argument
95 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_fixed_mode()
98 if (is_best_fixed_mode(connector, vrefresh, in intel_panel_fixed_mode()
128 intel_panel_downclock_mode(struct intel_connector *connector, in intel_panel_downclock_mode() argument
132 int min_vrefresh = connector->panel.vbt.seamless_drrs_min_refresh_rate; in intel_panel_downclock_mode()
136 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_downclock_mode()
150 intel_panel_highest_mode(struct intel_connector *connector, in intel_panel_highest_mode() argument
156 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_highest_mode()
164 int intel_panel_get_modes(struct intel_connector *connector) in intel_panel_get_modes() argument
169 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_get_modes()
172 mode = drm_mode_duplicate(connector->base.dev, fixed_mode); in intel_panel_get_modes()
174 drm_mode_probed_add(&connector->base, mode); in intel_panel_get_modes()
182 static bool has_drrs_modes(struct intel_connector *connector) in has_drrs_modes() argument
186 list_for_each_entry(mode1, &connector->panel.fixed_modes, head) { in has_drrs_modes()
189 list_for_each_entry_continue(mode2, &connector->panel.fixed_modes, head) { in has_drrs_modes()
198 enum drrs_type intel_panel_drrs_type(struct intel_connector *connector) in intel_panel_drrs_type() argument
200 return connector->panel.vbt.drrs_type; in intel_panel_drrs_type()
203 int intel_panel_compute_config(struct intel_connector *connector, in intel_panel_compute_config() argument
207 intel_panel_fixed_mode(connector, adjusted_mode); in intel_panel_compute_config()
221 is_vrr = intel_vrr_is_in_range(connector, vrefresh) && in intel_panel_compute_config()
222 intel_vrr_is_in_range(connector, fixed_mode_vrefresh); in intel_panel_compute_config()
232 drm_dbg_kms(connector->base.dev, in intel_panel_compute_config()
233 … "[CONNECTOR:%d:%s] Requested mode vrefresh (%d Hz) does not match fixed mode vrefresh (%d Hz)\n", in intel_panel_compute_config()
234 connector->base.base.id, connector->base.name, in intel_panel_compute_config()
253 static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connector) in intel_panel_add_edid_alt_fixed_modes() argument
255 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_add_edid_alt_fixed_modes()
257 intel_panel_preferred_fixed_mode(connector); in intel_panel_add_edid_alt_fixed_modes()
260 list_for_each_entry_safe(mode, next, &connector->base.probed_modes, head) { in intel_panel_add_edid_alt_fixed_modes()
265 "[CONNECTOR:%d:%s] using alternate EDID fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_edid_alt_fixed_modes()
266 connector->base.base.id, connector->base.name, in intel_panel_add_edid_alt_fixed_modes()
269 list_move_tail(&mode->head, &connector->panel.fixed_modes); in intel_panel_add_edid_alt_fixed_modes()
273 static void intel_panel_add_edid_preferred_mode(struct intel_connector *connector) in intel_panel_add_edid_preferred_mode() argument
275 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_add_edid_preferred_mode()
278 if (list_empty(&connector->base.probed_modes)) in intel_panel_add_edid_preferred_mode()
282 list_for_each_entry(scan, &connector->base.probed_modes, head) { in intel_panel_add_edid_preferred_mode()
290 fixed_mode = list_first_entry(&connector->base.probed_modes, in intel_panel_add_edid_preferred_mode()
294 "[CONNECTOR:%d:%s] using %s EDID fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_edid_preferred_mode()
295 connector->base.base.id, connector->base.name, in intel_panel_add_edid_preferred_mode()
301 list_move_tail(&fixed_mode->head, &connector->panel.fixed_modes); in intel_panel_add_edid_preferred_mode()
304 static void intel_panel_destroy_probed_modes(struct intel_connector *connector) in intel_panel_destroy_probed_modes() argument
306 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_destroy_probed_modes()
309 list_for_each_entry_safe(mode, next, &connector->base.probed_modes, head) { in intel_panel_destroy_probed_modes()
311 "[CONNECTOR:%d:%s] not using EDID mode: " DRM_MODE_FMT "\n", in intel_panel_destroy_probed_modes()
312 connector->base.base.id, connector->base.name, in intel_panel_destroy_probed_modes()
319 void intel_panel_add_edid_fixed_modes(struct intel_connector *connector, in intel_panel_add_edid_fixed_modes() argument
322 intel_panel_add_edid_preferred_mode(connector); in intel_panel_add_edid_fixed_modes()
323 if (intel_panel_preferred_fixed_mode(connector) && use_alt_fixed_modes) in intel_panel_add_edid_fixed_modes()
324 intel_panel_add_edid_alt_fixed_modes(connector); in intel_panel_add_edid_fixed_modes()
325 intel_panel_destroy_probed_modes(connector); in intel_panel_add_edid_fixed_modes()
328 static void intel_panel_add_fixed_mode(struct intel_connector *connector, in intel_panel_add_fixed_mode() argument
332 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_fixed_mode()
333 struct drm_display_info *info = &connector->base.display_info; in intel_panel_add_fixed_mode()
343 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] using %s fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_fixed_mode()
344 connector->base.base.id, connector->base.name, type, in intel_panel_add_fixed_mode()
347 list_add_tail(&fixed_mode->head, &connector->panel.fixed_modes); in intel_panel_add_fixed_mode()
350 void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector) in intel_panel_add_vbt_lfp_fixed_mode() argument
352 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_vbt_lfp_fixed_mode()
355 mode = connector->panel.vbt.lfp_vbt_mode; in intel_panel_add_vbt_lfp_fixed_mode()
359 intel_panel_add_fixed_mode(connector, in intel_panel_add_vbt_lfp_fixed_mode()
364 void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector) in intel_panel_add_vbt_sdvo_fixed_mode() argument
366 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_vbt_sdvo_fixed_mode()
369 mode = connector->panel.vbt.sdvo_lvds_vbt_mode; in intel_panel_add_vbt_sdvo_fixed_mode()
373 intel_panel_add_fixed_mode(connector, in intel_panel_add_vbt_sdvo_fixed_mode()
378 void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector, in intel_panel_add_encoder_fixed_mode() argument
381 intel_panel_add_fixed_mode(connector, in intel_panel_add_encoder_fixed_mode()
682 intel_panel_detect(struct drm_connector *connector, bool force) in intel_panel_detect() argument
684 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_panel_detect()
690 return connector->status; in intel_panel_detect()
696 intel_panel_mode_valid(struct intel_connector *connector, in intel_panel_mode_valid() argument
700 intel_panel_fixed_mode(connector, mode); in intel_panel_mode_valid()
717 void intel_panel_init_alloc(struct intel_connector *connector) in intel_panel_init_alloc() argument
719 struct intel_panel *panel = &connector->panel; in intel_panel_init_alloc()
721 connector->panel.vbt.panel_type = -1; in intel_panel_init_alloc()
722 connector->panel.vbt.backlight.controller = -1; in intel_panel_init_alloc()
726 int intel_panel_init(struct intel_connector *connector, in intel_panel_init() argument
729 struct intel_panel *panel = &connector->panel; in intel_panel_init()
735 if (!has_drrs_modes(connector)) in intel_panel_init()
736 connector->panel.vbt.drrs_type = DRRS_TYPE_NONE; in intel_panel_init()
738 drm_dbg_kms(connector->base.dev, in intel_panel_init()
739 "[CONNECTOR:%d:%s] DRRS type: %s\n", in intel_panel_init()
740 connector->base.base.id, connector->base.name, in intel_panel_init()
741 intel_drrs_type_str(intel_panel_drrs_type(connector))); in intel_panel_init()
746 void intel_panel_fini(struct intel_connector *connector) in intel_panel_fini() argument
748 struct intel_panel *panel = &connector->panel; in intel_panel_fini()
760 drm_mode_destroy(connector->base.dev, fixed_mode); in intel_panel_fini()