From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFD86C33CA2 for ; Thu, 9 Jan 2020 21:26:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3D5C2077C for ; Thu, 9 Jan 2020 21:26:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="etfhccQA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3D5C2077C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C2DF76E96E; Thu, 9 Jan 2020 21:26:24 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68F4E6E96E; Thu, 9 Jan 2020 21:26:23 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pk3CeaVWVpdEobKh7ETwmjVZkeFQHmPhkJjM+Efr7H+Jm1+dBwviMNMQ/ZYSkObXJHB9fA+vd4qzS4NAljLLO4lui3k3VEItoIgJX+OKVlYWL+hHPajANWn5OxYAfW7NcIXs6hR2BmJQpcKBvyqCt6BKJyjHqNi8mdInPaBz4Fc/dOjkJEOpcJsmeRZ12EE8bkwE2LiICYpsujPeSPkZrcgevsloz6UeR0MvDbIqwhFYrVZ+M/1Q0tKY9JuLn49DFn/L/UArvT4884D7Na0CExXJXDCyBuY/UWVS+f9j3D6/1yAgFgkT/oz/G/UdQ9WsEdJB6oerTpvQCEYqgMabGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OvNhci6tWBZltRIsxH9vrCmkKIy8HBbQWDvX68bKbz4=; b=Cic3vsYuX6jV84udmSq8oKihBizAGvdDLeCg7d46mUpIrlc9T+9NUE5pcYRq0OvgX81SZsWFzo3l/JkVjn0hfMt0lv//T4OGVlBB3j8v4rHYoem2gTqIYIzzGj6llfsl97pJbH4EAl2aqeQmmxZ4zwp8EGy+Y5lntg5hBnZ0gtmiwqR7bfxwE02LRP/OZIIiofuLfkhOfrf566jJqKAlUVW47YyGTy/VklQwzjLvP1WORPvRGFW65bEkPm5q5xlC0pP2jteihBNJnRhYUdzevSNHkoxHeZObMO4/KUjQlbykPJ9He73V4EtxqqERyM9VwPTgp+/mfchgzQ3vatJ+5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OvNhci6tWBZltRIsxH9vrCmkKIy8HBbQWDvX68bKbz4=; b=etfhccQAi1rmIgAArcdL7BtVnxOx2i6Sn/m93EfT1ZAUQRYBWwRYvYVBl4uteolZow9gr2UKNwxNGVmWSfAkrc2Agd3p6gpZV+uXAhEqhr23LfP5cTzUqvysw1ih8KF+dZhSxj851RnlQr9RFbIu9RAg1WvFsuEccwQPPu1/etU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from CY4PR1201MB0230.namprd12.prod.outlook.com (10.172.79.7) by CY4PR1201MB2535.namprd12.prod.outlook.com (10.172.121.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Thu, 9 Jan 2020 21:26:21 +0000 Received: from CY4PR1201MB0230.namprd12.prod.outlook.com ([fe80::4c09:215c:e5d2:3c8f]) by CY4PR1201MB0230.namprd12.prod.outlook.com ([fe80::4c09:215c:e5d2:3c8f%9]) with mapi id 15.20.2602.016; Thu, 9 Jan 2020 21:26:21 +0000 Subject: Re: [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array. To: Mario Kleiner , Alex Deucher , Harry Wentland References: <20200109150752.28098-1-mario.kleiner.de@gmail.com> From: Harry Wentland Autocrypt: addr=hwentlan@amd.com; keydata= mQENBFhb4C8BCADhHHUNoBQ7K7LupCP0FsUb443Vuqq+dH0uo4A3lnPkMF6FJmGcJ9Sbx1C6 cd4PbVAaTFZUEmjqfpm+wCRBe11eF55hW3GJ273wvfH69Q/zmAxwO8yk+i5ZWWl8Hns5h69K D9QURHLpXxrcwnfHFah0DwV23TrD1KGB7vowCZyJOw93U/GzAlXKESy0FM7ZOYIJH83X7qhh Q9KX94iTEYTeH86Wy8hwHtqM6ySviwEz0g+UegpG8ebbz0w3b5QmdKCAg+eZTmBekP5o77YE BKqR+Miiwo9+tzm2N5GiF9HDeI2pVe/egOLa5UcmsgdF4Y5FKoMnBbAHNaA6Fev8PHlNABEB A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/0tTF7oav1lzPGfeW2c6B700FFZMTR4YBVSGE8jPIzu2Fj0E8EkDmsgS+nibqSvWXfo1v231 410h35CjbYDlYQO7Z1YD7asqbaOnF0As+rckyRMweQ9CxZn5+YBijtPJA3x5ldbCfQ9rWiTu XQ== Message-ID: Date: Thu, 9 Jan 2020 16:26:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 In-Reply-To: Content-Language: en-US X-ClientProxiedBy: YTOPR0101CA0063.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:14::40) To CY4PR1201MB0230.namprd12.prod.outlook.com (2603:10b6:910:1e::7) MIME-Version: 1.0 Received: from [10.4.33.74] (165.204.55.251) by YTOPR0101CA0063.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:14::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9 via Frontend Transport; Thu, 9 Jan 2020 21:26:21 +0000 X-Originating-IP: [165.204.55.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 97905d00-3fa7-4884-7d7d-08d7954a9286 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2535:|CY4PR1201MB2535: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 02778BF158 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(366004)(136003)(346002)(39860400002)(189003)(199004)(81156014)(81166006)(6636002)(316002)(2906002)(8936002)(6486002)(4326008)(478600001)(16576012)(8676002)(36756003)(16526019)(52116002)(2616005)(33964004)(31686004)(956004)(66946007)(66476007)(53546011)(66556008)(31696002)(5660300002)(186003)(110136005)(26005)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB2535; H:CY4PR1201MB0230.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Dm+6e/AkjVG9O3SMJ4MJ7vRsbJ+fvI3rHYl3HnUUtSu1Vua6VeYqj8C0YJQvyNasDsCiRdplhZ3uILjgpv7Edcl6sI8FB0lujyvQSBEqC/JIDOoeYym2KDQiPUSDcs6G2rn9fr0darHoKwFFHSkRJHLRAwDw6bMLO8W22g36iQCYu9FQSG8xrMHcMOXFRLyaMK5Q6tVdQSN/9SVyFvg8+B9eVqV+ff07459h7H3Au28RHUomjG0oWDeoBGtNWEJ8DqP9ffRPWxWkblfT8QZMkcRj5IQhdOHcAaNBfQ39PVLa+FxXpc4AQHCgpBGh7NzGTqESueXmQTHp0H0IDasMRs6bXl/ti2Tbeuf8Xv9THOrmXD6oWjSqROz2psBpsRHl2PpNetDbQ11MU7NAme3yfiRDc42pYDSyPCZQ3mpkd7YvuqfNV377MI2sVX0AMwY X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97905d00-3fa7-4884-7d7d-08d7954a9286 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2020 21:26:21.6179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BoyPFMmYbZ93WhBuyQuQfCRJB+j02q2Btlvi3CYyfNpViKpIOXdBn8KXHD4+TK1cAFV/FnZhGh6WvpWjvRrrxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2535 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mario.kleiner.de@gmail.de, Intel Graphics Development , Maling list - DRI developers , Daniel Vetter Content-Type: multipart/mixed; boundary="===============1818409056==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1818409056== Content-Type: multipart/alternative; boundary="------------233C9ABD89B05595E9630594" Content-Language: en-US --------------233C9ABD89B05595E9630594 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2020-01-09 4:04 p.m., Mario Kleiner wrote: > On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher > wrote: > > On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner > > > wrote: > > > > On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher > > wrote: > >> > >> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner > >> > wrote: > >> > > As Harry mentioned in the other thread, won't this only work if the= > display was brought up by the vbios?=C2=A0 In the suspend/resume ca= se, > won't we just fall back to 2.7Gbps? > > Alex > > > Adding Harry to cc... > > The code is only executed for eDP. On the Intel side, it seems that > intel_edp_init_dpcd() gets only called during driver load / > modesetting init, so not on resume. > > On the AMD DC side, dc_link_detect_helper() has this early no-op > return at the beginning: > > if ((link->connector_signal =3D=3D SIGNAL_TYPE_LVDS || > link->connector_signal =3D=3D SIGNAL_TYPE_EDP) && > link->local_sink) > return true; > > So i guess if link->local_sink doesn't get NULL'ed during a > suspend/resume cycle, then we never reach the setup code that would > overwrite with non vbios settings? > > Sounds reasonable to me, given that eDP panels are usually fixed > internal panels, nothing that gets hot(un-)plugged? > > I can't test, because suspend/resume with the Polaris gpu on the MBP > 2017 is totally broken atm., just as vgaswitcheroo can't do its job. > Looks like powering down the gpu works, but powering up doesn't. And > also modesetting at vgaswitcheroo switch time is no-go, because the > DDC/AUX lines apparently can't be switched on that Apple gmux, and > handover of that data seems to be not implemented in current > vgaswitcheroo. At the moment switching between AMD only or Intel+AMD > Prime setup is quite a pita... > I haven't followed the entire discussion on the i915 thread but for the amdgpu dc patch I would prefer a DPCD quirk to override the reported link settings with the correct link rate. Harry > -mario > > --------------233C9ABD89B05595E9630594 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 2020-01-09 4:04 p.m., Mario Kleiner wrote:
On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher <alexdeucher@gmail.com> wrote:
On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner
<mario.kleiner.de@gmail.com> wrote:
>
> On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner
>> <mario.kleiner.de@gmail.com> wrote:
>> >
As Harry mentioned in the other thread, won't this only work if the
display was brought up by the vbios?  In the suspend/resume case,
won't we just fall back to 2.7Gbps?

