Commit 2fd96b41 authored by Gustavo Padovan's avatar Gustavo Padovan

drm/i915: use drm_for_each_connector_iter()

Drop legacy drm_for_each_connector() in favor of the race-free
drm_for_each_connector_iter().

Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-4-gustavo@padovan.org
parent 2cbeb64f
...@@ -11216,6 +11216,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state) ...@@ -11216,6 +11216,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
{ {
struct drm_device *dev = state->dev; struct drm_device *dev = state->dev;
struct drm_connector *connector; struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
unsigned int used_ports = 0; unsigned int used_ports = 0;
unsigned int used_mst_ports = 0; unsigned int used_mst_ports = 0;
...@@ -11224,7 +11225,8 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state) ...@@ -11224,7 +11225,8 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
* list to detect the problem on ddi platforms * list to detect the problem on ddi platforms
* where there's just one encoder per digital port. * where there's just one encoder per digital port.
*/ */
drm_for_each_connector(connector, dev) { drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
struct drm_connector_state *connector_state; struct drm_connector_state *connector_state;
struct intel_encoder *encoder; struct intel_encoder *encoder;
...@@ -11263,6 +11265,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state) ...@@ -11263,6 +11265,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
break; break;
} }
} }
drm_connector_list_iter_end(&conn_iter);
/* can't mix MST and SST/HDMI on the same port */ /* can't mix MST and SST/HDMI on the same port */
if (used_ports & used_mst_ports) if (used_ports & used_mst_ports)
......
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