Lines Matching full:connector
56 intel_panel_preferred_fixed_mode(struct intel_connector *connector) in intel_panel_preferred_fixed_mode() argument
58 return list_first_entry_or_null(&connector->panel.fixed_modes, in intel_panel_preferred_fixed_mode()
62 static bool is_in_vrr_range(struct intel_connector *connector, int vrefresh) in is_in_vrr_range() argument
64 const struct drm_display_info *info = &connector->base.display_info; in is_in_vrr_range()
66 return intel_vrr_is_capable(connector) && in is_in_vrr_range()
71 static bool is_best_fixed_mode(struct intel_connector *connector, in is_best_fixed_mode() argument
84 if (is_in_vrr_range(connector, vrefresh) && in is_best_fixed_mode()
85 is_in_vrr_range(connector, fixed_mode_vrefresh) && in is_best_fixed_mode()
95 intel_panel_fixed_mode(struct intel_connector *connector, in intel_panel_fixed_mode() argument
101 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_fixed_mode()
104 if (is_best_fixed_mode(connector, vrefresh, in intel_panel_fixed_mode()
134 intel_panel_downclock_mode(struct intel_connector *connector, in intel_panel_downclock_mode() argument
138 int min_vrefresh = connector->panel.vbt.seamless_drrs_min_refresh_rate; in intel_panel_downclock_mode()
142 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_downclock_mode()
156 intel_panel_highest_mode(struct intel_connector *connector, in intel_panel_highest_mode() argument
162 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_highest_mode()
170 int intel_panel_get_modes(struct intel_connector *connector) in intel_panel_get_modes() argument
175 list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) { in intel_panel_get_modes()
178 mode = drm_mode_duplicate(connector->base.dev, fixed_mode); in intel_panel_get_modes()
180 drm_mode_probed_add(&connector->base, mode); in intel_panel_get_modes()
188 static bool has_drrs_modes(struct intel_connector *connector) in has_drrs_modes() argument
192 list_for_each_entry(mode1, &connector->panel.fixed_modes, head) { in has_drrs_modes()
195 list_for_each_entry_continue(mode2, &connector->panel.fixed_modes, head) { in has_drrs_modes()
204 enum drrs_type intel_panel_drrs_type(struct intel_connector *connector) in intel_panel_drrs_type() argument
206 return connector->panel.vbt.drrs_type; in intel_panel_drrs_type()
209 int intel_panel_compute_config(struct intel_connector *connector, in intel_panel_compute_config() argument
213 intel_panel_fixed_mode(connector, adjusted_mode); in intel_panel_compute_config()
227 is_vrr = is_in_vrr_range(connector, vrefresh) && in intel_panel_compute_config()
228 is_in_vrr_range(connector, fixed_mode_vrefresh); in intel_panel_compute_config()
238 drm_dbg_kms(connector->base.dev, in intel_panel_compute_config()
239 … "[CONNECTOR:%d:%s] Requested mode vrefresh (%d Hz) does not match fixed mode vrefresh (%d Hz)\n", in intel_panel_compute_config()
240 connector->base.base.id, connector->base.name, in intel_panel_compute_config()
259 static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connector) in intel_panel_add_edid_alt_fixed_modes() argument
261 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_add_edid_alt_fixed_modes()
263 intel_panel_preferred_fixed_mode(connector); in intel_panel_add_edid_alt_fixed_modes()
266 list_for_each_entry_safe(mode, next, &connector->base.probed_modes, head) { in intel_panel_add_edid_alt_fixed_modes()
271 "[CONNECTOR:%d:%s] using alternate EDID fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_edid_alt_fixed_modes()
272 connector->base.base.id, connector->base.name, in intel_panel_add_edid_alt_fixed_modes()
275 list_move_tail(&mode->head, &connector->panel.fixed_modes); in intel_panel_add_edid_alt_fixed_modes()
279 static void intel_panel_add_edid_preferred_mode(struct intel_connector *connector) in intel_panel_add_edid_preferred_mode() argument
281 struct drm_i915_private *dev_priv = to_i915(connector->base.dev); in intel_panel_add_edid_preferred_mode()
284 if (list_empty(&connector->base.probed_modes)) in intel_panel_add_edid_preferred_mode()
288 list_for_each_entry(scan, &connector->base.probed_modes, head) { in intel_panel_add_edid_preferred_mode()
296 fixed_mode = list_first_entry(&connector->base.probed_modes, in intel_panel_add_edid_preferred_mode()
300 "[CONNECTOR:%d:%s] using %s EDID fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_edid_preferred_mode()
301 connector->base.base.id, connector->base.name, in intel_panel_add_edid_preferred_mode()
307 list_move_tail(&fixed_mode->head, &connector->panel.fixed_modes); in intel_panel_add_edid_preferred_mode()
310 static void intel_panel_destroy_probed_modes(struct intel_connector *connector) in intel_panel_destroy_probed_modes() argument
312 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_destroy_probed_modes()
315 list_for_each_entry_safe(mode, next, &connector->base.probed_modes, head) { in intel_panel_destroy_probed_modes()
317 "[CONNECTOR:%d:%s] not using EDID mode: " DRM_MODE_FMT "\n", in intel_panel_destroy_probed_modes()
318 connector->base.base.id, connector->base.name, in intel_panel_destroy_probed_modes()
325 void intel_panel_add_edid_fixed_modes(struct intel_connector *connector, in intel_panel_add_edid_fixed_modes() argument
328 intel_panel_add_edid_preferred_mode(connector); in intel_panel_add_edid_fixed_modes()
329 if (intel_panel_preferred_fixed_mode(connector) && use_alt_fixed_modes) in intel_panel_add_edid_fixed_modes()
330 intel_panel_add_edid_alt_fixed_modes(connector); in intel_panel_add_edid_fixed_modes()
331 intel_panel_destroy_probed_modes(connector); in intel_panel_add_edid_fixed_modes()
334 static void intel_panel_add_fixed_mode(struct intel_connector *connector, in intel_panel_add_fixed_mode() argument
338 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_fixed_mode()
339 struct drm_display_info *info = &connector->base.display_info; in intel_panel_add_fixed_mode()
349 drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] using %s fixed mode: " DRM_MODE_FMT "\n", in intel_panel_add_fixed_mode()
350 connector->base.base.id, connector->base.name, type, in intel_panel_add_fixed_mode()
353 list_add_tail(&fixed_mode->head, &connector->panel.fixed_modes); in intel_panel_add_fixed_mode()
356 void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector) in intel_panel_add_vbt_lfp_fixed_mode() argument
358 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_vbt_lfp_fixed_mode()
361 mode = connector->panel.vbt.lfp_lvds_vbt_mode; in intel_panel_add_vbt_lfp_fixed_mode()
365 intel_panel_add_fixed_mode(connector, in intel_panel_add_vbt_lfp_fixed_mode()
370 void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector) in intel_panel_add_vbt_sdvo_fixed_mode() argument
372 struct drm_i915_private *i915 = to_i915(connector->base.dev); in intel_panel_add_vbt_sdvo_fixed_mode()
375 mode = connector->panel.vbt.sdvo_lvds_vbt_mode; in intel_panel_add_vbt_sdvo_fixed_mode()
379 intel_panel_add_fixed_mode(connector, in intel_panel_add_vbt_sdvo_fixed_mode()
384 void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector, in intel_panel_add_encoder_fixed_mode() argument
387 intel_panel_add_fixed_mode(connector, in intel_panel_add_encoder_fixed_mode()
688 intel_panel_detect(struct drm_connector *connector, bool force) in intel_panel_detect() argument
690 struct drm_i915_private *i915 = to_i915(connector->dev); in intel_panel_detect()
699 intel_panel_mode_valid(struct intel_connector *connector, in intel_panel_mode_valid() argument
703 intel_panel_fixed_mode(connector, mode); in intel_panel_mode_valid()
720 void intel_panel_init_alloc(struct intel_connector *connector) in intel_panel_init_alloc() argument
722 struct intel_panel *panel = &connector->panel; in intel_panel_init_alloc()
724 connector->panel.vbt.panel_type = -1; in intel_panel_init_alloc()
725 connector->panel.vbt.backlight.controller = -1; in intel_panel_init_alloc()
729 int intel_panel_init(struct intel_connector *connector, in intel_panel_init() argument
732 struct intel_panel *panel = &connector->panel; in intel_panel_init()
738 if (!has_drrs_modes(connector)) in intel_panel_init()
739 connector->panel.vbt.drrs_type = DRRS_TYPE_NONE; in intel_panel_init()
741 drm_dbg_kms(connector->base.dev, in intel_panel_init()
742 "[CONNECTOR:%d:%s] DRRS type: %s\n", in intel_panel_init()
743 connector->base.base.id, connector->base.name, in intel_panel_init()
744 intel_drrs_type_str(intel_panel_drrs_type(connector))); in intel_panel_init()
749 void intel_panel_fini(struct intel_connector *connector) in intel_panel_fini() argument
751 struct intel_panel *panel = &connector->panel; in intel_panel_fini()
763 drm_mode_destroy(connector->base.dev, fixed_mode); in intel_panel_fini()