Commit f8222409 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/msm: Use drm_connector_has_possible_encoder()

Use drm_connector_has_possible_encoder() for checking
whether the encoder has an associated connector.

v2: Replace the drm_for_each_connector_encoder_ids() loop
    with a simple drm_connector_has_possible_encoder() call

Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180628131315.14156-9-ville.syrjala@linux.intel.comReviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 38cb8d96
......@@ -751,12 +751,8 @@ struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id)
connector_list = &dev->mode_config.connector_list;
list_for_each_entry(connector, connector_list, head) {
int i;
for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
if (connector->encoder_ids[i] == encoder->base.id)
return connector;
}
if (drm_connector_has_possible_encoder(connector, encoder))
return connector;
}
return ERR_PTR(-ENODEV);
......
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