Alex


Adding Harry to cc...

The code is only executed for eDP. On the Intel side, it seems that intel_edp_init_dpcd() gets only called during driver load / modesetting init, so not on resume.

On the AMD DC side, dc_link_detect_helper() has this early no-op return at the beginning:

if ((link->connector_signal == SIGNAL_TYPE_LVDS ||
			link->connector_signal == SIGNAL_TYPE_EDP) &&
			link->local_sink)
		return true;

So i guess if link->local_sink doesn't get NULL'ed during a suspend/resume cycle, then we never reach the setup code that would overwrite with non vbios settings?

Sounds reasonable to me, given that eDP panels are usually fixed internal panels, nothing that gets hot(un-)plugged?

I can't test, because suspend/resume with the Polaris gpu on the MBP 2017 is totally broken atm., just as vgaswitcheroo can't do its job. Looks like powering down the gpu works, but powering up doesn't. And also modesetting at vgaswitcheroo switch time is no-go, because the DDC/AUX lines apparently can't be switched on that Apple gmux, and handover of that data seems to be not implemented in current vgaswitcheroo. At the moment switching between AMD only or Intel+AMD Prime setup is quite a pita...


I haven't followed the entire discussion on the i915 thread but for the amdgpu dc patch I would prefer a DPCD quirk to override the reported link settings with the correct link rate.

