Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp654375ybl; Wed, 28 Aug 2019 03:25:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT+YN47kV4eFuiXO2uIf4iX5dbFNX6aVwgssPbhvkZbwyyckML8+U3bOxg3+PzFOGtQuxI X-Received: by 2002:a17:90a:2ecb:: with SMTP id h11mr3427037pjs.108.1566987926321; Wed, 28 Aug 2019 03:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566987926; cv=none; d=google.com; s=arc-20160816; b=Osv5oJ1RX7svDROk5TOXlQZ3ZWMs66vbK5/CEDyaKIq4fs4cNA1zQvKQt507o+8DRb n/K+Xa6fyErLcDCBz4jfqHtwkbLi1hUeS/8JkCOm1lwATtq94bF+2po/y5Wz9LAxt1M+ qos7CIjrgNnWldOsAOOpU+vCcqsqqVjao20upNwfeQWPAKx+r28Ao9RyRqyd5Ky3KSTj IncM95/t/L0/LntwCy/f2TcOFj8hF13Y+owlmIRBZpoeIxwsQvRBoMIx58qWWNLVxhSN 4IYl52z84Zer2YxMZP73nO5MbTETl+M8d9/H5dHLhZtFABgtpC8t+NZOKd4tv9Eyg1nR 9uQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PSXDwYwHf63pOEA7+EKA01HzEUmzFydvSjnmjGQpufE=; b=wOie5+a5lkKHmify6DAtO0fAy/vlQR1+mTTahAyS66iCXxqYATpQ6Cl9rALYKOPjq0 iAy1FIp0cop1lVD7Em+mTKi3MEkze8NHtxB+Tx4x9e/ecv6dHe8jOBSy0IKld0cbchxr 4xB7ClGWUDjfUXvyN/m4v/jnOqmc4ejVsy8VCCGvCUjbyCxVUhmurLcE2NofZDTZ0i3Z Mru/eOzbxCWww3hm1TFau5xOD7ATK/Sj0iDh1WYU2fmCAFmWK7VqyZKGgykhp9jgl5YO 45hl/tU9qe7L8b4wunQveaPEpB3Q7Qd7M/unl07xfEQD+ydfXir8ioSgGEJGqOk/kDAY C6KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r200si1796491pgr.518.2019.08.28.03.25.10; Wed, 28 Aug 2019 03:25:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726571AbfH1KXq (ORCPT + 99 others); Wed, 28 Aug 2019 06:23:46 -0400 Received: from mga11.intel.com ([192.55.52.93]:28774 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfH1KXp (ORCPT ); Wed, 28 Aug 2019 06:23:45 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2019 03:23:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,440,1559545200"; d="scan'208";a="197526412" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 28 Aug 2019 03:23:43 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 28 Aug 2019 13:23:42 +0300 Date: Wed, 28 Aug 2019 13:23:42 +0300 From: Mika Westerberg To: Brad Campbell Cc: linux-kernel@vger.kernel.org, michael.jamet@intel.com, YehezkelShB@gmail.com Subject: Re: Thunderbolt DP oddity on v5.2.9 on iMac 12,2 Message-ID: <20190828102342.GT3177@lahna.fi.intel.com> References: <472bee84-d62b-bfcb-eb83-db881165756b@fnarfbargle.com> <20190828073302.GO3177@lahna.fi.intel.com> <7c9474d2-d948-4d1d-6f7b-94335b8b1f15@fnarfbargle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c9474d2-d948-4d1d-6f7b-94335b8b1f15@fnarfbargle.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 05:12:00PM +0800, Brad Campbell wrote: > On 28/8/19 3:33 pm, Mika Westerberg wrote: > > On Wed, Aug 28, 2019 at 03:09:07PM +0800, Brad Campbell wrote: > > > G'day All, > > > > Hi, > > > > > 5.2 is the first kernel that ha/thunderbolt > > s allowed me to use 2 Apple Thunderbolt > > > display on a 2011 vintage iMac. Awesome work and many thanks! > > > > > > I boot this machine in BIOS (Bootcamp) mode as that gave me brightness > > > control over the internal panel. > > > > > > I've been using it with a Thunderbolt display and a standard DVI display > > > since 2012 as the Apple firmware would only set up a single Thunderbolt > > > display at bootup. Didn't find that out until I'd bought a second one and > > > kept it around as a spare. > > > > > > When I saw the changelog for 5.2 I thought I'd see if it would run 2 > > > Thnunderbolt displays, and it does after a minor fiddle. I have tried this > > > with the Kanex adapter unplugged just for completeness. No change. > > > > > > When I boot the machine it picks up both displays : > > > > > > [ 1.072080] thunderbolt 0-1: new device found, vendor=0x1 device=0x8002 > > > [ 1.072086] thunderbolt 0-1: Apple, Inc. Thunderbolt Display > > > [ 1.392076] random: crng init done > > > [ 1.595609] thunderbolt 0-3: new device found, vendor=0x1 device=0x8002 > > > [ 1.595615] thunderbolt 0-3: Apple, Inc. Thunderbolt Display > > > [ 1.905117] thunderbolt 0-303: new device found, vendor=0xa7 device=0x4 > > > [ 1.905121] thunderbolt 0-303: Kanex Thunderbolt to eSATA+USB3.0 Adapter > > > [ 1.910098] thunderbolt 0000:07:00.0: 0:c: path does not end on a DP > > > adapter, cleaning up > > > > > > Display 0-3 works. Display 0-1 remains blank. > > > > > > If I unplug 0-1 and re-plug it, it is detected and comes up perfectly. > > > > Can you add "thunderbolt.dyndbg" to the kernel command line and > > reproduce this? That gives bit more information what might be happening. > > dmesg.03 attached. > > > I'm suspecting that the boot firmware does configure second DP path also > > and we either fail to discover it properly or the boot firmware fails to > > set it up. > > > > Also if you boot with one monitor connected and then connect another > > (when the system is up) does it work then? > > Umm.. so this is where it gets weird. No it doesn't. Apparently it fails to > configure the first monitor it finds. This is the one the Apple bootcamp > firmware configures at boot. > > So if I disconnect 0-1 and boot up, it detects 0-3 but it doesn't work (same > way 0-1 doesn't work). A plug-unplug brings that up and then plugging in 0-1 > brings that up too. > > I then did a few swapsies trying to get the heads in the right order and > gave up and rebooted. > > This is in dmesg.4 attached. > > dmesg.3 is the straight boot with dyndbg enabled and both heads plugged in. > dmesg.4 is with 0-3 plugged in only. It comes up dead and then I play > swapsies getting things working. > > Took me a while to figure out I didn't have CONFIG_DYNAMIC_DEBUG in the > kernel. Right, I should have mentioned that. Apart from the warning in the log (which is not fatal, I'll look into it) to me the second path setup looks fine. Can you do one more experiment? Boot the system up without anything connected and then plug both monitors. Does it work?