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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4C554C4321E for ; Mon, 14 Feb 2022 08:44:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B05C710E22F; Mon, 14 Feb 2022 08:44:00 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id EFAC110E322; Mon, 14 Feb 2022 06:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644819784; x=1676355784; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ogk0u9WIs4rRYT5evD6jDJdiJEu7Wt/pIAhA9485lVQ=; b=ethgj9uOKOmh/Vur01mgsf50XYwrm/5NhDSoNQdEzfoOJdRS6YhSllQq dftO26JQn2VppFKqD2PXoC/XeAZMAymCoUgobe4STqZGxs8TN30I/hFgi rq8AujnNN8OCpwIvxXYwe7SqofXDfz0U3Kf90TnLIo9OAFUKCPn0f+2Mn Pzk1em5WLCeIk8Wo6Wj2IGy6hnRVaiKqScP+7d2AbCFhdMcd6vZKOiv6k qVDFr0WujmarjI0uerfBuF5jwBau4bi0xWZTwhjllcsaHAZMEYKn3RsHh 6emCDolp3UwFlRd2xJ7maOKqVbbNrm4dnbL1n6YkJR9O3MGO0Q/zHjM9F A==; X-IronPort-AV: E=McAfee;i="6200,9189,10257"; a="230662342" X-IronPort-AV: E=Sophos;i="5.88,367,1635231600"; d="scan'208";a="230662342" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2022 22:23:03 -0800 X-IronPort-AV: E=Sophos;i="5.88,367,1635231600"; d="scan'208";a="527922292" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2022 22:22:59 -0800 Received: by lahna (sSMTP sendmail emulation); Mon, 14 Feb 2022 08:22:56 +0200 Date: Mon, 14 Feb 2022 08:22:56 +0200 From: Mika Westerberg To: Lukas Wunner Subject: Re: [PATCH v2 3/9] PCI: drop `is_thunderbolt` attribute Message-ID: References: <20220210224329.2793-1-mario.limonciello@amd.com> <20220210224329.2793-4-mario.limonciello@amd.com> <20220213083928.GB23572@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220213083928.GB23572@wunner.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Mailman-Approved-At: Mon, 14 Feb 2022 08:43:42 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Jamet , "open list:PCI SUBSYSTEM" , "open list:DRM DRIVERS" , "open list:THUNDERBOLT DRIVER" , Yehezkel Bernat , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:X86 PLATFORM DRIVERS" , Andreas Noever , Mario Limonciello , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Bjorn Helgaas , Alexander.Deucher@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Hi, On Sun, Feb 13, 2022 at 09:39:28AM +0100, Lukas Wunner wrote: > On Fri, Feb 11, 2022 at 12:23:51PM +0200, Mika Westerberg wrote: > > On Thu, Feb 10, 2022 at 04:43:23PM -0600, Mario Limonciello wrote: > > > @@ -2955,7 +2955,7 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) > > > return true; > > > > > > /* Even the oldest 2010 Thunderbolt controller supports D3. */ > > > - if (bridge->is_thunderbolt) > > > + if (dev_is_removable(&bridge->dev)) > > > > For this, I'm not entirely sure this is what we want. The purpose of > > this check is to enable port power management of Apple systems with > > Intel Thunderbolt controller and therefore checking for "removable" here > > is kind of misleading IMHO. > [...] > > and then make a quirk in quirks.c that adds the software node property > > for the Apple systems? Or something along those lines. > > Honestly, that feels wrong to me. > > There are non-Apple products with Thunderbolt controllers, > e.g. Supermicro X10SAT was a Xeon board with Redwood Ridge > which was introduced in 2013. This was way before Microsoft > came up with the HotPlugSupportInD3 property. It was also way > before the 2015 BIOS cut-off date that we use to disable > power management on older boards. > > Still, we currently whitelist the Thunderbolt ports on that > board for D3 because we know it works. What if products like > this one use their own power management scheme and we'd cause > a power regression if we needlessly disable D3 for them now? All the non-Apple Thunderbolt products before "HotPlugSupportInD3" use ACPI "assisted" hotplug which means all the PM is done in the BIOS. Essentially it means the controller is only present if there is anything connected and in that case it is always in D0. Unplugging the device makes the controller to be hot-removed (ACPI hotplug) too and that's the only way early Thunderbolt used to save energy.