Harry

-mario



--------------233C9ABD89B05595E9630594-- --===============1818409056== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1818409056==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F1F8C282DD for ; Fri, 10 Jan 2020 17:51:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 364522072E for ; Fri, 10 Jan 2020 17:51:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="etfhccQA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 364522072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB2DD6EA75; Fri, 10 Jan 2020 17:51:51 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68F4E6E96E; Thu, 9 Jan 2020 21:26:23 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pk3CeaVWVpdEobKh7ETwmjVZkeFQHmPhkJjM+Efr7H+Jm1+dBwviMNMQ/ZYSkObXJHB9fA+vd4qzS4NAljLLO4lui3k3VEItoIgJX+OKVlYWL+hHPajANWn5OxYAfW7NcIXs6hR2BmJQpcKBvyqCt6BKJyjHqNi8mdInPaBz4Fc/dOjkJEOpcJsmeRZ12EE8bkwE2LiICYpsujPeSPkZrcgevsloz6UeR0MvDbIqwhFYrVZ+M/1Q0tKY9JuLn49DFn/L/UArvT4884D7Na0CExXJXDCyBuY/UWVS+f9j3D6/1yAgFgkT/oz/G/UdQ9WsEdJB6oerTpvQCEYqgMabGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OvNhci6tWBZltRIsxH9vrCmkKIy8HBbQWDvX68bKbz4=; b=Cic3vsYuX6jV84udmSq8oKihBizAGvdDLeCg7d46mUpIrlc9T+9NUE5pcYRq0OvgX81SZsWFzo3l/JkVjn0hfMt0lv//T4OGVlBB3j8v4rHYoem2gTqIYIzzGj6llfsl97pJbH4EAl2aqeQmmxZ4zwp8EGy+Y5lntg5hBnZ0gtmiwqR7bfxwE02LRP/OZIIiofuLfkhOfrf566jJqKAlUVW47YyGTy/VklQwzjLvP1WORPvRGFW65bEkPm5q5xlC0pP2jteihBNJnRhYUdzevSNHkoxHeZObMO4/KUjQlbykPJ9He73V4EtxqqERyM9VwPTgp+/mfchgzQ3vatJ+5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OvNhci6tWBZltRIsxH9vrCmkKIy8HBbQWDvX68bKbz4=; b=etfhccQAi1rmIgAArcdL7BtVnxOx2i6Sn/m93EfT1ZAUQRYBWwRYvYVBl4uteolZow9gr2UKNwxNGVmWSfAkrc2Agd3p6gpZV+uXAhEqhr23LfP5cTzUqvysw1ih8KF+dZhSxj851RnlQr9RFbIu9RAg1WvFsuEccwQPPu1/etU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Harry.Wentland@amd.com; Received: from CY4PR1201MB0230.namprd12.prod.outlook.com (10.172.79.7) by CY4PR1201MB2535.namprd12.prod.outlook.com (10.172.121.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Thu, 9 Jan 2020 21:26:21 +0000 Received: from CY4PR1201MB0230.namprd12.prod.outlook.com ([fe80::4c09:215c:e5d2:3c8f]) by CY4PR1201MB0230.namprd12.prod.outlook.com ([fe80::4c09:215c:e5d2:3c8f%9]) with mapi id 15.20.2602.016; Thu, 9 Jan 2020 21:26:21 +0000 To: Mario Kleiner , Alex Deucher , Harry Wentland References: <20200109150752.28098-1-mario.kleiner.de@gmail.com> From: Harry Wentland Autocrypt: addr=hwentlan@amd.com; keydata= mQENBFhb4C8BCADhHHUNoBQ7K7LupCP0FsUb443Vuqq+dH0uo4A3lnPkMF6FJmGcJ9Sbx1C6 cd4PbVAaTFZUEmjqfpm+wCRBe11eF55hW3GJ273wvfH69Q/zmAxwO8yk+i5ZWWl8Hns5h69K D9QURHLpXxrcwnfHFah0DwV23TrD1KGB7vowCZyJOw93U/GzAlXKESy0FM7ZOYIJH83X7qhh Q9KX94iTEYTeH86Wy8hwHtqM6ySviwEz0g+UegpG8ebbz0w3b5QmdKCAg+eZTmBekP5o77YE BKqR+Miiwo9+tz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G4XvQNO+XXGY55MrmhoNqMaeIa/3Jas54fPVd5olcnUAyDty29/VWXNllUq38iBCX /0tTF7oav1lzPGfeW2c6B700FFZMTR4YBVSGE8jPIzu2Fj0E8EkDmsgS+nibqSvWXfo1v231 410h35CjbYDlYQO7Z1YD7asqbaOnF0As+rckyRMweQ9CxZn5+YBijtPJA3x5ldbCfQ9rWiTu XQ== Message-ID: Date: Thu, 9 Jan 2020 16:26:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 In-Reply-To: Content-Language: en-US X-ClientProxiedBy: YTOPR0101CA0063.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:14::40) To CY4PR1201MB0230.namprd12.prod.outlook.com (2603:10b6:910:1e::7) MIME-Version: 1.0 Received: from [10.4.33.74] (165.204.55.251) by YTOPR0101CA0063.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:14::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9 via Frontend Transport; Thu, 9 Jan 2020 21:26:21 +0000 X-Originating-IP: [165.204.55.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 97905d00-3fa7-4884-7d7d-08d7954a9286 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2535:|CY4PR1201MB2535: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 02778BF158 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(366004)(136003)(346002)(39860400002)(189003)(199004)(81156014)(81166006)(6636002)(316002)(2906002)(8936002)(6486002)(4326008)(478600001)(16576012)(8676002)(36756003)(16526019)(52116002)(2616005)(33964004)(31686004)(956004)(66946007)(66476007)(53546011)(66556008)(31696002)(5660300002)(186003)(110136005)(26005)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB2535; H:CY4PR1201MB0230.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Dm+6e/AkjVG9O3SMJ4MJ7vRsbJ+fvI3rHYl3HnUUtSu1Vua6VeYqj8C0YJQvyNasDsCiRdplhZ3uILjgpv7Edcl6sI8FB0lujyvQSBEqC/JIDOoeYym2KDQiPUSDcs6G2rn9fr0darHoKwFFHSkRJHLRAwDw6bMLO8W22g36iQCYu9FQSG8xrMHcMOXFRLyaMK5Q6tVdQSN/9SVyFvg8+B9eVqV+ff07459h7H3Au28RHUomjG0oWDeoBGtNWEJ8DqP9ffRPWxWkblfT8QZMkcRj5IQhdOHcAaNBfQ39PVLa+FxXpc4AQHCgpBGh7NzGTqESueXmQTHp0H0IDasMRs6bXl/ti2Tbeuf8Xv9THOrmXD6oWjSqROz2psBpsRHl2PpNetDbQ11MU7NAme3yfiRDc42pYDSyPCZQ3mpkd7YvuqfNV377MI2sVX0AMwY X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97905d00-3fa7-4884-7d7d-08d7954a9286 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2020 21:26:21.6179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BoyPFMmYbZ93WhBuyQuQfCRJB+j02q2Btlvi3CYyfNpViKpIOXdBn8KXHD4+TK1cAFV/FnZhGh6WvpWjvRrrxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2535 X-Mailman-Approved-At: Fri, 10 Jan 2020 17:51:44 +0000 Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mario.kleiner.de@gmail.de, Intel Graphics Development , Maling list - DRI developers , Daniel Vetter Content-Type: multipart/mixed; boundary="===============0169269336==" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --===============0169269336== Content-Type: multipart/alternative; boundary="------------233C9ABD89B05595E9630594" Content-Language: en-US --------------233C9ABD89B05595E9630594 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2020-01-09 4:04 p.m., Mario Kleiner wrote: > On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher > wrote: > > On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner > > > wrote: > > > > On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher > > wrote: > >> > >> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner > >> > wrote: > >> > > As Harry mentioned in the other thread, won't this only work if the= > display was brought up by the vbios?=C2=A0 In the suspend/resume ca= se, > won't we just fall back to 2.7Gbps? > > Alex > > > Adding Harry to cc... > > The code is only executed for eDP. On the Intel side, it seems that > intel_edp_init_dpcd() gets only called during driver load / > modesetting init, so not on resume. > > On the AMD DC side, dc_link_detect_helper() has this early no-op > return at the beginning: > > if ((link->connector_signal =3D=3D SIGNAL_TYPE_LVDS || > link->connector_signal =3D=3D SIGNAL_TYPE_EDP) && > link->local_sink) > return true; > > So i guess if link->local_sink doesn't get NULL'ed during a > suspend/resume cycle, then we never reach the setup code that would > overwrite with non vbios settings? > > Sounds reasonable to me, given that eDP panels are usually fixed > internal panels, nothing that gets hot(un-)plugged? > > I can't test, because suspend/resume with the Polaris gpu on the MBP > 2017 is totally broken atm., just as vgaswitcheroo can't do its job. > Looks like powering down the gpu works, but powering up doesn't. And > also modesetting at vgaswitcheroo switch time is no-go, because the > DDC/AUX lines apparently can't be switched on that Apple gmux, and > handover of that data seems to be not implemented in current > vgaswitcheroo. At the moment switching between AMD only or Intel+AMD > Prime setup is quite a pita... > I haven't followed the entire discussion on the i915 thread but for the amdgpu dc patch I would prefer a DPCD quirk to override the reported link settings with the correct link rate. Harry > -mario > > --------------233C9ABD89B05595E9630594 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 2020-01-09 4:04 p.m., Mario Kleiner wrote:
On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher <alexdeucher@gmail.com> wrote:
On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner
<mario.kleiner.de@gmail.com> wrote:
>
> On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner
>> <mario.kleiner.de@gmail.com> wrote:
>> >
As Harry mentioned in the other thread, won't this only work if the
display was brought up by the vbios?  In the suspend/resume case,
won't we just fall back to 2.7Gbps?

