Bug 64183 - Hotplugging external display with weston running leads to compositor lockup
Summary: Hotplugging external display with weston running leads to compositor lockup
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 14:08 UTC by Rob Bradford
Modified: 2013-05-15 02:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Rob Bradford 2013-05-03 14:08:31 UTC
2e43720 + my submitted patch to tweak the pageflip messages.

After attaching gdb I see that drmModeSetCrtc doesn't called on this new output before the page flip gets called.

[13:58:30.765] Output HDMI1, (connector 16, crtc 5)
  mode 1920x1080@60.0, preferred, current
  mode 1920x1080@50.0
  mode 1920x1080@30.0
  mode 1920x1080@25.0
  mode 1920x1080@24.0
  mode 1920x1080@50.0
  mode 1920x1080@60.0
  mode 1600x1200@60.0
  mode 1680x1050@59.9
  mode 1680x945@60.0
  mode 1400x1050@59.9
  mode 1600x900@60.0
  mode 1280x1024@75.0
  mode 1280x1024@60.0
  mode 1440x900@75.0
  mode 1440x900@59.9
  mode 1280x960@60.0
  mode 1366x768@60.0
  mode 1360x768@60.0
  mode 1280x800@74.9
  mode 1280x800@59.9
  mode 1152x864@75.0
  mode 1280x768@74.9
  mode 1280x768@60.0
  mode 1280x720@50.0
  mode 1280x720@60.0
  mode 1024x768@75.1
  mode 1024x768@70.1
  mode 1024x768@60.0
  mode 1024x576@60.0
  mode 832x624@74.6
  mode 800x600@72.2
  mode 800x600@75.0
  mode 800x600@60.3
  mode 800x600@56.2
  mode 720x576@50.0
  mode 848x480@60.0
  mode 720x480@59.9
  mode 640x480@72.8
  mode 640x480@75.0
  mode 640x480@66.7
  mode 640x480@60.0
  mode 720x400@70.1
[13:58:30.767] connector 16 connected
[13:58:30.817] queueing pageflip failed (start repaint loop): Device or resource busy
Comment 1 Rob Bradford 2013-05-03 17:55:50 UTC
And like https://bugs.freedesktop.org/show_bug.cgi?id=63812 i've tracked this down to:

commit e5a1225bc436f86b5241152bb332014d64f5b446
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Fri Apr 5 23:07:11 2013 +0200

    Make backends always specify output repaint time
Comment 2 Kristian Høgsberg 2013-05-15 02:32:24 UTC
commit 95eb3a2eb470bd341ab078c7e48a28ffebc6dde1
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue May 7 14:16:59 2013 +0300

    compositor-drm: Don't page flip before a mode is set
    
    The function drm_output_start_repaint_loop() unconditionally issues a
    page flip, even if the crtc for that output has not been enabled yet.
    That causes the page flip to fail, and drm_output_repaint() is never
    called.
    
    Solve this by bypassing the initial page flip if the output needs a
    mode set.
    
    This has the caveat of affecting latency predictability for that first
    frame and when a "driver" mode fullscreen surface causes a mode set.
    However, on both cases the mode set would take an unpredictable amount
    of time anyway.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=63812
    https://bugs.freedesktop.org/show_bug.cgi?id=64183


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.