summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.com>2017-05-11 16:10:44 -0300
committerGustavo Padovan <gustavo.padovan@collabora.com>2017-05-26 02:09:10 -0300
commit2fd96b4116bfe922b4a1cf7626b30f5c2010c218 (patch)
tree8615fc59d3d8fbc0bd00066344925bb431dd1ba5
parent2cbeb64f6c709de67e2ba5b97ff45d2b6147b286 (diff)
downloadlinux-2fd96b4116bfe922b4a1cf7626b30f5c2010c218.tar.gz
linux-2fd96b4116bfe922b4a1cf7626b30f5c2010c218.tar.bz2
linux-2fd96b4116bfe922b4a1cf7626b30f5c2010c218.zip
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: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-4-gustavo@padovan.org
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6a037b856d96..e6e26705c138 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11216,6 +11216,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
{
struct drm_device *dev = state->dev;
struct drm_connector *connector;
+ struct drm_connector_list_iter conn_iter;
unsigned int used_ports = 0;
unsigned int used_mst_ports = 0;
@@ -11224,7 +11225,8 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
* list to detect the problem on ddi platforms
* 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 intel_encoder *encoder;
@@ -11263,6 +11265,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
break;
}
}
+ drm_connector_list_iter_end(&conn_iter);
/* can't mix MST and SST/HDMI on the same port */
if (used_ports & used_mst_ports)