Alex


Adding Harry to cc...

The code is only executed for eDP. On the Intel side, it seems that intel_edp_init_dpcd() gets only called during driver load / modesetting init, so not on resume.

On the AMD DC side, dc_link_detect_helper() has this early no-op return at the beginning:

if ((link->connector_signal == SIGNAL_TYPE_LVDS ||
			link->connector_signal == SIGNAL_TYPE_EDP) &&
			link->local_sink)
		return true;

So i guess if link->local_sink doesn't get NULL'ed during a suspend/resume cycle, then we never reach the setup code that would overwrite with non vbios settings?

Sounds reasonable to me, given that eDP panels are usually fixed internal panels, nothing that gets hot(un-)plugged?

I can't test, because suspend/resume with the Polaris gpu on the MBP 2017 is totally broken atm., just as vgaswitcheroo can't do its job. Looks like powering down the gpu works, but powering up doesn't. And also modesetting at vgaswitcheroo switch time is no-go, because the DDC/AUX lines apparently can't be switched on that Apple gmux, and handover of that data seems to be not implemented in current vgaswitcheroo. At the moment switching between AMD only or Intel+AMD Prime setup is quite a pita...


I haven't followed the entire discussion on the i915 thread but for the amdgpu dc patch I would prefer a DPCD quirk to override the reported link settings with the correct link rate.

Harry

-mario



--------------233C9ABD89B05595E9630594-- --===============0169269336== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0169269336==--