The reference was gained in intel_modeset_update_connector_atomic_state() [called from intel_modeset_setup_hw_state()] and is never lost if no client ever performs a modeset. [ 649.836069] WARNING: CPU: 6 PID: 8865 at drivers/gpu/drm/drm_mode_config.c:424 drm_mode_config_cleanup+0x21b/0x290 [drm] [ 649.836078] Modules linked in: i915(-) intel_gtt drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm [ 649.836099] CPU: 6 PID: 8865 Comm: drv_selftest Not tainted 4.10.0-rc6+ #908 [ 649.836106] Hardware name: Intel Corporation 2012 Client Platform/Emerald Lake 2, BIOS ACRVMBY1.86C.0078.P00.1201161002 01/16/2012 [ 649.836114] Call Trace: [ 649.836125] dump_stack+0x4d/0x6f [ 649.836136] __warn+0xc1/0xe0 [ 649.836144] warn_slowpath_null+0x18/0x20 [ 649.836163] drm_mode_config_cleanup+0x21b/0x290 [drm] [ 649.836213] intel_modeset_cleanup+0x59/0xa0 [i915] [ 649.836242] i915_driver_unload+0x84/0x170 [i915] [ 649.836277] i915_pci_remove+0x14/0x20 [i915] [ 649.836287] pci_device_remove+0x28/0x60 [ 649.836301] device_release_driver_internal+0x132/0x1d0 [ 649.836313] driver_detach+0x3a/0x80 [ 649.836324] bus_remove_driver+0x47/0xa0 [ 649.836335] driver_unregister+0x27/0x50 [ 649.836344] pci_unregister_driver+0x34/0xa0 [ 649.836387] i915_exit+0x1a/0x71 [i915] [ 649.836401] SyS_delete_module+0x173/0x1c0 [ 649.836413] entry_SYSCALL_64_fastpath+0x17/0x98 [ 649.836422] RIP: 0033:0x7f8d5a841ee7 [ 649.836432] RSP: 002b:00007fff89161a28 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 649.836448] RAX: ffffffffffffffda RBX: 000055f6cd1db5c0 RCX: 00007f8d5a841ee7 [ 649.836458] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055f6cd1da7b8 [ 649.836467] RBP: 00007f8d5aaee440 R08: 0000000000000000 R09: 00007fff89161a58 [ 649.836476] R10: 0000000000000062 R11: 0000000000000206 R12: 0000000000000000 [ 649.836486] R13: 000055f6cd1d9010 R14: 000000000000003a R15: 00007fff891609f0 [ 649.836514] ---[ end trace 0e529da316e2a3d1 ]--- [ 649.836536] [drm:drm_mode_config_cleanup [drm]] *ERROR* connector VGA-1 leaked! Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/intel_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b44e9466d394..801ff845a2f3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -17301,10 +17301,18 @@ void intel_connector_unregister(struct drm_connector *connector) void intel_modeset_cleanup(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); + struct intel_connector *connector; flush_work(&dev_priv->atomic_helper.free_work); WARN_ON(!llist_empty(&dev_priv->atomic_helper.free_list)); + for_each_intel_connector(dev, connector) { + if (connector->base.state->crtc) { + drm_connector_unreference(&connector->base); + connector->base.state->crtc = NULL; + } + } + intel_disable_gt_powersave(dev_priv); /* -- 2.11.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx