Commit 5988a0ac authored by Suraj Kandpal's avatar Suraj Kandpal Committed by Uma Shankar

drm/i915: Remove one use macro

Remove one use macro for_each_connector_on_encoder which
is only being used at intel_encoder_find_connector.
Signed-off-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarUma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221020104635.874860-2-suraj.kandpal@intel.com
parent 1e3d21a5
...@@ -469,10 +469,6 @@ enum hpd_pin { ...@@ -469,10 +469,6 @@ enum hpd_pin {
list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \ list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \
for_each_if((intel_encoder)->base.crtc == (__crtc)) for_each_if((intel_encoder)->base.crtc == (__crtc))
#define for_each_connector_on_encoder(dev, __encoder, intel_connector) \
list_for_each_entry((intel_connector), &(dev)->mode_config.connector_list, base.head) \
for_each_if((intel_connector)->base.encoder == (__encoder))
#define for_each_old_intel_plane_in_state(__state, plane, old_plane_state, __i) \ #define for_each_old_intel_plane_in_state(__state, plane, old_plane_state, __i) \
for ((__i) = 0; \ for ((__i) = 0; \
(__i) < (__state)->base.dev->mode_config.num_total_plane && \ (__i) < (__state)->base.dev->mode_config.num_total_plane && \
......
...@@ -205,13 +205,21 @@ static bool intel_crtc_has_encoders(struct intel_crtc *crtc) ...@@ -205,13 +205,21 @@ static bool intel_crtc_has_encoders(struct intel_crtc *crtc)
static struct intel_connector *intel_encoder_find_connector(struct intel_encoder *encoder) static struct intel_connector *intel_encoder_find_connector(struct intel_encoder *encoder)
{ {
struct drm_device *dev = encoder->base.dev; struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct drm_connector_list_iter conn_iter;
struct intel_connector *connector; struct intel_connector *connector;
struct intel_connector *found_connector = NULL;
for_each_connector_on_encoder(dev, &encoder->base, connector) drm_connector_list_iter_begin(&i915->drm, &conn_iter);
return connector; for_each_intel_connector_iter(connector, &conn_iter) {
if (&encoder->base == connector->base.encoder) {
found_connector = connector;
break;
}
}
drm_connector_list_iter_end(&conn_iter);
return NULL; return found_connector;
} }
static void intel_sanitize_fifo_underrun_reporting(const struct intel_crtc_state *crtc_state) static void intel_sanitize_fifo_underrun_reporting(const struct intel_crtc_state *crtc_state)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment