From patchwork Fri Mar 31 11:40:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 13195844 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 4E4C0C76196 for ; Fri, 31 Mar 2023 11:41:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 97EB110F1FB; Fri, 31 Mar 2023 11:40:59 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id C11F310F1FB for ; Fri, 31 Mar 2023 11:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680262855; x=1711798855; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jjEGGgPz0GbhYtDqC8L4hcYvpxXr/OTr+haqh4WY0n4=; b=O40P9UfQUPQsqWsVfB0ljkfttW5FyJOQJmZ0Pvc8aCu1mYo8Kj7vn8/u khP/9Vxa/2cvqg+4zNPepkG4k967IsrT4SJory+zVaLmmpavMKAVcijUv zx3I637FykWNtf6dcrdx4AUEEU9zwMoohKZjQSrttKcKeeDaGrHewqFQx Hy6ypOxirc6Miseit6BkBSZ61Fr/P69gbaquGFLMfTKEoHXJ2JRQFW4Jc fpmO7nnU9YvJSfYrzTirqDqkZDDxB+zOH/sgX8Yfvq4gcMqHCThbji1Mf kDbO8uSHoU+3M97tnwjO4a9lNAtFcGOyNbG3Cyy20MJr6u22BjlAZXfNP g==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="406442480" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="406442480" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 04:40:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="754389702" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="754389702" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 04:40:53 -0700 From: Stanislaw Gruszka To: dri-devel@lists.freedesktop.org Subject: [PATCH] accel/ivpu: Remove D3hot delay for Meteorlake Date: Fri, 31 Mar 2023 13:40:27 +0200 Message-Id: <20230331114027.2803100-1-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: Jeffrey Hugo , Karol Wachowski , linux-pci@vger.kernel.org, Oded Gabbay , Stanislaw Gruszka , Jacek Lawrynowicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Karol Wachowski VPU on MTL has hardware optimizations and does not require 10ms D0 - D3hot transition delay imposed by PCI specification. The delay removal is traditionally done by adding PCI ID to quirk_remove_dhot_delay() in drivers/pci/quirks.c . But since 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() 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; + ret = pcim_enable_device(pdev); if (ret) { ivpu_err(vdev, "Failed to enable PCI device: %d\n", ret);