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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53912C761A6 for ; Fri, 31 Mar 2023 19:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbjCaT0K (ORCPT ); Fri, 31 Mar 2023 15:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbjCaT0J (ORCPT ); Fri, 31 Mar 2023 15:26:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB7B82031B for ; Fri, 31 Mar 2023 12:26:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F7C1B831E4 for ; Fri, 31 Mar 2023 19:26:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7817C433D2; Fri, 31 Mar 2023 19:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680290766; bh=WJa543mJSNyYTJR5QsnsryEXbOodqYiasEk9BWyWloU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=r/6d7R3olffPU3rvYXycgGgKeEB6ocEuoYlw4n8rOVjAL+COGgXA8vtySTFrq859w NSv0tlhVZpkgzF/CMtvbm3KZ1YS1BwqCsFpb38d8lKDwz/mvIS8ua7ezZNtiyLIwWC ytESu8H3ggInyt2ZSegVXdCs+fnQiNLCUJpVOK8TCZ7HFsTvwOmoBfoObK13WU6Q95 0rsWza0pVrusUeYEKNha2EXRxTjS+0SgBRVhnjIeS88RPVjHYsNX84lscrE9mOLFPx QBDh0uxB+VkchjiW/C74lNPT+w2gvuLmavMCHGBdOfV0UY039SXfFRcidwMFTIB8b+ jER7ny4AXwpVg== Date: Fri, 31 Mar 2023 14:26:04 -0500 From: Bjorn Helgaas To: Stanislaw Gruszka Cc: dri-devel@lists.freedesktop.org, Oded Gabbay , Jacek Lawrynowicz , Jeffrey Hugo , linux-pci@vger.kernel.org, Karol Wachowski Subject: Re: [PATCH] accel/ivpu: Remove D3hot delay for Meteorlake Message-ID: <20230331192604.GA3246007@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230331114027.2803100-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Fri, Mar 31, 2023 at 01:40:27PM +0200, Stanislaw Gruszka wrote: > From: Karol Wachowski > > VPU on MTL has hardware optimizations and does not require 10ms > D0 - D3hot transition delay imposed by PCI specification. PCIe r6.0, sec 5.9. > The delay removal is traditionally done by adding PCI ID to > quirk_remove_dhot_delay() in drivers/pci/quirks.c . But since quirk_remove_d3hot_delay() > we do not need that optimization before driver probe and we > can better specify in the ivpu driver on what (future) hardware > use the optimization, we do not use quirk_remove_dhot_delay() Again. > for that. > > Signed-off-by: Karol Wachowski > Signed-off-by: Stanislaw Gruszka > --- > drivers/accel/ivpu/ivpu_drv.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c > index 3be4a5a2b07a..cf9925c0a8ad 100644 > --- a/drivers/accel/ivpu/ivpu_drv.c > +++ b/drivers/accel/ivpu/ivpu_drv.c > @@ -442,6 +442,10 @@ static int ivpu_pci_init(struct ivpu_device *vdev) > /* Clear any pending errors */ > pcie_capability_clear_word(pdev, PCI_EXP_DEVSTA, 0x3f); > > + /* VPU MTL does not require PCI spec 10m D3hot delay */ > + if (ivpu_is_mtl(vdev)) > + pdev->d3hot_delay = 0; d3hot_delay is used after a D0->D3hot transition, after a D3hot->D0 transition, and after the D0->D3hot and D3hot->D0 transitions in pci_pm_reset(). I assume this device can tolerate removing *all* of those delays, right? > ret = pcim_enable_device(pdev); > if (ret) { > ivpu_err(vdev, "Failed to enable PCI device: %d\n", ret); > -- > 2.25.1 >