Created attachment 127421 [details] output of drm.debug=0xe in messages This IPC has a build in touch screen which is connected to LVDS1. After connecting a second display on port VGA1, LVDS1 is reported (from xrandr) as disconnected. After disconnecting VGA1, LVDS1 is reported as connected again. Booting with nomodeset (framebuffer): both screens are enabled and running as expected! IPC-Type: iEi PPC-5170A chipset: Intel H61 lspci: 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller]), Subsystem: Intel Corporation Device 2111 As drm.debug output also reports a unconnected LVDS1, I assume it is a issue with the i915 driver maybe in combination with a buggy hardware. The debugging output is attached.
Hmm. diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 825853d..c459e4d 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1756,6 +1756,8 @@ intel_sdvo_detect(struct drm_connector *connector, bool force) ret = connector_status_disconnected; else if (IS_TMDS(intel_sdvo_connector)) ret = intel_sdvo_tmds_sink_detect(connector); + else if (IS_LVDS(intel_sdvo_connector)) + ret = intel_sdvo->sdvo_lvds_fixed_mode ? connector_status_connected : ret = connector_status_disconnected; else { struct edid *edid;
(In reply to Chris Wilson from comment #1) > Hmm. > > diff --git a/drivers/gpu/drm/i915/intel_sdvo.c > + else if (IS_LVDS(intel_sdvo_connector)) > + ret = intel_sdvo->sdvo_lvds_fixed_mode ? > connector_status_connected : ret = connector_status_disconnected; doesn't compile... --> drivers/gpu/drm/i915/intel_sdvo.c:1740:78: error: lvalue required as left operand of assignment have tried: else if (IS_LVDS(intel_sdvo_connector)) ret = intel_sdvo->sdvo_lvds_fixed_mode ? connector_status_connected : connector_status_disconnected; doesn't work! have hard set: else if (IS_LVDS(intel_sdvo_connector)) ret = connector_status_connected; does work! ... ?
After fixing the typo, you also need: diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 825853d..9b528a5 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -2622,6 +2622,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device) if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector)) goto err; + intel_sdvo_get_lvds_modes(connector); return true; err: That should then be equivalent to always setting the LVDS as connected.
(In reply to Wilhelm Hagemeister from comment #2) > have tried: > else if (IS_LVDS(intel_sdvo_connector)) > ret = intel_sdvo->sdvo_lvds_fixed_mode ? connector_status_connected : > connector_status_disconnected; > > doesn't work! I'm thinking the problem is that we call .detect() before .get_modes(), so the first time around sdvo_lvds_fixed_mode isn't there yet.
(In reply to Chris Wilson from comment #3) > After fixing the typo, you also need: > > > + intel_sdvo_get_lvds_modes(connector); > return true; > > err: > > That should then be equivalent to always setting the LVDS as connected. that works! Many thanks. For the non-i915-expert: is this a workaround or a fix?
It is a fix for some assumptions we make through the LVDS detection and mode retrieval - in return it bakes in another assumption that the LVDS is connected for the lifetime of the driver. It's another fairly safe assumption - though boards do exist that may break it (but those tend to be hardware development boards, and we can document the workaround for our assumptions as they will affect only a very small minority). Thank you for your testing.
Assigning to Chris for patch submission ...
Created attachment 128161 [details] drm/i915/sdvo: Fix LVDS connector status detection I think I've worked through all the associated issues here.
(In reply to Chris Wilson from comment #8) > Created attachment 128161 [details] > drm/i915/sdvo: Fix LVDS connector status detection > > I think I've worked through all the associated issues here. Wilhelm, please try Chris' patch on top of a recent kernel and report back.
(In reply to Jani Nikula from comment #9) > (In reply to Chris Wilson from comment #8) > > Created attachment 128161 [details] > > drm/i915/sdvo: Fix LVDS connector status detection > > > > I think I've worked through all the associated issues here. > > Wilhelm, please try Chris' patch on top of a recent kernel and report back. Jani, I don't have access to this machine right now, so it might take a while for the test and the report.
Resolved moved, we have another report at fdo bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63172 Wilhelm, we would still appreciate the testing of Chris' patch.
Created attachment 162761 [details] kernel-trace after applying patch
(In reply to Jani Nikula from comment #11) > Resolved moved, we have another report at fdo bugzilla: > https://bugs.freedesktop.org/show_bug.cgi?id=63172 > > Wilhelm, we would still appreciate the testing of Chris' patch. Jani, I tested against a 3.14.12-rt9-2.44-desktop based on a vanilla kernel and patched with a PREEMPT-RT-Patch. This patch does NOT affect "intel_lvds.c". I applied Chris' patch but that does not work. Find attached the kernel log. I have this machine available another week and can do tests.
I am having the exact same problem on a gentoo-3.10.25 system. I tried the patch, but it did not work. Are there any further information about this?
Long time no updates (apart from Mike's comment #14 about v3.10). Closing. If the problem persists with latest kernels, please file a bug at the freedesktop.org bugzilla [1], referencing this bug. Thank you. [1] https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel