drm/cma-helper: Fix locking in drm_fb_cma_debugfs_show
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / drm_plane_helper.c
index 40c1db9ad7c3fac84365cc331ec67661e902abb5..7e1cde803bf30f42780b59399a91b1c65c3eb81b 100644 (file)
@@ -91,13 +91,14 @@ static int get_connectors_for_crtc(struct drm_crtc *crtc,
         */
        WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
 
-       list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+       drm_for_each_connector(connector, dev) {
                if (connector->encoder && connector->encoder->crtc == crtc) {
                        if (connector_list != NULL && count < num_connectors)
                                *(connector_list++) = connector;
 
                        count++;
                }
+       }
 
        return count;
 }
@@ -465,6 +466,9 @@ int drm_plane_helper_commit(struct drm_plane *plane,
                if (!crtc[i])
                        continue;
 
+               if (crtc[i]->cursor == plane)
+                       continue;
+
                /* There's no other way to figure out whether the crtc is running. */
                ret = drm_crtc_vblank_get(crtc[i]);
                if (ret == 0) {