> I'm happy to test your next diffs on my T470s. I fixed the locking, please try the diff below on top of the one you already have and let me know if everything is OK.
> Is it docking station specific or ThinkPad model specific? > I could have access to other ThinkPad at work, same to other > docking stations. It is model specific. All laptops I had access to until the T460 worked well with the same docking station. And now you are the first to test things with the next generation and reproduce the issue. So now I know of two laptop models that misbehave: T460 and T470 :) commit 19e33011e1fb5ea1671e43366f5ac2a762b2642f Author: Paul Irofti <[email protected]> Date: Wed Feb 21 15:20:03 2018 +0200 Fix connection mutex locking. diff --git sys/dev/pci/drm/drm_probe_helper.c sys/dev/pci/drm/drm_probe_helper.c index 936c0c1d3a7..84a0e585d32 100644 --- sys/dev/pci/drm/drm_probe_helper.c +++ sys/dev/pci/drm/drm_probe_helper.c @@ -136,15 +136,27 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect struct drm_display_mode *mode; const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; - int count = 0; + int count = 0, ret; int mode_flags = 0; bool verbose_prune = true; enum drm_connector_status old_status; + struct drm_modeset_acquire_ctx ctx; WARN_ON(!mutex_is_locked(&dev->mode_config.mutex)); DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name); + + drm_modeset_acquire_init(&ctx, 0); + +retry: + ret = drm_modeset_lock(&dev->mode_config.connection_mutex, &ctx); + if (ret == -EDEADLK) { + drm_modeset_backoff(&ctx); + goto retry; + } else + WARN_ON(ret < 0); + /* set all modes to the unverified state */ list_for_each_entry(mode, &connector->modes, head) mode->status = MODE_UNVERIFIED; @@ -248,6 +260,9 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect prune: drm_mode_prune_invalid(dev, &connector->modes, verbose_prune); + drm_modeset_drop_locks(&ctx); + drm_modeset_acquire_fini(&ctx); + if (list_empty(&connector->modes)) return 0;
