From patchwork Tue Sep 24 20:35:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811157 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 AC067CF9C6B for ; Tue, 24 Sep 2024 20:42:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5151D10E741; Tue, 24 Sep 2024 20:42:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JCEynGY5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7242510E217; Tue, 24 Sep 2024 20:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210558; x=1758746558; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=spsuIZydcvj4ahqrprYkFE4JsZbL4co8qdswXnkzBLM=; b=JCEynGY5TFb4ZwGsrhNXnlk+cooSV3MpfnfXBH45FGyGPDsCaPQ4MsdP Vb9S4QkbeGJ1wz8wKZBAdyLr6YkgKLoy1dBez/TCSi3nUyPjLvFuJRggc w4aTaOe9BfEhw4ovofxknvaamUrCsLyGu+4RC264H2iPRP4gHpQG1qDqa VyoWS/EzvJFOiQaMRvWbY1HZMETbbSl0eouyEih937znS/LW3mbehAUd1 gE82oCfFhxuPPXuM5Fr7JgauySafukmfpcSsVwVD/cSSdTh793rgHVs1K XlCw+5cCoFcDULk2jX3an4APKeXVeECF78LeZ9jQk+hYP18TcwMBCAFYa g==; X-CSE-ConnectionGUID: rvF5T6hzTcmtjLRzv4Q5gQ== X-CSE-MsgGUID: sgCslxESTC2/kOeo0kiNTw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326051" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326051" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:37 -0700 X-CSE-ConnectionGUID: 6xbRhuMhQoqYJft8V7N/4A== X-CSE-MsgGUID: v4N38MhvSGC1VhVJFM8Grw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001313" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:36 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:36 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x4OxVl25z7GMmfgbqOS/1sU2G+HBOZwrTeEl2ZqaeB9DIvgRn1LFFzZ1T851eZd9hYKY291SePO1rDsh4VxHCtth3tujRyCdJSaKVpbpEy5MC7NXQpfiMHXbplcJjsmHYa3qXq/WuuSOlI8+4/203V0SBexcQh+nOhJm92/VsDA3htAUXr76SEr4xliEa8SheR7HmK0xDz4WnQxBRBlsPrgRgDQnhkAytYU1igVuDxWcCBXA0C1L6fYk/krIwTUkCBezdtDB2kbWL/1xQzhmZQAf6MY7vWTg69CrxjGDvWJK87V0w+HuNQ2fdACh9/vcyGCR3M/WpiQBslfLnGc3wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MJN1NlDrP8sxMXo/3Tn8sCfJSfMZatpwNQ4rSUTI/d4=; b=erXYZT5DnVjZ5PCC5JxZZhhmFUBYC6PgOvIY/6F/Jv6LtAHrG3Bz72mslHI0LiX11rwvDeDaL2s3nhy1LhEA/GIve+tgzs/3ZhPNs5xZB0eXR05lG3n8wEthQcTaSDwopU0RblIy+urkcDWV+5hAEztBtnaIqjCDogvtXp7uUP7wKm0B9r1xJ2Hu4+yzcmGYXa80u3hZNjfr0nYKsUT9i4jcn/C26KVSaOxiXf8Rz9rpQm4bp2zlLEJeAw2C6a9na9HqsSMSSm+3vY+lV1nDINDhPfAmrfpy166tG3K4jv1fOdXKqz7RgYTv6DoaP8ycx4M/xskTMlbk7LcsOxqu0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by BY1PR11MB8127.namprd11.prod.outlook.com (2603:10b6:a03:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23; Tue, 24 Sep 2024 20:42:33 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:32 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , Jani Nikula Subject: [PATCH 01/31] drm/i915: Remove vga and gmbus seq out of i915_restore_display Date: Tue, 24 Sep 2024 16:35:22 -0400 Message-ID: <20240924204222.246862-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0169.namprd03.prod.outlook.com (2603:10b6:303:8d::24) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|BY1PR11MB8127:EE_ X-MS-Office365-Filtering-Correlation-Id: 6809a951-bc6a-4006-88a1-08dcdcd969bd X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-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ReRZT+o2CvcIRQkhEH4YJO+rdDhVQxzG5vJkv70rHAiRW84AE9C5AjDIeUj2wubwntcCUWIt8EdBn0WtPxBYO0Z71xHDbiO3cJb+yJh7UfpzPh2rBzUDQ9XtseaVQY+Qduv93zzbXClu0MQNHxCcpLCxEBvuQM+7WKuFStO15N0QmUVV3Tsge2pXN9QXE9HS5BDvlEFsla8snk1yH3NYUbmrCcooCQ6yWVWGi/z7mudL8vaw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RpJuZL9H/LFOaYtWp9HOhaU2H3UUcrdVdbVOJn0O8hJVWw5tc0B1ovi6vdqQ+dVCX58CWxwMRRuFOMg84YRum0APQvhidc0aoVqgtUmeWiaHx44gnRQ015/tnSR2BnkmeGWs9LIVSEBVN9hG1bXjka1kICpsyPc0IZYIkWqwLdpQjvNApWMcxnzJjZepn5xUwv5AtkUeVDirnzyuX1aDm3kxmjfEOt8i1reBH/s0XbyiH1rzhhuR/Wa6+SiCC1r4RIkIa8ESKrEUDpsJc943qVnWRhWDghfpT/ytZUSyrKc6bHa7bvAEvK6qRXpCf0D/O8PwCqFpchTALip5nRDk8saWvzfXhWhSpMI2c4PdsVAKDNdDJD+qtL8bf+qWC4VsMQHWIdm49aBwKLnPznyE9fIt3VK8/nEhegl4SCS9Mtma97efLO2ZrFzqz6Qoa+f2X1BuP5CQUSWMHegAWZZ+ltJMEufxjO6yT4LHrr9Xohbk4jwYH2WGxcwo4tQxJnnD3cEjRjzUXmNmP+8lSAHLSesvl2xpsNgiWQMOF+Jo9oIrcLdH0L/0bYNptVb/6xfA8VaXZne5Cvv1gL/ow/o5oR54f+dIABRE0/mEkGwFP3C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uthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:32.4793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: siKNULqxQONUoel+qsmw49shI3zbXJ0IreL0nEMxuvvGSK3qeeeGgNHR/q7TNnF+KKkSiX2OYr66hTua9T/0hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB8127 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Restrict this function to only save and restore registers functionality. Then, that can be moved out later to under display with a proper name. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/i915_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_suspend.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 6dc0104a3e36..c5ffcf229f42 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -60,6 +60,7 @@ #include "display/intel_pch_refclk.h" #include "display/intel_pps.h" #include "display/intel_sprite_uapi.h" +#include "display/intel_vga.h" #include "display/skl_watermark.h" #include "gem/i915_gem_context.h" @@ -1167,6 +1168,11 @@ static int i915_drm_resume(struct drm_device *dev) intel_dmc_resume(display); i915_restore_display(dev_priv); + + intel_vga_redisable(display); + + intel_gmbus_reset(dev_priv); + intel_pps_unlock_regs_wa(display); intel_init_pch_refclk(dev_priv); diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 9d3d9b983032..fb67b05cd864 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -26,7 +26,6 @@ #include "display/intel_de.h" #include "display/intel_gmbus.h" -#include "display/intel_vga.h" #include "i915_drv.h" #include "i915_reg.h" @@ -118,7 +117,6 @@ void i915_save_display(struct drm_i915_private *dev_priv) void i915_restore_display(struct drm_i915_private *dev_priv) { - struct intel_display *display = &dev_priv->display; struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); if (!HAS_DISPLAY(dev_priv)) @@ -134,8 +132,4 @@ void i915_restore_display(struct drm_i915_private *dev_priv) if (GRAPHICS_VER(dev_priv) <= 4) intel_de_write(dev_priv, DSPARB(dev_priv), dev_priv->regfile.saveDSPARB); - - intel_vga_redisable(display); - - intel_gmbus_reset(dev_priv); } From patchwork Tue Sep 24 20:35:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811159 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 2B324CF9C69 for ; Tue, 24 Sep 2024 20:42:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4656F10E744; Tue, 24 Sep 2024 20:42:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TKrVxdXG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 684FF10E742; Tue, 24 Sep 2024 20:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210560; x=1758746560; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=lVQNSe9tkS4+ASTxMhSU8qds6uls0gG0AZHFsHsDm/Q=; b=TKrVxdXGd9jmTEGW3hoAzI78cs84Mh3sEG/7CfvNRq/FyRG8u+5OcBel IWWaHXheKPrW5iue1OQEOmn6epMdqcHVLLoHiKa1oqscgLgAc4PYTHXWB is5HZSqJZV4wuph90N9wp3eQW3RKyjttWf9Ugn85lwkYMZU/WKif2ZARF ILpOTmDtDjt/AWEqzH7oFHtb6KFeEW8DnEJHQbM4i2VAS4fRwBCk+HMfY 5/PFNqdKpa5US+MlMWoWLCQVU+MEnLrus5XdSVNRLhM+NHI2Opq3pRyvQ 0NmqTlRz75LE2xyeyaGvf3VF6qQNbxxq3jKY4/shxUgeeqpI3qkhk1Q4D A==; X-CSE-ConnectionGUID: 6xTQnz6sS72GmlxUM8tAHQ== X-CSE-MsgGUID: UrcxMJduTVSPIjIe0eq29A== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26051734" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26051734" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:40 -0700 X-CSE-ConnectionGUID: mCKNqyV4RC+VTWE53AmKfQ== X-CSE-MsgGUID: smPFM++3Qsuk/S5zZ8LMjQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="71160319" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:40 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:38 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:38 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:38 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J5j68f8J8tidnKADCCuu8o7pXMocpvOwrJxn883WRuyU+6lKJXKvX3WhbBLMCFTSQ/W85WPurgPD5FklGGNPgmyavmAmlJCKHSwF/GFJXVgSAJotwiLNYWxLy9ozTGLntFPh4TEZ6Vlgp9sa4AUMZ5WZ3eQjMWUDiwcLkEm0SHXrDusrCtdEOsBEzDerkxx+IVJN6wsqBQ/fycSyNz2+YCwZQXmXak7lvnrY7CMsiTrDiXzEf6Z4eTrV2f0pwP6CiVl1nvGHPds6wY6vvb2ikRRo/fH2jPRHaWdsbvOs5cAYykugq11LOuQPEVlOBt7o0iGf89buJ8Wm1ZEPrPMj5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PpL4X9W48N25Dqanlfmb+czDikahABDwE+193sHPAyI=; b=txMCRAHz7LbpV/1rrTUu5vQPEgwo14si58M24CGw3BqHbKdDpMr7iEEr54aSTQkVqxrsu//ebaM0mYR/2npAD496601SBnZBZESI5Jr8KF9xUDi+aTd4PMMJzQ1sVJUSLmOrgqnBaGUXeNqBxonBJRmUvHA4DJrcW9T5WhLRFBhJo0gsXKfmzcMu+WCHFEJzpsdH4X/MXz2GkRFbU5YeQQdsObPtZSowZKmPIPY+cWozaMvDnLEB8RxmN/MeUxUQFqrdTWME3fktTnn8Frl+F3Foqlo7mR1NLa3k+oQdduUIH4aWllSUh8zTCT6TyHSPfGtSxKjBnjn4CugQiHj/Pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by BY1PR11MB8127.namprd11.prod.outlook.com (2603:10b6:a03:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23; Tue, 24 Sep 2024 20:42:35 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:35 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , Jesse Barnes , Jani Nikula Subject: [PATCH 02/31] drm/i915/display: Convert i915_suspend into i9xx_display_sr Date: Tue, 24 Sep 2024 16:35:23 -0400 Message-ID: <20240924204222.246862-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0136.namprd04.prod.outlook.com (2603:10b6:303:84::21) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|BY1PR11MB8127:EE_ X-MS-Office365-Filtering-Correlation-Id: 223bfa72-f830-4a6e-54fe-08dcdcd96b7f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?inXoazWvuPQiiiDsuSECnoRiXIzqHhp?= =?utf-8?q?0cZ5qdfbvurl+bAdpktY9LZmfY3OMXP0ftYGChBBIaHPZvki2Ij6/bq2dfwPXWXH2?= =?utf-8?q?2Vt7aTaCJm1cyA+JoL+M/WfSm4WRg6DlZMDfO25MwZpFZ2uOnqWm27v9OebbL2vfg?= =?utf-8?q?r6gnWtMDMFrYOnJ7lMdnhR1OIJTzmLSNGGuS2xjC2AKOKhf4Msl8JCN6sjmTiv21W?= =?utf-8?q?4N/VXigC26EAvsCvFxUK5dQFCD49JbI+M1R6sDzGoy8fXdMqI8P/0Ana6RCZXWWhv?= =?utf-8?q?HJCO3HAM410DAjWlIm5QvPLqRbO9/tXqmeiY9V+1FksKvZAZCvhteSkTmPUEtuEJQ?= =?utf-8?q?9EN4XxtvaD75TthZ0VL7y4IKwl1NfWFO16ul/oCH9YfoiCtaDeHsAqCL6SZYod3zJ?= =?utf-8?q?33iQRPZnh4z+kGTLTrAGZT4NhxE3X9UvC7l9hRlO2e1w3Sni530kgrsv4W+uEoln+?= =?utf-8?q?cJME2fqPWIs9EJcKRNDPJBKuLt2qtZZna7ccq68qUtcE7TvWsMNWW3Q1ggbpXgljg?= =?utf-8?q?QgOy+Vr21PD566n6Xpo3+ym4phfoSTCV5n/iUxE6sHgV+RprKVtzs9Yn1axUIlkMi?= =?utf-8?q?3OFFSmsm8zWWRiSL4QkXsjdMWKx/9D1Rs8G3kLiy7Le0SSGkT/Ao+0dnlkuao54WD?= =?utf-8?q?oGup/l/kzQzRagCK5JzkhpC5q5udR7qTnKdiNxA6Sua7KxpBxe7Sbu8G97VS67wqw?= =?utf-8?q?pCf8kc+qhCVHvijOYksNFD2hRxaFGTFw757KZv4xT/J5LZ5XFf/DEVayrG3cotIDT?= =?utf-8?q?ZreH5ChGGosm9fE/UC5nhT3EJzs/BNbIFvKC5qDA8R2JjTiPXTKcECP8dsJXy27oQ?= =?utf-8?q?qdhbOJvFqR9EyuQn/3LFyqrAXvoANxrfgbe7kl3q2TDp2hUvYBZvMuRiImMjcV+m5?= =?utf-8?q?yrq0GXcyQfqZITk2xNJkKePpr/ksMzNnKRutyF1+mzO21HkgaKUK/YpDlDpe80IeC?= =?utf-8?q?lhiOSTlLMbo0cV7amsnfG6urD2n1CnYheaO7nFbHMAhAEiyYU+139p130Acw5FLZS?= =?utf-8?q?SgIftG4FvtzSwYAlF5avScijfGYdY8HmveaBXIvi69MK9adf+sacW1Dk/2BSpwZsI?= =?utf-8?q?fpjKMlrhg9O9w0xs39oQIVEmUsphJsLOMeREqmIuj3cdUYifz7HZv2p30V8CPvclV?= =?utf-8?q?fRNjSN7pgovETyDAdC6E4w/BABetNnGsnyI5d+4/a1XkN1H0KZab7vumPWRRyifEd?= =?utf-8?q?NdwO3A0RDSM2StHOahhlqjMnfAN5WtJ5JyMQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RqiivOjISSxZ918RNRlaeVV1/O+L?= =?utf-8?q?+IxNZS9o4NIEPfcHQ3cDuhV4ZZWpOaNFtDcDY1xDzFYdPuV6wXKg74OR+rG1u0Oe5?= =?utf-8?q?iNMMQ9BggJDwntLTC232Q0aEgPTOOxrjArtNYAS6y/Phn4fUNrgS5q+hMjEqPN06N?= =?utf-8?q?qeiyF7LQbLB+FwS32lXuGMU+YBdV91Js9pfdE3+WZpuB8n2LdHkqh02GeM16NDm+v?= =?utf-8?q?qGKE/bqd8J1hBmOwdB9uUZ4WNwzWoAuZZf9lKNCN6dwoiQxfz7jXXPfoE1bOgmYoV?= =?utf-8?q?Ebltq47j6jnVj50aRFmodIpi7weXBCgcxpthR6lEMU16W0WmXoln5BajnjbzMASQ4?= =?utf-8?q?M7FC94FrlVnML9GMN9Ha6Kg/bI72zIuBUG4XyBhLpnPeUaR7RpcU79MNIirsf78yR?= =?utf-8?q?tSKxlFn5xK0Z3cnZ6nJPlUEhT2xpAjyuCSmZQrVzfQPfALwUI7lgAtx2m3MdghH6Y?= =?utf-8?q?PEI5bYRxLNokbJrXWTUNaIUFW0vTphQPZc9xPBtuyHPxU+Wg8vVurW7UN1s2Yab4M?= =?utf-8?q?yMsCTxKMnUyrLvs7pwZLkLda6lORKHQmt/5wVljy91w88zCROZerkiriip4EFhVTK?= =?utf-8?q?CQfCjr3iWX5KpTv7ayH1EWp+U+FCoyuBTTCK/gSkzNaE40r7qoE9/rs1idZyhrh1i?= =?utf-8?q?YhfWgoQ/k8R+ETORGA82VXaB1/jojvWQLjYIGXZMlGQMgTyBKva4A5JPanz7ju9n4?= =?utf-8?q?Ff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: 223bfa72-f830-4a6e-54fe-08dcdcd96b7f X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:35.0974 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rOWQoYhoGiW1M0B7OignAyN6gWCGZi4IwhH9eUbtJADx2cfacnD2TajIEAVGDLapJn803SjR2PJ6tkCRpPtaig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB8127 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" These save & restore functions inside i915_suspend are old display functions to save and restore a bunch of display related registers. Move it under display and rename accordantly. Just don't move it entirely towards intel_display struct yet because it depends on drm_i915_private for the IS_MOBILE. While doing this conversion also update the MIT header using the new SPDX ones. v2: Fix Makefile and include (Jani) Removed vga and gmbus (Jani, Ville) Cc: Jesse Barnes Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/Makefile | 2 +- .../gpu/drm/i915/display/i9xx_display_sr.c | 95 ++++++++++++ .../gpu/drm/i915/display/i9xx_display_sr.h | 14 ++ drivers/gpu/drm/i915/i915_driver.c | 6 +- drivers/gpu/drm/i915/i915_suspend.c | 135 ------------------ drivers/gpu/drm/i915/i915_suspend.h | 14 -- 6 files changed, 113 insertions(+), 153 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/i9xx_display_sr.c create mode 100644 drivers/gpu/drm/i915/display/i9xx_display_sr.h delete mode 100644 drivers/gpu/drm/i915/i915_suspend.c delete mode 100644 drivers/gpu/drm/i915/i915_suspend.h diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 70771e521b1c..f21c28d471e7 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -30,7 +30,6 @@ i915-y += \ i915_params.o \ i915_pci.o \ i915_scatterlist.o \ - i915_suspend.o \ i915_switcheroo.o \ i915_sysfs.o \ i915_utils.o \ @@ -219,6 +218,7 @@ i915-$(CONFIG_HWMON) += \ i915-y += \ display/hsw_ips.o \ display/i9xx_plane.o \ + display/i9xx_display_sr.o \ display/i9xx_wm.o \ display/intel_alpm.o \ display/intel_atomic.o \ diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.c b/drivers/gpu/drm/i915/display/i9xx_display_sr.c new file mode 100644 index 000000000000..4dd0ce267994 --- /dev/null +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.c @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright © 2024 Intel Corporation + */ + +#include "i915_drv.h" +#include "i915_reg.h" +#include "i9xx_display_sr.h" +#include "intel_de.h" +#include "intel_gmbus.h" +#include "intel_pci_config.h" + +static void i9xx_display_save_swf(struct drm_i915_private *i915) +{ + int i; + + /* Scratch space */ + if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { + for (i = 0; i < 7; i++) { + i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } + for (i = 0; i < 3; i++) + i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + } else if (GRAPHICS_VER(i915) == 2) { + for (i = 0; i < 7; i++) + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } else if (HAS_GMCH(i915)) { + for (i = 0; i < 16; i++) { + i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } + for (i = 0; i < 3; i++) + i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + } +} + +static void i9xx_display_restore_swf(struct drm_i915_private *i915) +{ + int i; + + /* Scratch space */ + if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { + for (i = 0; i < 7; i++) { + intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } + for (i = 0; i < 3; i++) + intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + } else if (GRAPHICS_VER(i915) == 2) { + for (i = 0; i < 7; i++) + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } else if (HAS_GMCH(i915)) { + for (i = 0; i < 16; i++) { + intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } + for (i = 0; i < 3; i++) + intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + } +} + +void i9xx_display_sr_save(struct drm_i915_private *i915) +{ + struct pci_dev *pdev = to_pci_dev(i915->drm.dev); + + if (!HAS_DISPLAY(i915)) + return; + + /* Display arbitration control */ + if (GRAPHICS_VER(i915) <= 4) + i915->regfile.saveDSPARB = intel_de_read(i915, DSPARB(i915)); + + if (GRAPHICS_VER(i915) == 4) + pci_read_config_word(pdev, GCDGMBUS, &i915->regfile.saveGCDGMBUS); + + i9xx_display_save_swf(i915); +} + +void i9xx_display_sr_restore(struct drm_i915_private *i915) +{ + struct pci_dev *pdev = to_pci_dev(i915->drm.dev); + + if (!HAS_DISPLAY(i915)) + return; + + i9xx_display_restore_swf(i915); + + if (GRAPHICS_VER(i915) == 4) + pci_write_config_word(pdev, GCDGMBUS, i915->regfile.saveGCDGMBUS); + + /* Display arbitration */ + if (GRAPHICS_VER(i915) <= 4) + intel_de_write(i915, DSPARB(i915), i915->regfile.saveDSPARB); +} diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.h b/drivers/gpu/drm/i915/display/i9xx_display_sr.h new file mode 100644 index 000000000000..30383758f97e --- /dev/null +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2024 Intel Corporation + */ + +#ifndef __I9XX_DISPLAY_SR_H__ +#define __I9XX_DISPLAY_SR_H__ + +struct drm_i915_private; + +void i9xx_display_sr_save(struct drm_i915_private *i915); +void i9xx_display_sr_restore(struct drm_i915_private *i915); + +#endif diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index c5ffcf229f42..ae5906885359 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -45,6 +45,7 @@ #include #include +#include "display/i9xx_display_sr.h" #include "display/intel_acpi.h" #include "display/intel_bw.h" #include "display/intel_cdclk.h" @@ -94,7 +95,6 @@ #include "i915_memcpy.h" #include "i915_perf.h" #include "i915_query.h" -#include "i915_suspend.h" #include "i915_switcheroo.h" #include "i915_sysfs.h" #include "i915_utils.h" @@ -1048,7 +1048,7 @@ static int i915_drm_suspend(struct drm_device *dev) intel_dpt_suspend(dev_priv); i915_ggtt_suspend(to_gt(dev_priv)->ggtt); - i915_save_display(dev_priv); + i9xx_display_sr_save(dev_priv); opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold; intel_opregion_suspend(display, opregion_target_state); @@ -1167,7 +1167,7 @@ static int i915_drm_resume(struct drm_device *dev) intel_dmc_resume(display); - i915_restore_display(dev_priv); + i9xx_display_sr_restore(dev_priv); intel_vga_redisable(display); diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c deleted file mode 100644 index fb67b05cd864..000000000000 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * Copyright 2008 (c) Intel Corporation - * Jesse Barnes - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "display/intel_de.h" -#include "display/intel_gmbus.h" - -#include "i915_drv.h" -#include "i915_reg.h" -#include "i915_suspend.h" -#include "intel_pci_config.h" - -static void intel_save_swf(struct drm_i915_private *dev_priv) -{ - int i; - - /* Scratch space */ - if (GRAPHICS_VER(dev_priv) == 2 && IS_MOBILE(dev_priv)) { - for (i = 0; i < 7; i++) { - dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, - SWF0(dev_priv, i)); - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } - for (i = 0; i < 3; i++) - dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, - SWF3(dev_priv, i)); - } else if (GRAPHICS_VER(dev_priv) == 2) { - for (i = 0; i < 7; i++) - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } else if (HAS_GMCH(dev_priv)) { - for (i = 0; i < 16; i++) { - dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, - SWF0(dev_priv, i)); - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } - for (i = 0; i < 3; i++) - dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, - SWF3(dev_priv, i)); - } -} - -static void intel_restore_swf(struct drm_i915_private *dev_priv) -{ - int i; - - /* Scratch space */ - if (GRAPHICS_VER(dev_priv) == 2 && IS_MOBILE(dev_priv)) { - for (i = 0; i < 7; i++) { - intel_de_write(dev_priv, SWF0(dev_priv, i), - dev_priv->regfile.saveSWF0[i]); - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } - for (i = 0; i < 3; i++) - intel_de_write(dev_priv, SWF3(dev_priv, i), - dev_priv->regfile.saveSWF3[i]); - } else if (GRAPHICS_VER(dev_priv) == 2) { - for (i = 0; i < 7; i++) - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } else if (HAS_GMCH(dev_priv)) { - for (i = 0; i < 16; i++) { - intel_de_write(dev_priv, SWF0(dev_priv, i), - dev_priv->regfile.saveSWF0[i]); - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } - for (i = 0; i < 3; i++) - intel_de_write(dev_priv, SWF3(dev_priv, i), - dev_priv->regfile.saveSWF3[i]); - } -} - -void i915_save_display(struct drm_i915_private *dev_priv) -{ - struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); - - if (!HAS_DISPLAY(dev_priv)) - return; - - /* Display arbitration control */ - if (GRAPHICS_VER(dev_priv) <= 4) - dev_priv->regfile.saveDSPARB = intel_de_read(dev_priv, - DSPARB(dev_priv)); - - if (GRAPHICS_VER(dev_priv) == 4) - pci_read_config_word(pdev, GCDGMBUS, - &dev_priv->regfile.saveGCDGMBUS); - - intel_save_swf(dev_priv); -} - -void i915_restore_display(struct drm_i915_private *dev_priv) -{ - struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); - - if (!HAS_DISPLAY(dev_priv)) - return; - - intel_restore_swf(dev_priv); - - if (GRAPHICS_VER(dev_priv) == 4) - pci_write_config_word(pdev, GCDGMBUS, - dev_priv->regfile.saveGCDGMBUS); - - /* Display arbitration */ - if (GRAPHICS_VER(dev_priv) <= 4) - intel_de_write(dev_priv, DSPARB(dev_priv), - dev_priv->regfile.saveDSPARB); -} diff --git a/drivers/gpu/drm/i915/i915_suspend.h b/drivers/gpu/drm/i915/i915_suspend.h deleted file mode 100644 index e5a611ee3d15..000000000000 --- a/drivers/gpu/drm/i915/i915_suspend.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* - * Copyright © 2019 Intel Corporation - */ - -#ifndef __I915_SUSPEND_H__ -#define __I915_SUSPEND_H__ - -struct drm_i915_private; - -void i915_save_display(struct drm_i915_private *i915); -void i915_restore_display(struct drm_i915_private *i915); - -#endif /* __I915_SUSPEND_H__ */ From patchwork Tue Sep 24 20:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811158 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 9856FCF9C72 for ; Tue, 24 Sep 2024 20:42:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3749410E742; Tue, 24 Sep 2024 20:42:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QcRDTg+o"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DBF510E742; Tue, 24 Sep 2024 20:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210561; x=1758746561; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=UGuv3jIaXkcG6oKl/M9q8RTgkpCh464sf8VIykAabI0=; b=QcRDTg+oDo2NnH5Pov34GciHl8BJ9+qn+PpxmwOQ6C6erHQFvRjJbFXv graQJrsTBAKPKJl+RKNM79s3kwbcoQ85w/2lDY1HcvdMTqFlzn0Fa68ta Q+dadrWAE7ENBolYIKbtI9iEuD42EncASj2KSiM78gfPIlkmZLyS8h8pd Ry5fgrOzhC2rkVQczT++4R1MgCxkXoUna11TqlvJwpk+X04XmVqvU506Y 9VvyqlRHHUTLTycuH3x+EEiCSbKKWYCflVsf5PIi9hG7901RHTM2Xr8vs EhCMVWhj6qrurr0IvqZBgp6clmdEwUNiPKurEIKCFXQRrLBcrZ3GOAEq8 A==; X-CSE-ConnectionGUID: cQHpLXhARQCiRYOraFl94w== X-CSE-MsgGUID: SFxyRIZYRJmNfBABcnmAsQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26099148" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26099148" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:41 -0700 X-CSE-ConnectionGUID: lZg7uYLOReeqPvhGCT2HPA== X-CSE-MsgGUID: azYs0B/HR6+NPC3V93mHsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76469558" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:40 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:40 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:40 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NVDqm+xNb9D+Ye3lhBjmh/T0N2aSdJdf9SPfqn0lsaFZAJI+4p6p0ZjClmnlmf2UbdINInYR+F8rdamdojfSIM0jgKKuE/obJBGBKZ8n72HAT9SZvGr7nPbjDg5IcRJcIf/MTlxVqRLK9eJ3vlbueYhkiKNhfODZ+0TzjZ/Jk2a3b6oSQfp9MPb7m2ascyCnRFOGg/md82+xx2WM7Hqv/o5OJxox3VG5rtDAx9ge1ClWUJrGP+MiCCCK2/BoWgZp9DVr7/gR4iwxrYejrwKUDS0oWJDiHlWmdwBMlXG85gvn/9IerkGfPdQ/HnGqCxzvYjmiqw6eWOJdhVdFzkU2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2bJWA/2xKeC77pID+kQ9i1tKLazHpbAlrPtk0nIP8+Q=; b=mzl2kzrwCeCUL6+OdVhgk9M97Cp4IOcfJYmHss0eVcTapliK5P62st4R+Ue0QmVQ/GvEz6SOo6udkjFY9q6WnSgkl1Oan+bg2R/kdV2nVDlFzB71rVSLhkTbsAZpRCY1OHd6Gv6LtefArOm10aj2ThbwaIrvaVD4QYQ29NdZOmCWmZZ//QaQCh/UC4hly4N7Oipfkbl4lXQDwMc7B4ItohXRn9KhOVCQ1tgeBH+D72XQl1c8zyaxcIcpdNLFFPZOn+eLNvIBv2FZXlVMV2pLKcAiYr7K0zOk3+Hw55W43qamRKtUvse6uGXKR/psVFcZFlB1VRobgkuw5lf+qKEY7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by BY1PR11MB8127.namprd11.prod.outlook.com (2603:10b6:a03:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23; Tue, 24 Sep 2024 20:42:38 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:38 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 03/31] drm/i915/display: Move regfile registers intel_display.restore Date: Tue, 24 Sep 2024 16:35:24 -0400 Message-ID: <20240924204222.246862-4-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0259.namprd03.prod.outlook.com (2603:10b6:303:b4::24) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|BY1PR11MB8127:EE_ X-MS-Office365-Filtering-Correlation-Id: c6a0f300-61f4-4c95-4009-08dcdcd96d49 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: Cl4jby0oeMw5/R3BCgXlmYa0J9hFtwb03dj5nw3HjXLudKaEFExO36T4I87yKKvWtqnAvRRt8M7X5DVflYk3egsGpeXhZSMmu1f++3yfq30UbidBphB+bq4LsOw9EJuhMiZSesUIMef+P2UKVousJkNme61oJNDB67eMkfXV2Wt+TbWGYMldChoA4bFQUm1EkSCgD6Zfr7l3dBdHst5faA8PGHRYW0rFS0wS+I0zRtAXewZroosR3Vk/3iQut+9SMUY7+IYH1PMtvbBSKEnJH7oPhN6Pshmt97ulffjbxaU/ZM5sKhCHrRKfU1l7KtjuNSgpZqsylFEQ9XVwTsKP2tBi5XfUb6iFZMcDoU8SfKPDETv5jYGFfCeAzqhG2dPcLJ55Y1V2j5WMR5ZFL1jQD8nuTW4zS6Bg6oMoRKtvFaytJ5xCPFXiE8UsnIU1YmsY0D/0pBSIqvo2f6iI+pMtWbgjtnwnkuiEyl0qaTmkz7Aa1eOSkQrqXQoE9C6BIE8Zeha/H6TtRNsHCJrSSBNW7lnBh1gea5/z9lBfK9P5ZTL2FIpx7mbypS8jP4eIucjpZVsrbLmwFEJalVR8Gb5UmZNXc2x27WWV16Mo7XYlk0Njy8GjuagJt1IrNPDdpBfQa8pfxmlcZ0hkvD+LhYOmeQWG36M4+CY+NQ7Un4/tmwa+ldF/HrAX0vb9utrt2TX7H+2guxVuK/kNbADgM3pAjG3M9mtBgD9SQog/JFaJ8ZYxj3hy+WfW0uzv0bXsRYWbKADCsewBRljVef8K55BvLdX/Og9yWf9Wmz6rLxb1d513AJ4Xs8+8oIHBOX2r6nQmRQjVIFMdAKuV1H8qgzV0Iy8E9X+D1LANpnGcAnPTcOB4WxjT2x2odzypimkgkiGZg9+rXrK5vrHflJeyTQ/1exUAlBKLGLpb7bDYOykhoBdbp+GuzBEaTxQ1/ES5rn6SPNpHOIyNfb51WzbiL5DsM34EV/eRNlbzsudRf/0m7l1mP3TbfC4XvQXy3IPJykrdn3gH4mNGij5XqkUiYO90f4ZnXpDeELeLZNRClBMORr9lv9EldpFbAep1COTGME14l3wAhLk+9IaCEX+qa+BrP9zGSEA8220NN5SSnhBKOT+P0WaI14UG9/ND19xNOV6IG/n6qfdxCFuWd9EAntPM4+d8Wkn5m3dMxIIBwRM0sif9172B+kWvAgTbXVJF4jFOa4z6yzcAq71JW3LwgiGyGH0q9LSSEEOYRjszJrw2x1/n/XwUPxKs8p8+SKz/HLJ8AeIdKI0tIqiXuZq9sMaEQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +sWXtiV5Zh8pJQ8v1oAHq7G9N2LyNvNuu7hCGtvLJ8ckrwBFTaq2LOx+b4IOJzA4Dfsb+WqigxrcjEhRVQROuSs2YwJHLiVZ/FmELy1oU9R/wC4Yo3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17x9Pn9Wrq1BlROnmqdmVnxwLw5SjtmBRrEsCvl0na9Okqe/wc70azPCMWYvUJ/HfDrd/OgS7SYXobb6c+i7x4dPo306rPCBPvP328JmjVwgd6/SxHTvP5lqwWZSHClRTEA+0DQUM6bxJheJ6VOOzVgHhLMWzwVP8PYACPhh0AzFAyf+DnHjZWtBamZTSP3W3Ybmyee9mC+aRJFiBWmRf9Ohabij5TtcaAegg//Vz9z5wsbOd/nlTbSV9hZpn2nyuZzl/69XvPcklczVEtn2a5ZmWUr86MLmW4JrFsnuTT9akkbadwa+L2Ow8NHS5ffayKvBqH695+bU1ZMuFYJc5T7gpqIGZbewlESejG4+UsNtbM5htCs/P5bn7ZDIxpPncj3ENL64Brdvk2JQgJdGB1ifiz7/KULcVcr1cpf4vbsw== X-MS-Exchange-CrossTenant-Network-Message-Id: c6a0f300-61f4-4c95-4009-08dcdcd96d49 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:38.1637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wbA7E5M3KoGulvK/LsTWB0LXJv0M7oDb3yi3u7gEWod4jJZY19jQKLHbXI7HDG4tVW2x6BA9sCfk9BNz++jYTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB8127 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The intel_display struct already has a place for save/restore stuff. Move the i915's regfile there since they are only related to display. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../gpu/drm/i915/display/i9xx_display_sr.c | 40 ++++++++++--------- .../gpu/drm/i915/display/intel_display_core.h | 5 +++ drivers/gpu/drm/i915/i915_drv.h | 9 ----- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.c b/drivers/gpu/drm/i915/display/i9xx_display_sr.c index 4dd0ce267994..4c78b7165831 100644 --- a/drivers/gpu/drm/i915/display/i9xx_display_sr.c +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.c @@ -12,56 +12,59 @@ static void i9xx_display_save_swf(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; int i; /* Scratch space */ if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { for (i = 0; i < 7; i++) { - i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF0[i] = intel_de_read(display, SWF0(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } for (i = 0; i < 3; i++) - i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + display->restore.saveSWF3[i] = intel_de_read(display, SWF3(i915, i)); } else if (GRAPHICS_VER(i915) == 2) { for (i = 0; i < 7; i++) - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } else if (HAS_GMCH(i915)) { for (i = 0; i < 16; i++) { - i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF0[i] = intel_de_read(display, SWF0(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } for (i = 0; i < 3; i++) - i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + display->restore.saveSWF3[i] = intel_de_read(display, SWF3(i915, i)); } } static void i9xx_display_restore_swf(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; int i; /* Scratch space */ if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { for (i = 0; i < 7; i++) { - intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF0(i915, i), display->restore.saveSWF0[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } for (i = 0; i < 3; i++) - intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + intel_de_write(display, SWF3(i915, i), display->restore.saveSWF3[i]); } else if (GRAPHICS_VER(i915) == 2) { for (i = 0; i < 7; i++) - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } else if (HAS_GMCH(i915)) { for (i = 0; i < 16; i++) { - intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF0(i915, i), display->restore.saveSWF0[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } for (i = 0; i < 3; i++) - intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + intel_de_write(display, SWF3(i915, i), display->restore.saveSWF3[i]); } } void i9xx_display_sr_save(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; struct pci_dev *pdev = to_pci_dev(i915->drm.dev); if (!HAS_DISPLAY(i915)) @@ -69,16 +72,17 @@ void i9xx_display_sr_save(struct drm_i915_private *i915) /* Display arbitration control */ if (GRAPHICS_VER(i915) <= 4) - i915->regfile.saveDSPARB = intel_de_read(i915, DSPARB(i915)); + display->restore.saveDSPARB = intel_de_read(display, DSPARB(i915)); if (GRAPHICS_VER(i915) == 4) - pci_read_config_word(pdev, GCDGMBUS, &i915->regfile.saveGCDGMBUS); + pci_read_config_word(pdev, GCDGMBUS, &display->restore.saveGCDGMBUS); i9xx_display_save_swf(i915); } void i9xx_display_sr_restore(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; struct pci_dev *pdev = to_pci_dev(i915->drm.dev); if (!HAS_DISPLAY(i915)) @@ -87,9 +91,9 @@ void i9xx_display_sr_restore(struct drm_i915_private *i915) i9xx_display_restore_swf(i915); if (GRAPHICS_VER(i915) == 4) - pci_write_config_word(pdev, GCDGMBUS, i915->regfile.saveGCDGMBUS); + pci_write_config_word(pdev, GCDGMBUS, display->restore.saveGCDGMBUS); /* Display arbitration */ if (GRAPHICS_VER(i915) <= 4) - intel_de_write(i915, DSPARB(i915), i915->regfile.saveDSPARB); + intel_de_write(display, DSPARB(i915), display->restore.saveDSPARB); } diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h index 982dd9469195..2f4dfc8dbedc 100644 --- a/drivers/gpu/drm/i915/display/intel_display_core.h +++ b/drivers/gpu/drm/i915/display/intel_display_core.h @@ -500,6 +500,11 @@ struct intel_display { /* restore state for suspend/resume and display reset */ struct drm_atomic_state *modeset_state; struct drm_modeset_acquire_ctx reset_ctx; + u32 saveDSPARB; + u32 saveSWF0[16]; + u32 saveSWF1[16]; + u32 saveSWF3[3]; + u16 saveGCDGMBUS; } restore; struct { diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index def3ca135406..9030ea7d54b1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -101,14 +101,6 @@ struct i915_dsm { resource_size_t usable_size; }; -struct i915_suspend_saved_registers { - u32 saveDSPARB; - u32 saveSWF0[16]; - u32 saveSWF1[16]; - u32 saveSWF3[3]; - u16 saveGCDGMBUS; -}; - #define MAX_L3_SLICES 2 struct intel_l3_parity { u32 *remap_info[MAX_L3_SLICES]; @@ -291,7 +283,6 @@ struct drm_i915_private { struct i915_gpu_error gpu_error; u32 suspend_count; - struct i915_suspend_saved_registers regfile; struct vlv_s0ix_state *vlv_s0ix_state; struct dram_info { From patchwork Tue Sep 24 20:35:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811160 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 8A4DDCF9C6B for ; Tue, 24 Sep 2024 20:42:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 372DC10E74C; Tue, 24 Sep 2024 20:42:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Gz7CYAZK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBCE010E746; Tue, 24 Sep 2024 20:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210565; x=1758746565; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=TvXEG80fG3QlRBSOS0IhSC+sSR2nAA7Mr5VmQug9lxQ=; b=Gz7CYAZKXTiE/2n74pmpkrtNjFjtVzFDTGkXSg/neBJwzPDVLJdvJ+4A tHEvX4OLQ01jsSHOGQ45DhLCRViFH0evNcuaBDS2xHxbgX6jrHYe3xV/l oTLi4bb28V1TKEcJeUaWVdOX6nRQgImSLXD+fUyGDUfflVOyEUUZvrvoF OSoUR2mmLXYM7O+amC/zyybBtiQq/nuAkPcYMFV3CGMVSkB2ofOW1SVQ1 pijYNXVri1eOGWN6XXYzQDYqedGRfplilDD1bGbSNl7+DuhJFGOkgUuP6 xbDaZw6j+obiXPK/8SHdIObpYupGaYbC0vjE1lG35hodYXtM00jMCkMyC Q==; X-CSE-ConnectionGUID: WUmRFhdLSWuzOoOEDMj3Mw== X-CSE-MsgGUID: FzmqoCZQSV6NsTV87lapFw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26099155" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26099155" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:44 -0700 X-CSE-ConnectionGUID: NSDQP5SLS3yDuKBvAjgtfA== X-CSE-MsgGUID: I6MkZgL2QnyCC9JX03uZCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76469572" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:44 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:43 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:42 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:42 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NRoLQigovTkxwatzBx7zuzt6fj3a1FBhFqFhwzR/beTtVNFYGb/w6waxZ5z0zE9j9Yv+wF69WnXPqPrxPexRYDDkh9qFCZg8JRU6jquWBx25y5wY/QQlo6tZXCEI/wTGPwGDF/7XsqzhRWLXzc3fjE5PdQiQlqxyZtDK2Yp8xsI2IjeSxYwPVWFHPAmdRwA7x3MU/paF7q+LoLtvejC71v8ImX8aQD3pi/foOyu1cR+dEaxilX7ktO+vDvtVA9hRGHKCTkq0wDFImFiVJjUVwBbZZtiKio4VPv2Ekx/JYo2cg8b+1cYhA5cuM0c8gBhsFJn8B7OBrXTOtGb3oeynFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1RibCwNBAucMHMCupAMV7MLUjbhTkDhEpPDxxPZhGOI=; b=hszygLTLVFdFlCB2wEXa6XXWXw5zvl4CkCFXl1TvJLmOWVK5OPPlug2RlWdcXnqgilSdRKMkXrBNoOu/6Jd2whgVBkY1T2iwHhKq45DEGNBlKmPShgp2PxKoS4j5GPw+z06deSX+1uG9PX+yPOKrWzFtZj0027sKBMiGl+5rK6UbCi1uy5h7wArHzL7TmWoYjvsxHvTugQ198IjuSBIXt83tKxxArIyavpYZ8zcGlY2SUipE0DKW9EHz4W5XKMEBKvVOGgoxdGT0ow1YRa9DQP1Kv7ZcehLZKUG3Pq4+WtGarYdfFY2pG3VC8NaPfWDBsELcxOApQTFdONpM2//Wbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by BY1PR11MB8127.namprd11.prod.outlook.com (2603:10b6:a03:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23; Tue, 24 Sep 2024 20:42:40 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:40 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 04/31] drm/i915/display: Move shutdown sequences under display driver Date: Tue, 24 Sep 2024 16:35:25 -0400 Message-ID: <20240924204222.246862-5-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0249.namprd03.prod.outlook.com (2603:10b6:303:b4::14) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|BY1PR11MB8127:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f18e452-34a0-4643-e679-08dcdcd96ebd X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: YySMEe2ufek1orNgKMZh85877lWT2VtKxU+cOZ+BSudduNWTMtY9uZZaMwtD5vgwa2DVPqndRh5bfc1JO8SQ+40gzzF3enYTwvGPEdwMLoCaoGalkVy+VnQsGfpxG8t+xpIEjPoGiVk43xEIYgzB1wrB/7wEb5NReJ1HIQJXg3nHywOL1Ow3hDdZebpWwkBCK9FqPt2LWqvNtXyt2vWdwFNxwGbB8mtrOglQySl2HVUX+hYgoZE2aC0DTm3S9qld+tBOHoL1n0d24gmtLOn/R4u/0XgD+svliOIL8/WGhVi18aAwUIzXLtKoiD1+/FTR2y5iYytFlIqO48KOiD1y5yEPqr5v6s1sxalUy2DyzCL5A22xKr029BE+P/Rr28lH3tIrb3qAHRLsJZ7c+6zyCk5AHSAUBjRihbJXbMSPpl98/bo9vPTPB6CHyiYJT0SV75jIfPhM/SmXz2KKv35VtjcelXzUydHogcMJgGHrTc2ACAd8ybVz44QhGb+BPg7HsceZNXQaes1n6jvG7Z9YtPAgvi8gLKLMyz6uY0FLOzCHj1d5nylKSkoKG4P9zhhAgxMUOw7Dng0XmKnT+45YOvWf4abuozWd9/6VqRnPSEpyMftRGrN67O4otJ8nJDHv4Y9vS0dRWqLiqsJ+BRmbldha7NxdFWr2P9npoD+4h53xqrlmfhfqHhe36OMpB/RItknjifWjdRnQVHCNm2cS8dLhB3o8jg7+DxDbv9ALLGXEXAzNP+l6dyljP25VALC7QUxoB9XMAN1EH5yoJwvwtk4NxuI+yKLx7wevv0hdszKwcur5AtiQC3eUTYDLRfDbfIjTyKC0bz0eLO+Ig0lZh2MdSiL+Zv6Qvd95tNskAoNOpQWe9MYHyvRG7yhTaiqpx7GhkZGpaNJK6GRZVANrUZ/4IFuRZ/+kABm6ySZiJM2AiHpMBgpLaUJp0MfrP4SVgQl2lfOMHUwywvMl40yDwK2hj9KfhCa3TZUg9tphRGZjWywXYvxY6ZMqbri7o/7UQx6AfJb7FFbnLulANiz51lUMENYmcILlrbqcO5iE841XoEHKdQqJkMcSeyNw7XeOIfo0JYlDHA7n1mLSq8Qzu7ZWqBtb0/gu+cC5sPW7+2CyxozCfigncr61gIVMRqcVzlFfKqXLZt9iVoT5HdYCrxoxf1DKKas23+bqEqIVWMgTtPbgQwg62q/DwU+HM0um6N6B9jWmG2sOXBeKssEQMl072FM1Ylp/VXSZJ+a6UktvgQf55HXOlHKTRse62zdEULcNHHcq/2pZvushuBjCiQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: v2lQz+MVRGh2c5tC6q8l4HSlJc5HHmH4PUopWkmkmzI1HQOCqWv7Lq9FFayglU/LU8Z0hIhwLNO1VFd5bDzGYiIfzlcBxUyvCui0mq9UTGNpVFO2jEzlKb0VVfWohRL0hcmwohyYxL33QNGIkQPAtKPfBgVMw8xl3Gr6BPny8vJ5qYAG6V3VeC53XhPviPTY98aZFWByQARiLwZhDDzjGQSzUbNz4p6+elWvW5JsXEUPyuMwmbNZZ+ikDdFi1DpxzIzmYzJeeM5yRtkDrjbhSuec3zgQd9eI9S/shGWZg12+c8Cm/cJg6K8WNZxZmx0nKv0GYTT6NVtkwbumPgpa52KLG++aABCpG1XWJ/Z24bcpv/eVo7ozKA02c4vpsjh8Ea7vN59M7eOGRTR4KV1rtLA2uN6C4LdqnPNahoFPpoFUj8QZEVG76Vxy9rOK0Retd5J5oYZPp40iJT2XsiA9LkYIn+AG9TPoel5+lHVTnN+ZYcBJ77v+gn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hmFT7uc7hE966Tylm6bVkGmOxSu0n/OCRq5WYA== X-MS-Exchange-CrossTenant-Network-Message-Id: 4f18e452-34a0-4643-e679-08dcdcd96ebd X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:40.7326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B2/wEFs3flHh8T8kHY7I7f3C+f6dJNi0X8q73TmY5+L8/Io6lIr/o7Kk1LstePLcstCqCGNN59v/A1hhLvp36A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB8127 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move display related shutdown sequences from i915_driver to intel_display_driver. No functional change. Just taking the right ownership and start some reconciliation of them between i915 and Xe. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 40 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 3 ++ drivers/gpu/drm/i915/i915_driver.c | 29 ++------------ 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index c106fb2dd20b..e40b1105168e 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -39,6 +39,7 @@ #include "intel_dp_tunnel.h" #include "intel_dpll.h" #include "intel_dpll_mgr.h" +#include "intel_encoder.h" #include "intel_fb.h" #include "intel_fbc.h" #include "intel_fbdev.h" @@ -755,3 +756,42 @@ void intel_display_driver_resume(struct drm_i915_private *i915) if (state) drm_atomic_state_put(state); } + +void intel_display_driver_shutdown(struct drm_i915_private *i915) +{ + intel_power_domains_disable(i915); + + intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_SUSPENDED, true); + if (HAS_DISPLAY(i915)) { + drm_kms_helper_poll_disable(&i915->drm); + intel_display_driver_disable_user_access(i915); + + drm_atomic_helper_shutdown(&i915->drm); + } + + intel_dp_mst_suspend(i915); +} + +void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915) +{ + intel_hpd_cancel_work(i915); + + if (HAS_DISPLAY(i915)) + intel_display_driver_suspend_access(i915); + + intel_encoder_suspend_all(&i915->display); + intel_encoder_shutdown_all(&i915->display); + + intel_dmc_suspend(&i915->display); +} + +void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915) +{ + /* + * The only requirement is to reboot with display DC states disabled, + * for now leaving all display power wells in the INIT power domain + * enabled. + */ + + intel_power_domains_driver_remove(i915); +} diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 42cc4af6d3fd..1ee37fb58d38 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -26,6 +26,9 @@ void intel_display_driver_remove_nogem(struct drm_i915_private *i915); void intel_display_driver_unregister(struct drm_i915_private *i915); int intel_display_driver_suspend(struct drm_i915_private *i915); void intel_display_driver_resume(struct drm_i915_private *i915); +void intel_display_driver_shutdown(struct drm_i915_private *i915); +void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); +void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915); /* interface for intel_display_reset.c */ int __intel_display_driver_resume(struct drm_i915_private *i915, diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index ae5906885359..38c845ad86e5 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -939,43 +939,22 @@ void i915_driver_shutdown(struct drm_i915_private *i915) { disable_rpm_wakeref_asserts(&i915->runtime_pm); intel_runtime_pm_disable(&i915->runtime_pm); - intel_power_domains_disable(i915); - intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_SUSPENDED, true); - if (HAS_DISPLAY(i915)) { - drm_kms_helper_poll_disable(&i915->drm); - intel_display_driver_disable_user_access(i915); - - drm_atomic_helper_shutdown(&i915->drm); - } - - intel_dp_mst_suspend(i915); + intel_display_driver_shutdown(i915); intel_irq_suspend(i915); - intel_hpd_cancel_work(i915); - - if (HAS_DISPLAY(i915)) - intel_display_driver_suspend_access(i915); - intel_encoder_suspend_all(&i915->display); - intel_encoder_shutdown_all(&i915->display); - - intel_dmc_suspend(&i915->display); + intel_display_driver_shutdown_noirq(i915); i915_gem_suspend(i915); - /* - * The only requirement is to reboot with display DC states disabled, - * for now leaving all display power wells in the INIT power domain - * enabled. - * - * TODO: + /* TODO: * - unify the pci_driver::shutdown sequence here with the * pci_driver.driver.pm.poweroff,poweroff_late sequence. * - unify the driver remove and system/runtime suspend sequences with * the above unified shutdown/poweroff sequence. */ - intel_power_domains_driver_remove(i915); + enable_rpm_wakeref_asserts(&i915->runtime_pm); intel_runtime_pm_driver_last_release(&i915->runtime_pm); From patchwork Tue Sep 24 20:35:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811161 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 A3F65CF9C6B for ; Tue, 24 Sep 2024 20:42:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51A2D10E74D; Tue, 24 Sep 2024 20:42:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="XjpbJcen"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id D09A210E175; Tue, 24 Sep 2024 20:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210570; x=1758746570; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=UYgetFNsXBNFpPkxA/sCbk1LcZfIqICGFkOxEDbDxMo=; b=XjpbJcenplo3u8XOkr1rCQLM4MZ+BUR3UJbdtcWBV4OuAzFebkykgw+n sIVdPIPHK4toOoX8wkjebuPJwaR7rNMsOyG5J9j+oJsAPemqflhMEiZwh hSwBHstfG5lQ8FMKMpGbYs71s9mW5pRbgn3/3ZKz7WtOjnfOvo1flcwLy SXjuntNPxC5iCpDuYmMNYKbIgx5lVnx0+OlFYWI2P7LCduzk7gklvU8s3 U/FuAdb2v/NmKXb/SwGtJRtjJLoSQe+ZQCRzyJpojRa4T4cg/f93J3VzY VlN+V1o5L+YQJLHrg2Mu13jlKpawsM5Wj3Kp33GCBgV/BiHw5w+sn0BWG Q==; X-CSE-ConnectionGUID: yIIcw/maRZmzSOlB5m8nBQ== X-CSE-MsgGUID: 4gc5Uh00ST2MorwJEX+y/A== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26182572" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26182572" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:50 -0700 X-CSE-ConnectionGUID: +tkdM31bRQC3Z4N60/hE8A== X-CSE-MsgGUID: Q7/6opW5RcKNnAuaSTt9PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76337761" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:50 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:49 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:48 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:48 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:48 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eK0VTV0wHqFzmiucNK9X72IvNV/KHJJpcjP/xfDMICNvtdQ/7Qbe44pWOCEPOJkkbwYahuvwDI3h8LBt7NkYu6JH+Ny21bKT25tbQO7P5Wl9OZFGjShzHFWPXPYvJm5GYT4GieQKepIOgoGdoDtpTqBTni1cZfm3UYTiZcszKwjkiNBlEZBZwWEaCf/t1jJiL4BwVAFjPrLdcbGKYE17kGlaUMiXbcAjwLf6lLKbTLlyCVRdSu9PrZypGpIlD8zjT31QG80Joud4tzAJH9EXlTGDb/1l6VBfkDt0cWnBy7Sh9bbfo2YRfjtJT6AtVrRxwzi6oTcdlM6JzdZ+SdO/fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lVzUP/okr/FuTggDcF352Ux4F6Lsjay7ccmyaOL7Aa8=; b=l7YpvK0epFPbV1zCNgfn9Mfggwqfk3u9pwCdcbmq/VmI0ole/9qJTUyD0J7QxjsNn6MtDbaYn/Uv1hkiHW7ykiZqd92zIvMHvt37uMJPXInNiHz8TYdpKK5pcseHohkoam+il7ol7VbWgkV6BianHFXSiWdprx4mDrhFfgbFqnZ1bxN10rIpFC5CFHmQcfOC7mfsia97/jWAMA88ZTkL3cRiCo5s/8LRfv1P1XkB3CakGKE1s7oJwPhxjqzCrX44XQ+iRu+a8aVSDMcDzR0ZZzcAlCG9EJTXbDt9TzGtz9DwyIr7zMb6D5OyO8m47F7WEGQKRoo0t14URFiClQMcJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:42:44 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:43 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , "Maarten Lankhort" Subject: [PATCH 05/31] drm/xe: At shutdown disable commit helpers instead of flushing Date: Tue, 24 Sep 2024 16:35:26 -0400 Message-ID: <20240924204222.246862-6-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0034.namprd03.prod.outlook.com (2603:10b6:303:8e::9) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: e0068f92-a6fb-4346-df2d-08dcdcd970ad X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: 1wcBrNbOyEeh2UHnyjYvfBHX0U3sz9Gpm9LuSwNEVgA9A3kuhTaWt7aHMCPqSVyNHxRdQtCS4/j5NUPcdEGM7h9eJcIg8YHoh/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FfEqmED2HqyRRHsWBGpqEI3YK0GFR1oXNkNh2cpRDkFUpk18Qn6ZxbP1zmeErVtgjoW3jCLcX+cNPrbwGsvWVrdbKwpEZ0xk2QmMAZPcKnMMAl3uGwxKghnSI0nKGaw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AWoTv0/pcAB1Zn4wITGEUcqS14Ksmsc9HABKZCntmMSZX1Cwe72qNlJM2r+ppATsX2TnvFoCVawVbfBT9cmcVHipe1gpUjlfmdmfsTjmiDW4qNlEmX3KR0AVoih7GCSrXY7nOTAKCniMreKvRGWJMAHju/j9upVevxURuShGBKomsCfx9FK+5Bhm650sdSmovgDdj+BYrAKqgoUfbMJRuXM2moo8iDkcu/gVFKKui27EZJPVV4ehosxOcVkU4Czobkt8E+0ZMOgMlYzHnPk+O2JUbz/PegRhkG+zVlaSMB+wKz97HR+v/5inHqZ5myc+2NU9bV8ImAnwR2zRAw3r+85SvcJSN8yM0IDWeMMG5pKgbMquKofmB7gWxAaGSe7L3uzGyASv8atD8iXlFAzQV6H/aSuK1GqwK1nelAhwCfVX0c8j4AwMEUBOmGJEwSdRn+GxkqIv85qTu5A89GY9fgxg41PtdrlxZezev+Bh7zu8xzAz7ALZLBuJi090nYs/J4Pu1MWudaHre5LzMe6Orml0sW+C+oK7B/E5z0uCNT3c31otkhpG2wzcv0scV7TPubCYI4rsGwI3uihPtFsCo3g7JlzzTeC/ecR/QnASnwNj7Xyw91Dq5o7oFz+E8fe3kXqu1zZk5oPDkV9x92Yn/KUjUQFZhbunch2/X1Y8dZWrEPELTJReBrNC94Au5lHU4izF/AGtel3Oc8tiQnExviI/wE9zPSfFCi7JExSY/MwE9Y5IimA/NQdJotLWH2Fx40CECpSGPnxHtTRS1IX81Mtet73YqGEoLH3wXE1//LGTF7BL4FfVrJBzes/dASsl5dCy1p9x8rbJBl+SbjxHfcL+COcWW8sFKv8CD5ud4WBJAzJ7do3N8pKokDL/rb6RNRoCa4g9lAeL65uumtajgLwNdgoJ5zulRd//xnPg4jfulhT8jEa7x0+6FBZM5mHm7BnvzrCQxkoiTLPP3FqdjfAeX5yNP7z5ZqfSsF5wMvbqoD3zkXn7RGJLNaMyfWW8grhfITHsrXddftcJXA3Fx2GUHja8TXPNPOU4LEc1tAtrUt/j0hMxQVxb9Pn/5Jfo5Fd3WsXr5LA1zYMA03VK1APWaOOiB4eNW1aLgjnDZPnKbYLMWqaHl5eAO98DpPNmn03xqW36wBtig7rj9jJ/QVNKUMe/G2ryIlJG/JLmzeq/r1AdJpywyN2s3u5aVC8f20s9gOA+fJ4e/ajfcK2shBd2pe2gJtUPEyAUQ1/+wrFo7Dk2r/yEZFO3eI+kWHpNauVBH9qaiG8m1YNQCaMKUXCQNGhUNj35D+A/kP4DPjsJG5HnDSAcML4BitiNPEqRv/+LY1gmP1uSMnL8igsMUTIMJHLDnhETM0oCX+0dRtqCSYTj7EUK0k7BDIz+Tgj4t8Q7jSA+Id3xhtImiT9NUuC0CsxxNVqghl38iJpU+bmq5DdVqSF9c0ST7HyA2TTy2eRkVsHWZHipVo4isp1fjfaX141rhl7PXGuuWwHWc4ppizg7VODQMozVl9Exk9jBrDdcGWfNgWcvyDMw5k8m0eSeWGsanHQHitU87EYWSVWf5LdAnf/675gPXb+ki79tUwZCihwZPUmxTBG6A9LSLQ== X-MS-Exchange-CrossTenant-Network-Message-Id: e0068f92-a6fb-4346-df2d-08dcdcd970ad X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:43.8226 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SzYU8aG0Ivk/eGxoM9Cm2vTflmXg9WMrHZEngiM2B2S8f3lHADqiz5BYXxtnz7So7LRSmdnrX8haAQ76ahwSHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This aligns with the current i915 display sequence. Cc: Maarten Lankhort Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 5cbee5040e91..0237d458078b 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -364,10 +365,10 @@ void xe_display_pm_shutdown(struct xe_device *xe) if (has_display(xe)) { drm_kms_helper_poll_disable(&xe->drm); intel_display_driver_disable_user_access(xe); - intel_display_driver_suspend(xe); + + drm_atomic_helper_shutdown(&xe->drm); } - xe_display_flush_cleanup_work(xe); intel_dp_mst_suspend(xe); intel_hpd_cancel_work(xe); From patchwork Tue Sep 24 20:35:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811163 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 F11D2CF9C6B for ; Tue, 24 Sep 2024 20:43:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86B0810E217; Tue, 24 Sep 2024 20:43:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YpB0z7Xl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CA9A10E175; Tue, 24 Sep 2024 20:43: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=1727210583; x=1758746583; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=5TKCzzGEjJp6YTGU0HI7gI7BkRCiKrdoxbvu4bBM3Yg=; b=YpB0z7XlYDmOhi3igkx6gHkXBZyZPXhFwy2k7NUnIabxXwJ2Q2EuWrGL BU+NoSYmTw889Ty4Uq+b6pTjCTuP0MliHfUK6nfmuDDK2TQXPRgYil706 5QiTTtBZWTAPbj0FEu9gaX913UR7TvOpChR+u5I840DUAWnyQlGdpOf75 Z/tWXaQhaF34hF1hWL/VbOfHDZU6L4b9EBrnZXujjYn5XPEqpCqWG/uGt aIfnbmj9mdJirUMzpqM5DN4wd76MATrRSfc+yCPJjoDavB12YyiklyhjI 3HzSoQK043C5WAULHAYgsOJa/UDIAxDOgLI63TzgiQkDrnV6ExgbbO7JP w==; X-CSE-ConnectionGUID: HiWxGeiDSaeJiTBE8PvaRw== X-CSE-MsgGUID: CFKA3tiYSQiby6jBrnEzFg== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26099173" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26099173" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:56 -0700 X-CSE-ConnectionGUID: E4cnOq5LSyS1Mghhb9HUig== X-CSE-MsgGUID: Rd2/XhTkSVGrIbhrH2q6hQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76469583" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:52 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:49 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:49 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hRrrP6uk1KVkL8xKpl8CFPE6VDziPgt1MsPWYbTnsIEKEIhGWRn3PBYQ3YGaKXywOf/qZXrvDiNsAxhQ7rPOpLRo8pXgASf5PI0dS/XxWxfDId1KX/ooOTYKzp9jUdtg1+AhvRXmcCfavUdMwfnl4tw3BBbK9u1vmv4DkR+w46DLEXBpW/Vd4gJf7FNI5swhv/6r6RUf+ddzjS/uDdlegaUt3IYr7aq8nd4HVnJC5gY5c4SWGBiVANh8jyI7D9c+imOv4dNuwtpScAuU809CQB1RGcbzHl9GpbyHP99tkRWvbxSk4V4JKkP5lcEcrT8oYp3pmUTt2zwDWINDCNrsBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0hjJTP/YTaNgCrBnEIpKq5ElmIiPB3ktse3hYsMz5nI=; b=xJYY8hOdZKqP4dgtNzAQjT4+OZymhrGilkNuQHz+Eadme5uK3MqyuARlfPeA1saCLnCjvFVsw7oJWkmVVFwrfz0Q63dWMtn2+vxFdJcvwF59i5QZGLyuPz/8fO1CH5I7rxvdvYsIIVD8NsJiW4proz5G8Wyl2qcjI0TKb6+kU77duKflK+ggJfQjJYY4dfp2pcqGV7qEJAz/KNNwUlaLfdrkeaKTbHWn7bmjUmvTxWHoxYGiuXkNl09XiBESQORCozJmWwjxXaslgPOFeYISmib+WJ8G6SAC5j62btY8ug6QJfgjxLJSHnYyP9ndyNs1+8ZGNNNHyCjoNS/QGLTU3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:42:46 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:46 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 06/31] drm/xe: Use i915-display shutdown sequence directly Date: Tue, 24 Sep 2024 16:35:27 -0400 Message-ID: <20240924204222.246862-7-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR05CA0028.namprd05.prod.outlook.com (2603:10b6:303:2b::33) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c7b9ae4-3bf5-427b-5be5-08dcdcd97269 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: Kr/ikDr2zcQbapSEj+12Hw4kd32jwxNVAPz/3M0yllX5sPppyFyD2dRG8iH5ww/bcP519y7nb69NmvH028scfB1YZKhSN7M7x38WJw6fhvfdbE4rt3Y0clXKcuQV5z0tFgAK/2000KDWQhssSw9dshp2ZqPFOcCc0xCWwHmOs7ObkVebXAqtQk9pbcgCOcRZ/jXK1WTK/4bYG+h5ArQXO+Bc3nedboLQ2n/fUK8XQWruczyBtQWcRGTlGJG9aBZFP+8WQM3jh3JJ8th4fRbv3GiOXQNTXczqGNkt4m0yD9cjZcv3haE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H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d64qme6B0MaCcp+yWs/mvdT6od/C34iLrP0mlhlcvmFJSQoJOFjQtFZf2fpIsFEc9ux2bwZPDg3/Dggy9/k0sIVU6UfHuChUSVdP7fuxUL7SpAH0/ULCYGGIKIpUGbT458MuHWK1x6JjoNCmw2t8nU/nwW5K1ex0qRqlQZufTJPRaCKWJjp7OZin1hRax0S12Q/SsW35TdX8Ey4XdzPDViPeRSuK3Cx/0Fgi18W3mPPzAmeFCv5nV/vyBJP0VHc4n233ib0XsBEtIruRxM9rTUxITqwiCgpiwBUAI/WQejwr0Ska+NCWQGH/3EbyiozKx12COFzkIvRATPZdIiJy3ihIvKzD98n4SLG1W13M3XFZ4fpRYN2yAQtCWNDHemImFukeiei2kvMwUT+SCMLL8gL+xZMDs6MNsGTPtgBm0plJtIP9gbviw8GDQDLqqSRZFgJjPBa69Iuf23RLn1HaOoT6jpQjBSb/9K6mlrUDivZ0dFFgTYlw5V9vrQWIcehBLmYQF7mykY+BMc9XuZMWHnqC+bcMQ4O3O0yB/LNqebTAFzGFVcYcbe/Eeh5ZQ15zoVHk2jtUGkby8oNbN7hrTPAKTki66UsDosGr22N1ZSkLRZzuUrqHD8VW/p3cBUf05CQVuTQfTHS9eR8PfcKWDzD+PR3azJEdGIPd5kH0ONnytKuC9NGk73TGwNdTNWvU1rDEOcky0ke42KDeKgLpxgHbIsxTMJjR9FJY66LWff4J0cJT6LWyLunSfMfXsBL5e57OW1wNRwVuABEuPbm7nwUi68WQ+hFgiH73MOFpyQBUoXzkgHiNb3HtBYXO14WSSWzxvrMTPoFxny6sygYZN35916yRmNLZLE9WlKWqnxdgViuyHQAjocqIz1V1CShxugbQlFZE6m7L6WZEpYNE70rvQ7SqbYmzQCNyq8ZrzdjHreOKI+MsEGEdZSsoCufGiUgdO4k0doRaoJ6x5WVX4JzYzl0Qc5bNxkJkuBJhvUYHuryCDgSBqI9xUz+pAdhAjrup/U4T22RWlvmK1QjEL+QikeZtIUx03q5VbMw5ZEt9UKvwEpMz9x4w6rT1KsaJ5iN0JMePnIlALL7Y4P4RXqiH5IgLB0iZn0D/slx9X+qOvAS5m1aJLkDeUL6a/3U8ApMRZ1OGmAB2WjJZT3Izk+KQGeEXkWJefu1pDW5urDXijWNfQk/Q1dkicaCKANfWGNHX1wpeeV5T/B4rcfW8FXbBKZBDZerIAEf1ypEmcfUfL+h7710V5FJBB2tp4U5o+teALqyXU/pRW7jllQzmtg39pMkqzVjicSyUkchwANNFUQdZRMA8Y1uCUESJ6Xs8Gxyo+jU3kLFWpNSwZUXiU4Q8pvqMixxQNF5VttE6PFwUEJcC6BCje9HFeB/dX6JiTpGSSmxCo5UEpDOW22S+VQwgvSagkE2dnS3fu7bcKOGZjTQuUHkoWNb0IzL/YjFzq2pZBYIvV3+/F/xK6fD75PGe6fNGrkYii2poHyccbB5E8/E/YlFJwFX8QLoFQoZUQ4Lyrg8jpcgVnIBMIDCSTYlSCY3sg1Qjomfdy4/r+wqoPSShviqrEXJnaz18R+soBtfLsH3CEPyzamJCcJE8yw== X-MS-Exchange-CrossTenant-Network-Message-Id: 9c7b9ae4-3bf5-427b-5be5-08dcdcd97269 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:46.8498 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UF5khZMP45Z0Sh21MPTN3SKxMivuyv325D1Lon2kiYwMb8YexGvaDVkAsOELohe419F8F2pXHsy1aw/ddQj29w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Start the xe-i915-display reconciliation by using the same shutdown sequences. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 46 +++++++------------------ drivers/gpu/drm/xe/display/xe_display.h | 5 +-- drivers/gpu/drm/xe/xe_device.c | 4 ++- 3 files changed, 19 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 0237d458078b..b5a2a09e7a71 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -355,32 +354,26 @@ void xe_display_pm_suspend(struct xe_device *xe) void xe_display_pm_shutdown(struct xe_device *xe) { - struct intel_display *display = &xe->display; - if (!xe->info.probe_display) return; - intel_power_domains_disable(xe); - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true); - if (has_display(xe)) { - drm_kms_helper_poll_disable(&xe->drm); - intel_display_driver_disable_user_access(xe); - - drm_atomic_helper_shutdown(&xe->drm); - } - - intel_dp_mst_suspend(xe); - intel_hpd_cancel_work(xe); + intel_display_driver_shutdown(xe); +} - if (has_display(xe)) - intel_display_driver_suspend_access(xe); +void xe_display_pm_shutdown_noirq(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; - intel_encoder_suspend_all(display); - intel_encoder_shutdown_all(display); + intel_display_driver_shutdown_noirq(xe); +} - intel_opregion_suspend(display, PCI_D3cold); +void xe_display_pm_shutdown_noaccel(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; - intel_dmc_suspend(display); + intel_display_driver_shutdown_nogem(xe); } void xe_display_pm_runtime_suspend(struct xe_device *xe) @@ -405,19 +398,6 @@ void xe_display_pm_suspend_late(struct xe_device *xe) intel_display_power_suspend_late(xe); } -void xe_display_pm_shutdown_late(struct xe_device *xe) -{ - if (!xe->info.probe_display) - return; - - /* - * The only requirement is to reboot with display DC states disabled, - * for now leaving all display power wells in the INIT power domain - * enabled. - */ - intel_power_domains_driver_remove(xe); -} - void xe_display_pm_resume_early(struct xe_device *xe) { if (!xe->info.probe_display) diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h index 17afa537aee5..a801db19b64f 100644 --- a/drivers/gpu/drm/xe/display/xe_display.h +++ b/drivers/gpu/drm/xe/display/xe_display.h @@ -35,9 +35,10 @@ void xe_display_irq_reset(struct xe_device *xe); void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt); void xe_display_pm_suspend(struct xe_device *xe); -void xe_display_pm_shutdown(struct xe_device *xe); void xe_display_pm_suspend_late(struct xe_device *xe); -void xe_display_pm_shutdown_late(struct xe_device *xe); +void xe_display_pm_shutdown(struct xe_device *xe); +void xe_display_pm_shutdown_noirq(struct xe_device *xe); +void xe_display_pm_shutdown_noaccel(struct xe_device *xe); void xe_display_pm_resume_early(struct xe_device *xe); void xe_display_pm_resume(struct xe_device *xe); void xe_display_pm_runtime_suspend(struct xe_device *xe); diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index cb5a9fd820cf..7c698b4b265b 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -822,10 +822,12 @@ void xe_device_shutdown(struct xe_device *xe) xe_irq_suspend(xe); + xe_display_pm_shutdown_noirq(xe); + for_each_gt(gt, xe, id) xe_gt_shutdown(gt); - xe_display_pm_shutdown_late(xe); + xe_display_pm_shutdown_noaccel(xe); } else { /* BOOM! */ __xe_driver_flr(xe); From patchwork Tue Sep 24 20:35:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811162 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 0E2F1CF9C69 for ; Tue, 24 Sep 2024 20:43:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1A0410E747; Tue, 24 Sep 2024 20:42:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NYP9GzMU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id A82BB10E745; Tue, 24 Sep 2024 20:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210579; x=1758746579; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=seIsQ/HX/Tycq8GRdGQFwnWNtaxFNd+VVdZHBg+KscY=; b=NYP9GzMUHsrb1Rf/PJKxBO9TA0/6Sw8ZZywzocPe4/zIp3KrXiIChqt2 J5tiZW3wKGvNGyDCCxcG2nCglhqrRAJ+jaSyUux2TFZgCYF3Owb/2w3/4 pf1PtyrAKyc5lFCIU9U4aGsSw+of9Rzsjr30cmOEe4+KWX6TvKjgJfpug P5V5I2IBCK7f+QgqwyeyRStIgaYtqlts7guMbkKHPe+ppm+pXeJhurVyS ntYekQg+p9SU5U0FmvWRAFtTAeAeGLeHW5djiAYubtR8EyPB3lljBVT1l VLQGhfaSl1iIdgwnUqkFqYaSnqxGAvO4B1P5M2ln8gjRRd+828bup4qH7 A==; X-CSE-ConnectionGUID: VCV0Qkh1TCaJhoz3N9mVNw== X-CSE-MsgGUID: YIP5soqLRsScYnX1lH+AlQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751480" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751480" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:58 -0700 X-CSE-ConnectionGUID: Luv9eSUgSDGGwijHLq+CmQ== X-CSE-MsgGUID: LfnnPu1mQ0mLxDnRxNjfFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298528" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:57 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:57 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yOs8jk81PMocvT1vK9ZH8bW/33HpE5GiAiCIfrSAT59jdtuarTp/nPMkLQ8xl9MqdxXelM4s9pSZ1eoyr2YZQMuDsb/fm8kA50PIapBP+QKU07x+JGEwxKDATqUrKaEnkU7zuZBQwv0b7J2qXPSRj6HFBKrpHX4nLGyZrL59WaK/HNmTU50Euw4AyOF0iALtogH64ajmuTFXcI0OiLbGZrfWwb7/RMKE53vcyfMZ97V/ft2yGSiQITWycq4ziT6OM/p4KtklBgzXQEDeV1KrHKVXjeZ2Cpa/OpYIB8zwV2/vjiitrpZhjGNme4e3+bTfBAiDRpvS+8/rM9QWA986qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CgPsbZIV787otqdca2s/ULTWWamoG9C7I97E6+FRagE=; b=OwFnkLPjZ6IFcEDUtDLPOT6AOwvp06+yMERO3cOGbbAK1wafnnh2YchRlevFb0rPrHlTWrB8JXOR2QdjqAj7YWZ6wtV+kcWT42AXhOlM5YARfaoTOyrTr2E9wkMrBZic6UFCn62XNlo6Pct1c20FfXN98A8LTRT1vdyk1GXyTm9kPw2VWoab4+QkkBjqhBwaIvJl3KmRDLXGFJKktt57l2z9Qaef/0QQlLwv/f+4uIBHffEDeDKnk4Iqas9c10XIxg5gcWH+I3Ew0g91Gka58/25fpTpUE7l94jHGoXS1xGqwylge/cTGGzJBWZQU5cmcmADKFCrrjQ/PrPQUsy4eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:42:55 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:55 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 07/31] drm/{i915, xe}/display: Move DP MST calls to display_driver Date: Tue, 24 Sep 2024 16:35:28 -0400 Message-ID: <20240924204222.246862-8-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4P223CA0011.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::16) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: de2e7e5d-66af-4620-ba32-08dcdcd977ad X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: 2A0XG2Rb3lRGb3snsxH2LMg7kTIL9B8JCF71PX4o4Qbq5QsNXgdKKrStNDh7O59n7d6VZZyxnv12tSVP68ojW709kYiZOPIcWzJ8XAm//21M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oeO+ghYQDl/Evr5vF8vkdH754ixoxIyVUQMEvuWjFvFCxVALPFjT+9PnjW4VUGTxPNz46Q8PfMX5iZHZh4ocBUEZx82sNXnfDlct9Pf8EK5ySANQg3Yw3ImAWQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fIw1aDyZq5mbhbugfbey+62GX5+PGtxVulcRkisHSjwfvKyzQfPxE1h+izCsBlwHJV5S01K51nhygr+/afzxsRU52PTVRc6U5R5XFqm4idrm17DNNFNLs7ZPSccE+zCmfDBd/Rz6XzGG1TEwcm+oTLK+bPnojI6k5ZjVk3et1Fk1GWIKvsnrVOP07s6roLPKAtZGvjAjwpYRX3RkxxX8ilKByJvYKU/CeyFA5wA8Nrhtptwnts0NJFmzsHpdrqNU9DTtovWWbILa/pvMRmizp7q4qYc4c5qBRgXjWqJMy7FhaQ9MPEpD+NezHIYb6zfH1zL45X13jh04Hp7+eDD99HT2ucEuWr4hS0TJnq08mpr3Eebf0j08oIzMKsk0NSOEV/G7W0PpZrIagmz0Jk0YanySM5C2N5n/44EI60y2cq1nAarYdKf8M52URyLYVucY76KGMhZLi7bTd2gl5G/+MS+QJCCPrdqCKZONUIV910zTCYe+2qe0dsEVhmaVH0b91E/62/SuIzTSy/hyqIr9R68ZGc59kcxvlkdySUejl1YXUHIJGeNZibdo2B42BtOEjQ1SDX0+z73sgjViu6op5BgjX0tDhZ4lpU9fjQ0oJ7aRMYeyQNev858bjcppNJxQedhALzLclRYJ+DQobqB7hbj3dad8OkynLC2qTYEk41XXQ8irrggHq3Ezlcv7t5Fw7yw5sh5i3RceJX6FO0TmIQMy0OKUJOPYO9MWM1XTigzLPG6c0Qm7Th6pro9XyE548p0TYtiBAcpMAKACoelndq9mCLljXBIOKZRB3Do9hq5u2pusMIjOVWWpEQ1ZNu5/iTHURM4Jn3yh9E9eI3+Tb4+98VjYwJLmYz6ByDczD1Z7Hiv378yqDCUz5yq6dmA1LzHRUrCY26GK7AGCrQTNgOurHm2jQyibn8D51eAPb58uOjyL/6YaMf77B3EYfQPenCTOPYzJb8N7C+1Z9G1hNRdx6qHtzZufsobOXyDu8qThvWS26qGOt+ytLNvJq0eimE2nwrgH4x+ftMBr+rc+eTypmS8ZvIn50Sul70tulP7XfLhbstwJGy6FTJ0Ogv70IJ4eoF/TjnTW6Sze8XFPQoRWsYBeLM+VMpkOL9eR7CereaPkxGWSjvIFgRzf0I61vow7eVMffsGhlLvnHmAITwsOLuHty8xUhlMJX7CDTPPXiUIR32EQrtk1LokvyB7N8pvaEEZunXbhMFVBMDESixA1sf1RlUw7vIUy2NbUEravCkvHspRCKRZ2N2ZCaUqqSLTGs/1ET85/Eqc2i/kOjebtNwNesNSRmP12P2WyWfNDb+78k7pzHy1ocdlqdrH5DEWJxNBPiwh6Ea8VTfGPmJfgpjGior2FefU/B87uGdkfB3E34dOhdoKGkTQQEOvkkDYibCnJ19bPTv9Y6T4lTsduSwqdY2atk7rINZIduM5UbNNDt3vLBUPImQzcSewi3Vchoh//Yox2DQoPPmOWbGDQ3EuplMxpHKa1GOW4Yu8O9d4fKaJjOS0cmuesqEd72V6OPoZ73sglWOqsjnT+lsGZdkyCfe4W027xu/7PLQNjaHXHAQ2UnkLtJgGjoXqazRCk/w0Rc+tkDUtGZkeQkA== X-MS-Exchange-CrossTenant-Network-Message-Id: de2e7e5d-66af-4620-ba32-08dcdcd977ad X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:55.5668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8c/tgXkB8APZJGT0nIdC1z2OOI321n5SIBm6pFmkwzSTm5EFtnaX5v/PVNZzGmGSWWYiRxf2MDffMiKIgNLRKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move dp_mst suspend/resume functions from the drivers towards intel_display_driver to continue with the unification. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_driver.c | 4 ---- drivers/gpu/drm/xe/display/xe_display.c | 7 ------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index e40b1105168e..51fc1c148283 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -676,6 +676,9 @@ int intel_display_driver_suspend(struct drm_i915_private *i915) ret); else i915->display.restore.modeset_state = state; + + intel_dp_mst_suspend(i915); + return ret; } @@ -729,6 +732,9 @@ void intel_display_driver_resume(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + /* MST sideband requires HPD interrupts enabled */ + intel_dp_mst_resume(i915); + i915->display.restore.modeset_state = NULL; if (state) state->acquire_ctx = &ctx; diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 38c845ad86e5..d166a8164b42 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1013,8 +1013,6 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_driver_suspend(dev_priv); - intel_dp_mst_suspend(dev_priv); - intel_irq_suspend(dev_priv); intel_hpd_cancel_work(dev_priv); @@ -1182,8 +1180,6 @@ static int i915_drm_resume(struct drm_device *dev) intel_hpd_init(dev_priv); - /* MST sideband requires HPD interrupts enabled */ - intel_dp_mst_resume(dev_priv); intel_display_driver_resume(dev_priv); if (HAS_DISPLAY(dev_priv)) { diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index b5a2a09e7a71..bc5c00437ab3 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -332,9 +332,6 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) xe_display_flush_cleanup_work(xe); - if (!runtime) - intel_dp_mst_suspend(xe); - intel_hpd_cancel_work(xe); if (!runtime && has_display(xe)) { @@ -426,10 +423,6 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) if (!runtime && has_display(xe)) intel_display_driver_resume_access(xe); - /* MST sideband requires HPD interrupts enabled */ - if (!runtime) - intel_dp_mst_resume(xe); - if (!runtime && has_display(xe)) { intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); From patchwork Tue Sep 24 20:35:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811165 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 144C3CF9C69 for ; Tue, 24 Sep 2024 20:43:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B96CD10E745; Tue, 24 Sep 2024 20:43:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="h5bMD2dT"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9532F10E745; Tue, 24 Sep 2024 20:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210592; x=1758746592; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=7vT67THnvVvfAgaGQ4KGrSRkkZ7vM+4mGnO/7kycON0=; b=h5bMD2dTcbG6m56OdnJQxJrMlMh7lXNnFDYSz3pReEmPns6BiOh5bgmu Z7s+A0ajz6sNiSzDbNYlnYVYAIdpRV0ArBipkrWlOmU8G8AcgxPQDUKgF kfM3x8zObBwP/jEOMwlzVULPHfacD6cXAarPRjrTJ1nvDTqKdlh69TJg7 S+DarVRw7pGRp7WVHXG7ojlqgbKkWA0NBohtGgpJJ8yEsS5k+tTOnY5+O z6htAhVVxoZq4B67Mqn/q7NlPfbsNI3v2t21benJOOu0cKLz/A4lz1AT8 OnNU+2ilOup/agWdvELHESX5V9YW9jD21m1y8uWzaqdTVU77GZnAE/9xW A==; X-CSE-ConnectionGUID: 4REYvuyfS5G2pQ9uwQ8A7Q== X-CSE-MsgGUID: s1mlGYy4SluZChIcVT+zmA== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751494" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751494" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:02 -0700 X-CSE-ConnectionGUID: O9zAUEc2R1GEzUmp8q3fhw== X-CSE-MsgGUID: afbFwD/NS02T9/bs3lVDoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298562" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:02 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:01 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:01 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bjzOYBTh9oc34bdVE2g36tk3Ob7pTYN4Epgs8Iiq7gb+xdSS2VBA3Fld6saTwVwrBG+X/pyPUyDADDFGtpRz86lRd/II9cUpy7rJUfYLK4xMlMwFqK2uNEXuVZ/kAQAKOXarfu/x5nQChpktuHJTYKO8KfZu/dJmp2op9eoBaF0Bir8jgS0V8ofXV63f+k6utcQNCng2n2N76DtFv7iXmk1dEFV0+x7f4jMzeZMrtf6S7MYgX4Efwkh+gwWymBQK/BPQwR4FIo6VUM5/saOBSZxy/mfdI/5gSwde7pzGblWt54tvZKVnlhUVllimS0Tt4fLVAJzAc5V+cf9xe5zKaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+XlrxMIwl83/cp6qRHTBgR1t1XuicLvMHJHVBaL9MoI=; b=VQ11VQZIfgBiLGwpjPPGKzXVmTwafAL1MTjajMBxCCFWt/V8g1IM4nBoSCGcxSMlfw/202CM3WnrRWMC1izqYXu697KgPbe4gb3GEhRuzgUcMZZ0Irk2YEz+HsowQI9wPlwDkQLSD6Wwt2XF2CQI5X3o6K1+sJ2zCGOIaTUL82BURjhL+KIhU6XZFYKA1zg/ZmCXNFYNsUShCOiZOKuPXtZnnDMFOKuoQvUGE4DN0xs4wKkPU8j9twTfa/HFO+8g/08bAY6HvwrGxgsgYtdCI8Pk4iKHcXaWs+0YLu6zxZaRbRWY0KUF2OWCt4rnzCEcz+GBEMY0prCm93Hdb5Ee4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:42:58 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:58 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 08/31] drm/i915/display: Move suspend sequences to intel_display_driver Date: Tue, 24 Sep 2024 16:35:29 -0400 Message-ID: <20240924204222.246862-9-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0055.namprd04.prod.outlook.com (2603:10b6:303:6a::30) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 0de20ba9-ebb2-4dad-c69f-08dcdcd9798f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: FGfn6wA8ic0xG7aASBlv3d8jweHmAlFweDnBmpNNGk5e5gz34rUW6n4q8h9RmlJT33jBFKMbVRzxERkUFaEYCYXCAFNcutwOSg3v/7P42dDGfhLWSMMquRuroDtN3zf3BGuXwSnzDbwDLCLJVd4FpIQiXKXfqCJ8bg5BuguxMMdMfHHm/QUsVSwYUbANKH3TPhYsqN/AP4JOZzZe8MLzPyPnPiRSC2KkkD5v4EjMK7JbCoKVk9c9Zni5D7RRivt9YTzmH7zXb3/tuxWXomqcvbCXsmMl9bVZRh+qamTMdPW7+NogvS/4hxeAnkS67jH62a1+YtU7+Vle5/aWp1mMILJdTzfwSTwlKj1IglgSHsgCkWHmWAnTYYFo3dduYogt6WkLEvSReujurw+GZFxJtcshbhTQELf1rq6xVoucAPKAoQtPuxs6HhIBlZ1AEFzi6x4MkxPIy7QvZWakEmNyepOXzHuVF4RK5D/ieGUB6+XTf6nFMYAMSKLztLMr281U5FdJCmP6SXEkv6rWBoxS5vcWe/3O0ocnGOJfFsPbUjSDeqDXn6YnwQ/PuVwzfjcb+NfFvHARs/f0Wiu/TvxMSQ9stzPWIOm+6+sxjpqfU27+v/ZSloFA98rWp/Nf+UChjhKyEXrxnIYTzSsZd2tIBD+vvJoYRFakz2BWyrzUyL+vX8DpSvWJf5H4lc4WH0/m8OMBTY8UyxGVIuAKGIiaH62A5L7DipFzA41wq7SupKT8U0uzDH5tN49xHiYYAi9fI8uAmkLxf+WM4fX7/ZBaZPTwUB5XOf1odidqMOr90pitmMESmcblZZ5r5GzLbwOxHXumJJFR1Z7mI80Z03aUxepl7wk+vZJlzG+IrQNN/TUUYuZ4xVL5G46/Gqn1hsrp2SnZj5Hai4h4pugoGPIu7botQCsYESj+3b33OQESDyU7b5R3akEf5umRbvXclB502ZvwsWkbR89g5J8cjhgxuBS+paNE/MIpPd7xdRF6j7rJsscFuqGc9TXpbPY5mExQSFDHSpoWBZ32owcE6x2i0N5Q1P5rIoOhQQrybyU+GEnwZEUo71Cycm8A3p248RZTzQoM0DXkCPItCMlJnD8UAWJ0aDN4HwDcU8zj8teI85FI0vBhS5bIPUV3SER5GHRVsxU43Xe4rTGMbNFX6NrwqN9BxTcx+cCPTpp8Lcw8EinekYgoo+zeDglXHQW0f/mE5K92T5iFh0CGmjvS/8dne1i2PpaS1bh0dv9V6BwW9yPW8oPQ60JdQ3OMR+xIj/X9AL0JNn9nNBgtrif+JCvtNQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KsG3sC4Kghdsg2JctOXyFCCXfjZth8GM59C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mAH0Lq9ZIfo3hfKCPP/0cvSU/+b+CCyTp5gVzkRUCDy/A1QgE16CExOx3FRNLeh1qBU3jOkVw1UewiAXJXxkycla59TxLF/67IlZqZxTMlMQEHmHNoOzBWioaxE8u7UYGVhN2fGY73me2DeLZnfCo04iB8somu/7PSGRHRVZ0N6vfdWY3JO4yvbBQBVi4upFY6gIwNHg48zuRYk612AZj5cKJ87r8cowsE57/6qXflI5zqXgw2hs8kV7wUbeRyazkZoOooJCnzkhjW4BYEdFWVBC+NQa6OYWjiWGAgMbUX2phLijRArVGL0TTq5Va49dQzQ0HgdAMP1gOp2avDVO7TzW9wbtfG+Q1MFOyJKRid60FgkhU4T7jD4uyE4cMMncORPICPDoI+3ivlKkK+s+Unm+dl7H2gGOvkn7Lx7rGwds6CyHys6RlSTg/mhPb2ZZqSWhb+Oms6S74dikE8CQui5bkMpOy1/efnBJ444WbRbACkWg== X-MS-Exchange-CrossTenant-Network-Message-Id: 0de20ba9-ebb2-4dad-c69f-08dcdcd9798f X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:58.8089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s4zMUYg37bRyiyd9sXh7IsvVAYpHB4K5zeX50HSW/YKr8Z0wxGSR6PAAYNRk3OzI78UeTrQpGU4xMADQvcdHlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The goal is to reconcile the Xe and i915 PM functions. Start by moving the display sequences from i915_drv towards intel_display_driver. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 20 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 3 +++ drivers/gpu/drm/i915/i915_driver.c | 14 ++----------- drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 ++++ 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 51fc1c148283..42624bf80f91 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -36,6 +36,7 @@ #include "intel_dkl_phy.h" #include "intel_dmc.h" #include "intel_dp.h" +#include "intel_dpt.h" #include "intel_dp_tunnel.h" #include "intel_dpll.h" #include "intel_dpll_mgr.h" @@ -682,6 +683,25 @@ int intel_display_driver_suspend(struct drm_i915_private *i915) return ret; } +void intel_display_driver_suspend_noirq(struct drm_i915_private *i915) +{ + intel_hpd_cancel_work(i915); + + if (HAS_DISPLAY(i915)) + intel_display_driver_suspend_access(i915); + + intel_encoder_suspend_all(&i915->display); + + /* Must be called before GGTT is suspended. */ + intel_dpt_suspend(i915); +} + +void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle) +{ + intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold); + intel_dmc_suspend(display); +} + int __intel_display_driver_resume(struct drm_i915_private *i915, struct drm_atomic_state *state, diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 1ee37fb58d38..179fbb86923a 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -12,6 +12,7 @@ struct drm_atomic_state; struct drm_i915_private; struct drm_modeset_acquire_ctx; struct pci_dev; +struct intel_display; bool intel_display_driver_probe_defer(struct pci_dev *pdev); void intel_display_driver_init_hw(struct drm_i915_private *i915); @@ -25,6 +26,8 @@ void intel_display_driver_remove_noirq(struct drm_i915_private *i915); void intel_display_driver_remove_nogem(struct drm_i915_private *i915); void intel_display_driver_unregister(struct drm_i915_private *i915); int intel_display_driver_suspend(struct drm_i915_private *i915); +void intel_display_driver_suspend_noirq(struct drm_i915_private *i915); +void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle); void intel_display_driver_resume(struct drm_i915_private *i915); void intel_display_driver_shutdown(struct drm_i915_private *i915); void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index d166a8164b42..ac8bf00458b5 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -996,7 +996,6 @@ static int i915_drm_suspend(struct drm_device *dev) struct drm_i915_private *dev_priv = to_i915(dev); struct intel_display *display = &dev_priv->display; struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); - pci_power_t opregion_target_state; disable_rpm_wakeref_asserts(&dev_priv->runtime_pm); @@ -1014,26 +1013,17 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_driver_suspend(dev_priv); intel_irq_suspend(dev_priv); - intel_hpd_cancel_work(dev_priv); - if (HAS_DISPLAY(dev_priv)) - intel_display_driver_suspend_access(dev_priv); - - intel_encoder_suspend_all(&dev_priv->display); + intel_display_driver_suspend_noirq(dev_priv); - /* Must be called before GGTT is suspended. */ - intel_dpt_suspend(dev_priv); i915_ggtt_suspend(to_gt(dev_priv)->ggtt); i9xx_display_sr_save(dev_priv); - opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold; - intel_opregion_suspend(display, opregion_target_state); + intel_display_driver_suspend_noggtt(display, suspend_to_idle(dev_priv)); dev_priv->suspend_count++; - intel_dmc_suspend(display); - enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); i915_gem_drain_freed_objects(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index 79dbbbe03c7f..49dc91bdbcb0 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -408,3 +408,7 @@ u64 intel_dpt_offset(struct i915_vma *dpt_vma) { return 0; } + +void intel_dpt_suspend(struct xe_device *xe) +{ +} From patchwork Tue Sep 24 20:35:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811167 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 3FEB2CF9C7A for ; Tue, 24 Sep 2024 20:43:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC09E10E758; Tue, 24 Sep 2024 20:43:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="blQ4yVxH"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 434BC10E745; Tue, 24 Sep 2024 20:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210593; x=1758746593; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=i4ore3a8UpogcM8UHXmK0aMcLAa4Wg4tlEu3q4npATQ=; b=blQ4yVxHgq9FshE6E1xPCkZOv91vc7ssndsUuFkUkZdgWan3EM4AhjYC eSw0XldpyeuIa6lgE/0pE2C3RTYQPGy9KEAVEhEibsGm3J+6TEz+o07hE uw1vfy1TQj3brF2+D6xppq0f+FTxhMLd3G0LY2wBFvhfjZnhqCodqkQ8d ii2sE1Gj6IyHzu7qzdYX0t4Rb6Jup9t9Eq5FGIbWJpyPekMOkuE3Hx2g1 bRNMJDDqpUfUi/YJ7/XzkxKBKbYY2F1UEYNfNb8QYpz74DDCjYbm0op2K 6J9W5Nh5LIiRFYmeRPFySOKXRyOF2KVchAb0elZVGF2R1dUbi/eDpP9SH A==; X-CSE-ConnectionGUID: FPyaf2qGQ1KVlenkukyIlg== X-CSE-MsgGUID: BD31C4C3SyS53FCkpia8Ug== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751509" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751509" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:05 -0700 X-CSE-ConnectionGUID: /pF9skO7R9CtLgvfbhF4Sg== X-CSE-MsgGUID: gHKDaNxyQNmU2XGRcXpong== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298610" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:05 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:04 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:04 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.46) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Kq3X4ufoEm0RuEr9e1hArTntIKqjUNhlXPAxTfCA9XAqvG8mIx/3X5cR1aHTATJKVx09oE1pJrA55TDSteDuxlUyPRb6vXjz0LY6XARIpyzPZ2DcGqAcCfAfmYc1XklZd+HtXU0xQJkwpp87nJqENOxCKqEJi82aQTrwHmYjMt0U0pmJNt+eQoR6SeftuSDJjsr+F1jK2mPIDsO1tLbmaFpIw91RUp3ZGa2LI4NsIzar7YgC663goKi9tAmMBBQ8sctOpNNCQH2yUg0Koj4kLrJr1AcT17i/ZsjCPzAqUTI8PXps5eCCfP6p5XLceyOk4l4Htb02lLv1U4sDzJ+cCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MDfIxhKTbL+mnm0uCwP5GtpHNAEyukjMuSn80jHyric=; b=shbEeS5x25VyRYpVfojB0q5w0HZRiFRezDgRrKvHRrqOiuJqEKwfNjk2dTqw+HJXnAfnwAHc/uDlLJXoKKWEk8KDrvtA2LbZXt5RImFi+43jR/8M6ZSrNqSrnk2mJxTYoEuA6UhLg0Xm/CJ0mMyj+TMxuWIP19dHQEjdJuWLHvO6on743uMkXgaUo+QWnodRGllIaG5tqzLwFvULBxPZBuHF0h3WGrEG8Zvd/r53/zU83CSYDhefkiK+kgSt6c1+fSEQOHi/gTDSOfsWggs13QejMKXuATqeeKIk0jUz62s42Qo63jGtf/7E/vrbLrz1rrVx90J/95ZkEnc1iDf2yQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:02 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:02 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 09/31] drm/xe/display: Delay hpd_init resume Date: Tue, 24 Sep 2024 16:35:30 -0400 Message-ID: <20240924204222.246862-10-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0025.namprd02.prod.outlook.com (2603:10b6:303:16d::11) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 46fb441d-4967-4dd0-1f7d-08dcdcd97b7e X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: Nqmoq2fb6OoSNyMwRdzU7Vigf+Q45BgpYaiDaDQBZ+9PrlTu1lyjjJ2F5O4mIZuUxVCNb8Ncuhaa2POWpacQHpgeUaRox4xoUsg4E+SiaoL2OdIwnh0yPs9zvgpQvChupxMHLEjTrGtiHGDnU4deu8LQvDXIOzfbTjzLo4li3SKIhuFyLrg0+ulNwJKNSOld4myr/yf+6smxOHQ2xjYAfzF61MdAaCZgU4XUVU8TsgLgg3oa2AfmDH122z/qgtvqBwJjarsDhKT7/DhIsJnoMDDvpSCKJZXqg/px+xnoV98315DnePv7OAx/0KuBtPCUnARnZihY0tC4/afCu197J4xYowQSa80hgWLs9qCQZFljj76ANCP3WvS0cOhyMpzBgi1fAstTqV/kAVG1CPFWtqdl91P5iFK2EVM14dRK62mLiEWAGN2/FoQD8hqtKu8MJnWPWOJs+sLYX3n+mAQCyS6HuXcFhDj+6H3EFMpEVL0qj1oZoO/2Arq9ALpWRgGU9KrgLzA5YhEJ13Tpj743O6nGYHI1umTy4UuzBGGmneUPAc5qyZcFd823eIYUE8Vpn0SUl6hQvVKoUTMrAFfvrLdj61ZWiNm/PrFeuI6yIwMXQqVRfdHf5i3d3L+py2qKbKNeKBrNxS5LfGUrLDg2P1citJw1o/0m2sMDwedtuWKUw7+mzsbBxd8Tgq+aZYfvxciyDALQ6FvRnJfawsQ9uSxhiCWOWjTUlqgBsqRlroi8A/nxTVUaMUUcEai7s9ruyqVbTYGhLA1WqdGtlYYdK6oC/vOLtlPSllAcdzIeSK675fxYzit7e+Y5kOv7i7CFmyCYlCjqa3HGMqGXEX9xytZfU9v8g8RP8Pnd4IHduqyJfL2deM9zPTVtUw/JAJSOE0Omyr6nylywCsBKhib1fgmwOd5ZXytVKw0CoqT2zvUNtiGUT2InDcTMyKigbNw5LKDyCuovjOiwBunP/B01Nl5eKvq5oyuPBc4c69EMA6CxSkuQg7W4UlIjz9q4LBN0OVO/5Z7QM9vQbGJvPzAD9J0Jhj4gxynYp7cTEOZ0TbFJTHE4W5IgNV4CwUOjUVmHicbbeq17dgQui+fg03J0iGcYZWTjXUpqAc2Enh2DiqhEMY5yPX1TW4ywbdWmOLuxOsEKgHgpAEW/DFzUnoTlHGhO6Iuxvs9/rC8/g5Hw+Smtmr2vKj9jJOJpW7l2GeYOORf/Zdk328TJKy5/0C9BGpu1PsEUKY6nA98wIuJWos9Qt6P2XeUa0xDXR5+RS8t6M8rAYPXwW9gryWb+8UwBHQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aSt1jVnaoAQM4mhnRwr8fi9iHnyNyDgG+uTVglxQSrFf0eRTdCTsjpBNc5Laop6EleuO6lBVIGRGzE4GYoFmVm5czdEi7uOvOZ1Jpk99ttn30t2rGE0cJtvZZVO/9WcEfc0siXceIl6QOsHv5YoFc+8U7Pm34ilrYTZ4wV6WKCiZ1JmsFWv0WgOhApIOKQK+mee/3pHbjvi88EfBAaIr7o7su8EpHA+SeZFbMFmhDFGsmUpATOrOB88AT7u1fqAosY87FMWHM+exfOoX4BfYXGw9eBy1saKwvjaNH1LZRwuHXbJhf7uzc4uoxNyfWOQTSpTyY5oKCvcnOOE+EROTdWdo+ZTsDo/6Z7V7VOpv32bypPZpraFYUcxGZk1aA5a5S4dKrF/cc0Y5ineS4xhTeN7mibFMW2TAAhyuI05qw+hcGZczrr/m99W9zLq049ykfYugnE5BtDv/Yrn+8j3HP868ImEZ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4NYQacv0Xb27OyLE9yZtUfoFYK1f0h04m/FPOJPHIlUvYWhd7wQDACr9KIZUw9VVUYpq92oZ7wkBG6EeM5uYQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 46fb441d-4967-4dd0-1f7d-08dcdcd97b7e X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:02.0349 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dfSN03XBWqF/aV7NTO85tik8wLnVsIjWoMzr1cOkKNVFLOhxzvZQmo9/l4LI5unxk2NxKt95dFGlLXtZr0ER4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Align with i915 and only initialize hotplugs after the display driver access has been resumed. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index bc5c00437ab3..be431d9907df 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -418,11 +418,12 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) drm_mode_config_reset(&xe->drm); intel_display_driver_init_hw(xe); - intel_hpd_init(xe); if (!runtime && has_display(xe)) intel_display_driver_resume_access(xe); + intel_hpd_init(xe); + if (!runtime && has_display(xe)) { intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); From patchwork Tue Sep 24 20:35:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811164 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 B35BACF9C6B for ; Tue, 24 Sep 2024 20:43:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DDDE10E175; Tue, 24 Sep 2024 20:43:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="AXRQEyZd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 60EA610E746; Tue, 24 Sep 2024 20:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210589; x=1758746589; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=5/VXjSRm2vSfNiAK4Lp4aAqtby5ziRNh83f2Rj4/tk8=; b=AXRQEyZdwA6qvfmdmKNNoeGsEqLdp7ozRBBfADFY2TsUEDmG875wepxE ua2p3TL3ftn26Sh4AH7Wg+q0fjT+Jpqe5TYBRTAPDbxAS8CbYgHpKI2Yn gKYiqr3JYQ8GLxbGDRGUPzIPxG4qus2zxMAIB8E7HQZyhqzktBu7evAcF t9zOnBnj2nqbJGovYG4jFtPdlOk61TPnMc0ZWGzRiO0Tz12uTfyedstzp dfwfrIU/nA1TwmcPW5zSAdExmxrBA568ezoRyAcSvyfjOBkMn9q1hMstt OpC8qJXDwwmPJPiTZcosM2Za6Zi3pKPtiQppV1C/zW2uJ0UERBs3RSIcd w==; X-CSE-ConnectionGUID: ytA4cJ+cSCyHsq+Tprd3pA== X-CSE-MsgGUID: /i2kSO1iTBaYDXChO5UqgQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326099" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326099" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:08 -0700 X-CSE-ConnectionGUID: eZiQtPlZSJG1akYk7F8itg== X-CSE-MsgGUID: XzXEfW70RPST8xu9u/1N/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001490" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:08 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:07 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:07 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:07 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dv4GpOYjYnkeCVuP5ZOPMRw9MSyIEoGKjio8+Geu8trpvaIjl7IhCF5v74qYPCncL91K/WFVj9gf8xFdVy0o5ceNZOZT55gPgaJW+GEGy3DH0DXpNu6f5zAGm2jEUR6oKbY3sQb9ArbWnM5Z1heLvp1d4lY+s7UIuYTyk/p1/cqZVB3FsFQWZ01rBcrHrIruiJfgRK1v4+M0yYTo9Y73npPTKiRY7wtcMtbBxTeL0NuaF3uyf5TgD+gqg2ACwvKIc0wDi0QO7QaY5phESO87Dm8YYJ7GEnEy862iDC0f3CMplI4IHpaSGFwMomKWNT0UKs3LZOALhiXWsIuh5n8egg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ye6BKmDX6r5CRlRbJFIGfmuCwuryxVqFEig0EO5WEHM=; b=wZrZLReTiYsrtNmxOW+jydPY+Qq/cAc6uEYiLQPBftloHYirzoJiJECQKHAFqabbXzAUCu0qbmkNTgPxh6axWRU+iWNCF/eLVu8JMdi5oaCzgGOSrY2CeViaRTZ/lSVdavKcpmOAdysZV6ui/s0IjFFoweW7f5uOKA5RzyT8CjsArqhRHIbxRy/tlcfwESv0LfGrf5jaVHRYz9QAS9gRJy+6H97BSgo7ZF7TQlpgEV3cuaUv7RrVQwbuD0UrR5ekGT0XYlcuvusqwDxFOn2KtNJaC1H4rcY8VVhczvRlgXFhUxxKmsSLJhirvzPzhlUjiuJSEsH6yjbahBPE3g+/jA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:05 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:05 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 10/31] drm/xe/display: Spin-off xe_display runtime/d3cold sequences Date: Tue, 24 Sep 2024 16:35:31 -0400 Message-ID: <20240924204222.246862-11-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0005.namprd02.prod.outlook.com (2603:10b6:303:16d::14) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 1eb6a0b9-09f3-496f-2795-08dcdcd97d80 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: YqmqUxDrYuiY9UDVkNzjGbgCHi7Fcfa34LbxZ/9oC+TaI3vyE2YyaNmimgyYHwhxe4CbWl7q27aD+KeKUcsd2RSqZMksj3jc1/byzRClD0qv7T72lqYaOFKRm9Tmb48HofnsMdtGnU/bZ8BCULiZ1roQRxn5+UpTlJ3QZVbFsnRPi7j+t1cBdJXFFDnAFSRhKs5koITY7BiN411BLDFrim5pXTtohoCjmZoN6gKZmpSvUcigYyMkNESLLxFYqu/H8jijnSNwOLbH4TadMB74emdGz5j7tXxAVkQgh7X/L2sOtajHF8j87e+AmZmAgR2aKLoLcDJjLY4JZkoR16jwP5oluU/kN2XbfIlBDgOSH9eTXjFH5vDSFinygXNa5bqXAUl/RWYaaNg8J9EFw2Kr/CoqW6MxssXIUcNteQFWsP406rrx1b+/qAkbe402NKTvPeTpazMsXtZgpPtIGIgZWhWAAhj8ATpIsWZ20sqK2A4M+LV5AlL7a6Izy1slQrzdTIV7I0kpkRpalKiI2m2T3Bcb7GKEg1JvJ2RL2r4EHrlTncPPHf6DtnswuCBplsLwBGUFPb1tT1TDGpiq6AhDG5YRtqod711LYZrUeDQLjTJ7wpJpLh5uZdVs0OR1EhaJqY2yRJLbo7IzrXi5onmyN+pwRjL659x5BR7TkIBN5ndxaRAWGnia35LupEiySY3Pe2pNkTIrQe41yOOp0QaMZI4JgskqgNr4CTdY/6LtcgkVltWpfCqoeXKnI7NGH5VPAE60e1ruOwJq5o7TxExewrFV4rtaJZ6Yd2eO/a3Hs6vHlRjr2/kbrtQO/4RRvyKrOBT38ol3ChW5Dk0UV6xWkLKL6duY8qEquq2nHgZ2bI52MWVj11srcqtNSDitGmKzclSDgWlI5l/3b08nSfVwyQyTnfqHW/1zShOx1aZC9oEXse0VKMJFKx6V1426RJaTyTF3aOyUsEgQeaMfi09YyvcpIcG0lf5sSZlVM8B02LijKOwwceNjMoIj7dqktsRcGm664rThdAgNYbvbMI34I8Z2sT7vFkmEHq/Mk8kDSykmavIZsADbz0jXE4deJuvOd2YiUJGXPIDDcJ+r21mc0sr3t2+GQi+y2FIm+osGjyw/Lyi8wWA0NMWi0srTBGTUIRyuc87hXn7m06NgY7Kn1FDaD4Q8gRT6711H2+eq7xXSp1eHG6pt4qm7s2iM8p3z9+WQJYBucTUHtOJn3/L+y6t0kNaZflIfkdEuN4zivnmfKKnJK+s8MJWNOZWU8s/7GFYyfw3Yl5b9MmU6M0uMzw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AXICXKtgfaTKROPgx/0z9oQjfSSkgOKYlHy0mhtojD78WLHnyUJ5qeb/UfihvQr8Ii67erlcUAu+Zj+WYVQTPcETAJGdCK6kLrFY5ArCTn+ZBe+j0G3DJ9b66XZHaecppM5G7Ds/GrJW+qTK8ZD+9mrtlwbpIOrmB+TnUpopYpSUaniUZCOXPvxpkSh9yRyR/hV0Bfg+/qS+kc/EDCS/TVyyTe4QgTmz/T2XB4idN0ioqLrkTojqBpFMNOuXLH05yC9xIdPIW6JlfuLgT2n25dSgS0TMQBYQ/4yqmXRAxxaXWOn0VPr3+8Eu2KHloJxIHv2zwNpDTPdp27NrHBTAd1XuyGc3xFtrk8LOA+m6iGhQG3rd72cNLSdS8YLmqTEHYQ+UHFKskQsbCP1haCmJeL1yGEgb0Z1MepUPJyjC3WgLhO5CPtJPC5FXBFmJLoNllp7tUmGGjjmmFny0WZYD+Lqzp4TK/3/6tAutXqjcWvcTzw1W9/CGH1nePjdoNYowCD493DBOwo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1v9KOgv229lP/mabQk5EmUdHcebbaA== X-MS-Exchange-CrossTenant-Network-Message-Id: 1eb6a0b9-09f3-496f-2795-08dcdcd97d80 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:05.3803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pqSy+ZBm0nFZmVWXloN02FrUD7tcA1QnMUefDXeqfuthp55DXWO2kewVsCJ5G4TkKVHWWGfZsCDwPrI44Cm8gQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" No functional change. This patch only splits the xe_display_pm suspend/resume functions in the regular suspend/resume from the runtime/d3cold ones. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 68 ++++++++++++++++--------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index be431d9907df..a4705a452adb 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -308,8 +308,41 @@ static void xe_display_flush_cleanup_work(struct xe_device *xe) } } -/* TODO: System and runtime suspend/resume sequences will be sanitized as a follow-up. */ -static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) +static void xe_display_to_d3cold(struct xe_device *xe) +{ + struct intel_display *display = &xe->display; + + /* We do a lot of poking in a lot of registers, make sure they work properly. */ + intel_power_domains_disable(xe); + + xe_display_flush_cleanup_work(xe); + + intel_hpd_cancel_work(xe); + + intel_opregion_suspend(display, PCI_D3cold); + + intel_dmc_suspend(display); +} + +static void xe_display_from_d3cold(struct xe_device *xe) +{ + struct intel_display *display = &xe->display; + + intel_dmc_resume(display); + + if (has_display(xe)) + drm_mode_config_reset(&xe->drm); + + intel_display_driver_init_hw(xe); + + intel_hpd_init(xe); + + intel_opregion_resume(display); + + intel_power_domains_enable(xe); +} + +void xe_display_pm_suspend(struct xe_device *xe) { struct intel_display *display = &xe->display; bool s2idle = suspend_to_idle(); @@ -321,10 +354,10 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) * properly. */ intel_power_domains_disable(xe); - if (!runtime) - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true); - if (!runtime && has_display(xe)) { + intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true); + + if (has_display(xe)) { drm_kms_helper_poll_disable(&xe->drm); intel_display_driver_disable_user_access(xe); intel_display_driver_suspend(xe); @@ -334,7 +367,7 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) intel_hpd_cancel_work(xe); - if (!runtime && has_display(xe)) { + if (has_display(xe)) { intel_display_driver_suspend_access(xe); intel_encoder_suspend_all(&xe->display); } @@ -344,11 +377,6 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) intel_dmc_suspend(display); } -void xe_display_pm_suspend(struct xe_device *xe) -{ - __xe_display_pm_suspend(xe, false); -} - void xe_display_pm_shutdown(struct xe_device *xe) { if (!xe->info.probe_display) @@ -379,7 +407,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) return; if (xe->d3cold.allowed) - __xe_display_pm_suspend(xe, true); + xe_display_to_d3cold(xe); intel_hpd_poll_enable(xe); } @@ -405,7 +433,7 @@ void xe_display_pm_resume_early(struct xe_device *xe) intel_power_domains_resume(xe); } -static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) +void xe_display_pm_resume(struct xe_device *xe) { struct intel_display *display = &xe->display; @@ -419,12 +447,12 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) intel_display_driver_init_hw(xe); - if (!runtime && has_display(xe)) + if (has_display(xe)) intel_display_driver_resume_access(xe); intel_hpd_init(xe); - if (!runtime && has_display(xe)) { + if (has_display(xe)) { intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); intel_display_driver_enable_user_access(xe); @@ -433,17 +461,11 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) intel_opregion_resume(display); - if (!runtime) - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false); + intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false); intel_power_domains_enable(xe); } -void xe_display_pm_resume(struct xe_device *xe) -{ - __xe_display_pm_resume(xe, false); -} - void xe_display_pm_runtime_resume(struct xe_device *xe) { if (!xe->info.probe_display) @@ -452,7 +474,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) intel_hpd_poll_disable(xe); if (xe->d3cold.allowed) - __xe_display_pm_resume(xe, true); + xe_display_from_d3cold(xe); } From patchwork Tue Sep 24 20:35:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811166 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 65545CF9C72 for ; Tue, 24 Sep 2024 20:43:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0992510E748; Tue, 24 Sep 2024 20:43:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PNHN2VVr"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85D8310E24D; Tue, 24 Sep 2024 20:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210592; x=1758746592; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=LqnNIdOo+lW95VJw25liE03vbJfASjzfeN9j/MaeAmY=; b=PNHN2VVrkU/cavQmwwuj2gCbDaDOOnf3buUFc3o5hpPqlsZQc9d/frW9 e8Ppwlba20UokDeTuag4UHi/fpsapUAL6ZdpDvL7FJOK0CqBoMQUCtvGN Bko9nHNWCrtvWHhy5R7WF4OeGMlXmOsfKrdtBGQiJgLNRWOTnOXySzlBW flNW3AR3huruqqHM8arDusTcGQR/HJ3I1Tu4gdsHMVrHNg7YCBBfArDwC H4TnWrK2EyQwSF5j/d7/BNDRYAwQd62V3kYJPTLj2oBsU2kww5meI46WS zaY5gK7IZj3z2Dt4qjVhTjklsDAEYpvzGobw14tIoyB60okmKBzkIPuT1 Q==; X-CSE-ConnectionGUID: X/WzDFKcRrSwUkwh4OZfdg== X-CSE-MsgGUID: L9fpw1DJSOu/MbQ29qmeVQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26353988" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26353988" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:11 -0700 X-CSE-ConnectionGUID: 9JFboXbaSEim1Xbl4OkHYA== X-CSE-MsgGUID: E3Ff7WYdQ9+Ah/eKKjmWZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="72383475" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:11 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:10 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:10 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:10 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GPmrPly9njhOXGf39XDJonDWqHEf42BPRvOnKI0D1ZEC38vZPs2sr4/od+1RUqCZyib6HonqTYTu4II9kDMS/D21FYB9Wo41Omri5upkPtjYGuA91+NdoI0vHF5iZRj4XfpfOLboU6zeuiMBLMaUz54p3+mNphAWdatDpRZN0FP1OHDzlDsNLs3+M/2QzIMCUfMWL5L15hz/ddP6VIE56Xgnp9q04aclLSntjbTR67NXMccTRAotkC7ipoGCad72kxRe5vVfOUzc8M9ZFQUd8Ai0ZNnWvSMoFB4J9Z01MYJOcTyiU1MGn274WwQIgqg+9Cvf86C+A7s8FWo6+lMwPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IZeBCBJJywiAt/oz0uaUzIwTvxpflzZu/KtYhVhcYrQ=; b=TG1VqD7TayTeE7hLXbcPgH7QOX3ntBiaFkvOLsc7ljvZR4Xc+DKNEwTrtML7iK22mRriZNo3XgNCM3QCJ+DiDLatKOG4oxV3u5DgsrEdnJoKH1UkNwcrzzICrBJVOU1vco+lgZVOJA/dNLBdcIpHS7ZOQLcwYB4BX7jTGSLMM1rvH5zA0nqoe6KUKUy51urb5U4Eil9IdbjKqwr9i/UzHzowc99gEScFvxbuhWiShLjYkiDlck1qz3OBsUJSAW6xV4MMqVLwyKGUhAHoBJw01CpgKp+C6omaN9VpEKKrnLCCWjikB+sjd3qr/Vtcer5yPTDq0yAvouYuPYxOeFZV/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:07 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:07 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 11/31] drm/{i915,xe}: Consolidate display resume functions Date: Tue, 24 Sep 2024 16:35:32 -0400 Message-ID: <20240924204222.246862-12-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0025.namprd02.prod.outlook.com (2603:10b6:303:16d::11) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 1cf61d90-5821-4856-c324-08dcdcd97ef6 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: htIXKLothg1kgxm6riph6WkbHD6dmd0GqJRQ/FNlMYuysNwO5iSskTcDWRaBFrdJsrZDB2/RX/oCzFEZYVISMVnQoqFvLzQ8aqAIYZBOr+Kq7b0GalQee6C2dURs0/q9/Qv420UY5BXeYBljNankpp5L07koNXGyjP6Ly/Pg4Y7kq7KKCwI8KpfPzIvCyBt9NC10HNumqzfPIi8pwmQ6+VrUOBd3WH1MVUTZSWj9l/jdpNFxMg78cLLeeWBmUwd9YFwo9IqipLhVbVDRT8+pp9tqzP9vUW020pgONlt2DCvXft7j0aoOlNJjlouodjW//XWWA9fbM/n9oXc9eXAPXTEqvP2qcrU0b/s2UeZZ9+JaMS/cuxGP915/ceBB7WTlKwI8fPkkL1RYwJ4zw1SJeORnM0KVByQDYnWoyRJMFFU+qpSZ5lkepua2ahvI/70IOv5eCAhIBI+LlElmnzEem25NuojTg9fTubuj0mUoaBsThe3P1aBOWpRLbpPpRXKXvrsBRTCh0Hv5MuJ5D9XWkOvC5o2BZ+XurUq0WIxOgATyaF11+2xjVRSgju4P0tl2hBpBUK47PupcGi2UhCREupgKq8SRJapRbY9XYyusNZzWHkqwXlBnWjF/qXWS1Njre/UE5RKXcstAndWwnc7OFEvK1TjRBJqzwc4/Z01a5M9g1fVeNtL/NFwKfxdit6ELkMnUtc6wy1zxQoIP4ld/2eKPTZRYwcRnxlOXfmKgeSNbO90T+l+x1DdaRgFIIuuWw1NN+L8zoeVuThPMivGboVoyGAmkQz/ENxsTNNVrRj6iVoNCL9BC70XyF8fGfluFrO8f4ZSy3z7a3809mWn7RKy7eE5zarOSor7sJLZN4vIvQQ1HUlLNtcUzFJ1BxjKkQQdHU2FRLKZAK3RcpTFEIxAi1jGnyCta0DYa/r8mOQoGKUqxQGU3LFmkg/tpWo32xR9mq4nUoyoyblktDw00N8HUojaBds8nqxUqqHpttpJALONuRt7hv/QGAAIA0wwT87GZ+c5iSpcJ8djv7NzTJWnfG3DDi2n0QHSzP7cXZSEk6i1BeqxcIsUW6wHRMYldXJbN/MUe3ZPT/30QsbSPvlGeUtg5w34Y5WQltoEJ/OmG+Z2pHJtoBm1QxMNpZdN3fEEv1gcryLbwy8/f91OyiifmYpPk6SVXDR/LWGbfJskpMF3Z+Wa1zKJcrSp7eXEe+OIjeSeIvKdL/0iZTTL+K9DkrCGQeMOV/Y6MkYRpkcgMJzuqy4huOAaYv8XleXX0slPitWgc3JdB5D/8tOD+4w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N688F722zLTbnKM2lJyesreS9x8StXGgbSJxxqjfW0y8mrIiaK6LqSEn17s8yh9R1ne1UoxtChwar91M1Imvv7rHx6ImvKxJ1YauWdVK1WpR6PzvAQRDhKl0r3/LIRnCqcDbJD6RkZJ7iPzmbo6FUabjaConL/8apj8YVk71s+LUz6TdxNZlQXG56Ims5nRNIgkQXKgaW13proW7RvZc3KPBPuV/cDYNUGt8w035Cpmtb4YBVxP9mLOT5Znw+lzV72bI1KxS6j8V3a59RfVnYSMaWQGny9jt7dUErmuNXMhVSTiguI5TQ5d5G7GVPn62vpYKTeQSMmZXaB1IRGotRxoiuPcHzVBf/bD/ol+OmICegfTXWf8QacGiKsBmQJRAi/x7dnEw4tNHGeLNyvyJ8T+YJHz/7t/OGq+HT8xFkDIcs9iNT36YntSQ4lR/VY9LXwYE0YAWvVkWFyr416gcUlPxItgybJhtocQhqpNa44rkKOVOT1MKNTOMPN6KoH33Jenu2RM7ENGGhShZ/148SbjnZH0ny3yOhn2KFprt4VhlPD0GD01idOLkSabM+vxkMMWTRf+Y+1RSgwcavwBVMuAL5wGZBcjF9xS9e5zMvFDzgEq0n+oUzdT3U/D858hWrTac8RZBvNK+xAbfDgywET32zmppowjT1yqtBgJDOZK9oR2Hejs2xqzPYwKzaLS8n5GtCmsyoG7jzAr+EaBwfj5+YMzY/NRtA7rvDPS7+F9JTGkIrBBQQEDMWgpTbNBcg54TNWXWLRS4ycrVRTveG7orqwebnY6mUkduyBuuvb+eoM7xpS9Er8zBMHADaA8g0iicnccChIRoGHgLLNO2CFCSxvX1ctnt+I54OAIkioU47RngfNxQwNhd6q+1UE6p4YLo25pEiE8r7sfyHg6aN+t0OmwXPVduJWJBxjdayR/s4gILfV06XISTIo05dVbeElLGiySnLZC8EPIu6DXRgZ+9B332d3AQasvMakfIXlhMfYF3AdKRd6DWOS5rb49CxtsTqDwh4shtQ83K0yxU0qyqAu72OQOjb0/ue/80kaxAKus46KZ4BEkXjDil18UC97qLYX0c1+3PDiQqkjZXKCwgs3+Nor5zKaL/m/NqSFiaQDP5KE3BkZxM7I2a1019aLN4fSPbRXaPIfUiKJ4e5Npebh9kWmPPZ90rmIvo5qepcMqRMb44Mco+aQ+vI/WESLE2eDrmbN+7i3RWWC7SsvSdQ8RQ3uzw+NhMzWtk1HMNqq/Y6B1GWeuwXnLii2OVgS84udk0YeNqUuPShj8XN0TiBe+Y17ziOpsSoirF/XvEkhx9M9X4byqk4m4k8E1K27lTCnLWJNRsRhRnY70uuqQerb+iuC9XO29Y/SsEpREBjQlp7UdAJyHJNTTe8+iX5xVTaw8arnNwBbsLFoPdKvk15xnFIbBH/2HBfWoJ3vOGR2530Bw/5ZbEVsYTCtlJEOOX3u64TmYli2yx1neyX5rT7rwxfY+0EgHg0NzBxQVeIArys/tCsJb3V7DYcJPU1LPsPYW2+KpZxYT4j/CNb3xXtyEQ8SelL6Q5a325ZcKCC5VcuDhU5Lr2sHuH4NGWhdCpaYxGNCxq4VXhUOvdxw== X-MS-Exchange-CrossTenant-Network-Message-Id: 1cf61d90-5821-4856-c324-08dcdcd97ef6 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:07.8654 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VXfs8gebHZd0LqqmUDFrr+SQugeQLAI6xonbxMydlfOxrQvrzHj2gdCLtjqj7H28gWmLVq4bE5efh6SyBLyVUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Same sequences are currently executed by i915 and xe during system resume. Consolidate them in the intel_display_driver side. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/i915_driver.c | 17 ----------------- drivers/gpu/drm/xe/display/xe_display.c | 18 +----------------- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 42624bf80f91..86d6ebf0c82f 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -752,6 +752,10 @@ void intel_display_driver_resume(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + intel_display_driver_resume_access(i915); + + intel_hpd_init(i915); + /* MST sideband requires HPD interrupts enabled */ intel_dp_mst_resume(i915); @@ -781,6 +785,18 @@ void intel_display_driver_resume(struct drm_i915_private *i915) "Restoring old state failed with %i\n", ret); if (state) drm_atomic_state_put(state); + + intel_display_driver_enable_user_access(i915); + + drm_kms_helper_poll_enable(&i915->drm); + + intel_hpd_poll_disable(i915); + + intel_opregion_resume(&i915->display); + + intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_RUNNING, false); + + intel_power_domains_enable(i915); } void intel_display_driver_shutdown(struct drm_i915_private *i915) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index ac8bf00458b5..ce2dd03136d3 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1165,25 +1165,8 @@ static int i915_drm_resume(struct drm_device *dev) intel_clock_gating_init(dev_priv); - if (HAS_DISPLAY(dev_priv)) - intel_display_driver_resume_access(dev_priv); - - intel_hpd_init(dev_priv); - intel_display_driver_resume(dev_priv); - if (HAS_DISPLAY(dev_priv)) { - intel_display_driver_enable_user_access(dev_priv); - drm_kms_helper_poll_enable(dev); - } - intel_hpd_poll_disable(dev_priv); - - intel_opregion_resume(display); - - intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false); - - intel_power_domains_enable(dev_priv); - intel_gvt_resume(dev_priv); enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index a4705a452adb..98ff603a1f84 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -447,23 +447,7 @@ void xe_display_pm_resume(struct xe_device *xe) intel_display_driver_init_hw(xe); - if (has_display(xe)) - intel_display_driver_resume_access(xe); - - intel_hpd_init(xe); - - if (has_display(xe)) { - intel_display_driver_resume(xe); - drm_kms_helper_poll_enable(&xe->drm); - intel_display_driver_enable_user_access(xe); - intel_hpd_poll_disable(xe); - } - - intel_opregion_resume(display); - - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false); - - intel_power_domains_enable(xe); + intel_display_driver_resume(xe); } void xe_display_pm_runtime_resume(struct xe_device *xe) From patchwork Tue Sep 24 20:35:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811168 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 6070BCF9C7B for ; Tue, 24 Sep 2024 20:43:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0381710E759; Tue, 24 Sep 2024 20:43:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KoBaage3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3119E10E751; Tue, 24 Sep 2024 20:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210594; x=1758746594; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=phniMjitfejZZDaldjXsGhAE4sUC2dvPGAZsZYzZQx4=; b=KoBaage3aXjQML+GTvdRBnbTknS32URjFbSG86f7YaSNwWwqSYq5kN44 xwgX79iX/XGht6xLwydzUWqs5t2JWBUiwfhlcV3HZctyyyhXEPM27d7Jb c849Je5jcbOjcf8MYkiXh8CK38DoNgUIcSDf+egMzgnTZ3DL3R6csvXmv AwLg0taJgORzRYA0aoP7uEpyKhehHDszI2UeOhJHUY13K6V7S35LXGs7v Gdch5ft+iu/Esf56DWna8tjlJ7qj8cpq2IRsaIqmKf/gdT7fX+gxAZqzG Pge4k2wVFdVK08+E7B4VgC4JRc+r3p66dJLQxRrj0uQCweDYWojo01e3X w==; X-CSE-ConnectionGUID: 2+Q/sX9GQGW1icPPYYA5cw== X-CSE-MsgGUID: V0c28AHHRwWNeNC83TPBAw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751529" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751529" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:14 -0700 X-CSE-ConnectionGUID: rodVoO/wTiySJDwpZf4F2A== X-CSE-MsgGUID: GoaVZQ2wTZOEL2JlGqbbnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298750" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:14 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:13 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:13 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:13 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.41) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PR901fgq3B98tcqqpVlsL7GZScnCCR7qps1HWlTnImVq3opMl+ZkFVYiBZ+/vpJGecRjsB7g+Xfc8qbO7rR4z6CKcyrikpg9v+QUI5WwcnUiIIFK+zmvYFtdVPr6cpKbnBDUyl+2MgOiK1hBspS/JbGjn18SCSHezB2+TPZOcLuo7bmvkgDU7YzBDYuVrIUK0fG0r9IKVnIbE+E1ZqYnyzU0S/PVVodSlXkW6Kem/dgfMd1uhqBafH8Touw7B4LXpQG3w9CBqi0RDh/nCXy11ayNo/Ru8hihNAuinKESjpgUMKlf/nsB3n9NrDyar9i0SXZWUrO3xTn9asqWzTOiEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=n3/Na56EwyBxFmLYxMxfy9HHVADhaAmSptVoBJMLgSg=; b=OebFKTZYOMbUXfxbBYJOy6V58aC4WMIuOk89ZhCn5aV1oS9J3ISyIxjLn0VxWELp7jof9y/5F9PeC+InJwOsDv0QDWeVMyheydOz1/MybXeCtUVNzNKdaGhVpthUinrAkKJ+nbCFOSylPSPlhG7Ou/dIuohmpQytWoawlbq4klvRNuwFwX1jnmoOVsVfX2cKi3G/Ji2/FZfrPc39CLPqhpADVyHRiK+aWnUzl4p6WfM9Px/HsTQwXKwn796zoyO3JJttaI8ROoexoPy4lDu3xMlRzcgL8+tDkK7yKVmfHWY6X7XnRy0T+lcDxJNaSMckJy7Ld0t9Ds0roeDDsjOvfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:10 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:10 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , "Anshuman Gupta" , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= Subject: [PATCH 12/31] drm/i915: Remove lingering pci_save_state Date: Tue, 24 Sep 2024 16:35:33 -0400 Message-ID: <20240924204222.246862-13-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0327.namprd03.prod.outlook.com (2603:10b6:303:dd::32) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ed28cfd-781b-4ec6-866a-08dcdcd98099 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?25fq4rTENv/2SNKb+U9fdva5rCq2OuA?= =?utf-8?q?3qxg5lkg1mnCwDXvqF98chvdcTa6IINlumSRV+q3o3hGBd7ubgjqZJ84zNWa4LwSd?= =?utf-8?q?siOO5UgRAUp2sx7cG+/+3kirjQ+OwLCMuA+yiICk3kFsHj8rAC14QmpjbCqfnGbUC?= =?utf-8?q?eaBfa3qY2r7pOpS0TyjpXg6kFvxsfPTQgMNnIL0FZsxL0bJvBdmMoZlGj2Bwsk19l?= =?utf-8?q?ldfgV3cYJujUBodH9T3t1p6X0ZfG7EHgALJuH7smPdyddJ2WiVqPq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p/Mu2Q/fohxohvkyyEWmkszJN9T/9e4EVBaLHpxAHnVZT8aCtlleVkpdj+lFJZb?= =?utf-8?q?q48XmboNn7/GO7gY0D90I7VCdx6hj9uRIt4A=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JZGqO0rX5uqYEpIpMihcCpMInRbw?= =?utf-8?q?6a2nEgUzKYn70Pb+wmPg7qs34/ZU1U7s+ICbQU9RfozoMtfLtuh6fSriRj+Jfji1Q?= =?utf-8?q?Wb+FxGCzEUHeAafE34EzOLWZDZME12OZ1cRFy/ehAhG6yfuLmCjajrJ3lzmIAcIBv?= =?utf-8?q?viJb1/jU5u379iErcNG9D6rHeR/RfFp6BZM0tdrI0B/3WIbqYxyjlbv+dL14UvMJA?= =?utf-8?q?iodrAXByK2Puo88u57tS5QwWlhkTCi/xOq0GWiSnmalk91qv9qduol//UAvYMYLnq?= =?utf-8?q?QRHibGt+6o1J7wlRW3R8VIMrl+pK9fVNMrkirwYcbipxD6YTfs53Q4i8UkGeOH7A/?= =?utf-8?q?bHOwM135wTfsK3CpSUGAlS1XIeW+QkeyaRFkJ7liP+/TWvWHa9rM3DfzexbCJYfgJ?= =?utf-8?q?Iwq7ntHGW5VwMfZnJoygILLVx5hT2KvaLvH1FyC58gRmOgEPuawpseo9sa081yZGh?= =?utf-8?q?fT+yZygES5hWBh1lEF5Wz6GM2CDNB9Ptjr48brrs69rfGkVfJ00OS6EkYBIruw4Cs?= =?utf-8?q?o0FR/jorWVAySKf3gMXJWaAJf54jE83L6j40OhI7WBrBn3MXWrhp9RMF1Js83BGz3?= =?utf-8?q?3p26GJpFivEXOpxoGqg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KnFtcxPgaufyqUhd56+S+kVwmMYjNtI35RalfzjMsqbkz11?= =?utf-8?q?2AIob/xm/iMc4sRjjSY0TdJAwoULpZZKIg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2ed28cfd-781b-4ec6-866a-08dcdcd98099 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:10.5558 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /n06o7i9wRRNV1h4g0ZDVoHVmLCMH7XNR5uIyIZ3b62+sTywkLfpU0mVk8dIepjqjcDRjzXfgNXwqT8ktLbcNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The pairing pci_restore_state was removed by commit 'b7e53aba2f0e ("drm/i915: remove restore in resume")' to fix a hardware hang in resume. Furthermore, it looks like PCI subsystem should be taking care of the save and restore here. Remove the lingering/stand-alone pci_save_state call. Cc: Anshuman Gupta Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Anshuman Gupta Reviewed-by: Jonathan Cavitt Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/i915_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index ce2dd03136d3..4fc9d8bce1fd 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1008,8 +1008,6 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_driver_disable_user_access(dev_priv); } - pci_save_state(pdev); - intel_display_driver_suspend(dev_priv); intel_irq_suspend(dev_priv); From patchwork Tue Sep 24 20:35:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811169 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 A2B99CF9C69 for ; Tue, 24 Sep 2024 20:43:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C92210E24D; Tue, 24 Sep 2024 20:43:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZXw/zx84"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B20B10E24D; Tue, 24 Sep 2024 20:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210600; x=1758746600; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=gQJ21EwAbLUWgQ7pEK8J6o8M6QMWxowsakcRMDdRCXw=; b=ZXw/zx847ZihNM0awzY/VDqg7QlZTDXPY8Ismh0pd5g0IucaVSnAPgn0 DOitZ50eH1mmYNQci4Ezs1p0P6A3DDNGd2sqrI+k1gUn0UeF2G3ipVx0g UUapk8p2k6aHOOAwGrT7dXmF1opbjzuyxFz1UlXZX4uRdwg3B0QMgY8gC t7wpJt9MCjNXaHXIplx/6ikKhHa7oGvCT3Fu0TH1kJ9mT4wp6OKnaMd7W hDDb+s4PYztsN6uV0atU1dlEjPw+MXRVS0p1hJQmPf9YYXdaoLP3J4VEy 1v6VcGrbVfJnqrVGO2Hy6mTD1W8YqJzWB3XwN3M+cKF/6C/L57YuRVGrZ A==; X-CSE-ConnectionGUID: +OASrPRgR2yoa1iaWKywIA== X-CSE-MsgGUID: QM8ZgN3uSSWf+X5+AFDMDg== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26354026" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26354026" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:20 -0700 X-CSE-ConnectionGUID: D0/qdUPRQKa9Ia/bynjP3Q== X-CSE-MsgGUID: kFKWqN7AS6+dYCko4taesQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="72383497" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:18 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:17 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:17 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:17 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i+RZopE1XaTYm9lhRPCbCk34unPvnDIih0NTzGw9OxDGiG9+OeIdrBY/G0Nen2vbrjoqf6TmOJxvOKNtRC4TyKRtg1LIDTe5hs/8p5ux3+7lTgXSEeoiz2e9tP36j9uPTELl9h8BYr7CTaxfknrbkiFyZ7+TcgxIyCxHqt7EVnXtBpzMkuYookyYzc94mdWjys8tyGmf/MHVInfxdrIlliOgQ8ahIY3ZoueOsB9kG6Wyj61IBF4g1pq1vBKkWcOWfZWgHAD6Yx2W0EFIk8GD0LKzR86jFysvS2OekStXXA50BOoc/BuTR/fZEwl78iTVSVTN7Cojy7m4kNlPTWp4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Pfw+irWRzEhhByKiwci4zs/qobY7YnBjbllJYDjZJjI=; b=ynx11ikTOSwxt7+gkdX57IUifrwGz/HjDC5V4IgXuEyHWIMx6jUxqOCBnph5HI4a/P93X40vyGQXIBiVQS1vbXBL6hHdATKBnlj9+f2EUiwcbyek0i9Z8K4MMtWUX4cRQoJaTHWO9+PIiXniuHYi8qt5WbI6uQSfJS1+SAt0J9GF49+tyZ7v+TckblRtOY/5Pax1DMmRCxFNmyrIfyvk2fDkZnZiEAz+yAFW6JsxchlEkPW3C+Ga+oRBCkcymU60n55U6KtgcqqcG/bz0LK+0bFOyYmAW2bPRwWF3I1J9I6IzYNNYSotgNXJmVqDA2e1R4AOs+V11QBhQilnwL5+lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:12 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:12 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 13/31] drm/{i915,xe}: Consolidate display suspend functions Date: Tue, 24 Sep 2024 16:35:34 -0400 Message-ID: <20240924204222.246862-14-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0002.namprd02.prod.outlook.com (2603:10b6:303:16d::10) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: b3465b43-fdd5-4236-74f3-08dcdcd98208 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: M/smUJNjPV1kLoLuPH1V6WOj3dfvnQdv/Z3VGIdfaS2iF3HmP2AQFZZn3tUJu0WaPBqVJC5tgHXwU5c7UV1uSUnRtzJcTyG+xc7y3s10pN6D+Ck5cWXAQuJifKBduvBMT+vGS2zxV3DkcNDJs1HIasjakq8D+n7QNWfNMsZE1+R6nVTUbUyL5N1iWrrjvv8SutYST6P+rJyDOZvVzCz4hR64y9ORWjFrEozThfYq1xv6Rx+7bddp4vBj/QEjntsJG7Haf8UtQlIJLLAHU/hVUyTis4+fK87ylysQw2oDmPEy/trOe6VjJ4SiKN9Ciu2OrBbcZL3EnV2SoMmgYj1qmHO3Xb99jFdRbyQ9pHWBdWDE/hEepr/DuWi/eeHFyYG9Yt2v6GwzuAtwIq/86fKjLt5ouaMs36Fm6chqooDpOr9Ipphpt0Qfrp9vW6V55nQdHlcteRktpRIM0ep0fOszySlOlck3O8E+SLGcvIQA+pID+75aOcIF+iFi+lDEX+N8y/d12CMZyCs+m3T3Djf9R+ud1CdfsejCR6op+X1Zfts/3fZyuzoBe0qPOSlC557MMXbp41LkWNNxVUGTw8aPtCOcpB9ndRcv9ErUbMQtwYw23roQDftTFVKdwCfZlfNR6XrmfC0WZLaEnMrsBoQQ21W0QfnMLJUxIU0klqivnQ+NrYQplio+xuHFp2cNXcdRMI634y36r+2Gu6Kb7TyOoDopJ8jJBI40X9tbxJ+vkyk0a/N06aqWGX24Jk/XyXR1tqgvCgn1cWJDhYMtCl5fcxct53slwriX96zY95rk4p2Rs7039HU9oRXYtyoWmre/tZXlrL1+KJXl72+mBIUwUe9bkqfDho8jihea4+qXzuGcdDaWiXw5cyoRkYhu+OqVfQ4xVBtL6TTIF1DSuYrYLTUTn5pxpUY4iZ6D+yBYGzSYtGV5fjPCBT3VC2oKpxi+DpvRbC+Hy42J9V1mEha93zEKvYf7bTK+j/XNG/jLUfeMm4JBslTb4EsahDECzO/gvdy8T4lUWkyiMXUYonaVJkW6hElvKsLxqYPGYU/LSur0JWyMwbCQS/QP6gCqhdtV0i9iXbfiz/IcGMliiW964Ngtk2SqQyRAmXz9aYTboKTNYqdrG5XxVGpZaNu3iAdolYsaR0i2Lr/P0k9FuqveXyHXwzpetQY3id91KVQOomr7T22s/rv0OCmfHZXkjmSpqiXEZnqTIKOiRoBBRsqabluhIllF+GDmWGmLw02l84DUcovhiqpHiI8dbiiYg1grHDGfCMEeBdIAomV+6rjbhg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KGc8IORNfhpV+AfPCSIrBRlFkY8sxP/nxieZLMSNfWrdkH8tPA85hrqjSxAoHpGV+kD2S3nbcQ5xs8QcMlm67gFXOD2YHUy648NdcvfAwkIZ9DlAcMkqe10WkUJLZLfDoS7yqRJxzd6QHAgMwYQcytZzY8NUCapzY2sqMh/MjSbB0mqRW02GhVppv3D3uGq83RKGYhlpKX/NflzYbunMLhC8fZLq9jHIrGgFvkedkwNQWcHav2IKCdk55Hv0VPXjLx9d2QgylZ7HwTj2IHne8omf30E1kRh4UUvkq/FUowOcZ+aeFl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D+SAeqlIRRogzvQI3vpLTAzvp41XUjGJny6foW16qd77f2Xencg6ZnUr+QpJq3ZIDur8lz+ZJ/EGQ2UTCjCwWWHp7cVC35hzTsXFlruTl+rm877HJfMm8lZwUGazsD5dxAPdpcQjhHHw5AdWtOVAykpkPPXGK1zlS5T4lrczBtTer4CYYw6VjocWrmrR1m4vNV9MiLkuc9h2zpTFL1yYmHKnLWKxdi+aFQ== X-MS-Exchange-CrossTenant-Network-Message-Id: b3465b43-fdd5-4236-74f3-08dcdcd98208 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:12.9004 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4iJiqciWRE/5i5rjXQprwWcAhJEh6YKrVom5Hx+j0kmAq2eMhHYU7GCm7INFPI+DGUpUQTKLicYB1azi4ulRQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Same sequences are currently executed by i915 and xe during system suspend. Consolidate them in the intel_display_driver side. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../gpu/drm/i915/display/intel_display_driver.c | 9 +++++++++ drivers/gpu/drm/i915/i915_driver.c | 12 ------------ drivers/gpu/drm/xe/display/xe_display.c | 15 ++------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 86d6ebf0c82f..f509ed1503c1 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -670,6 +670,15 @@ int intel_display_driver_suspend(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return 0; + /* We do a lot of poking in a lot of registers, make sure they work properly. */ + intel_power_domains_disable(i915); + + intel_fbdev_set_suspend(&i915->drm, FBINFO_STATE_SUSPENDED, true); + + drm_kms_helper_poll_disable(&i915->drm); + + intel_display_driver_disable_user_access(i915); + state = drm_atomic_helper_suspend(&i915->drm); ret = PTR_ERR_OR_ZERO(state); if (ret) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 4fc9d8bce1fd..12639fa232b3 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -43,7 +43,6 @@ #include #include #include -#include #include "display/i9xx_display_sr.h" #include "display/intel_acpi.h" @@ -55,7 +54,6 @@ #include "display/intel_dp.h" #include "display/intel_dpt.h" #include "display/intel_encoder.h" -#include "display/intel_fbdev.h" #include "display/intel_hotplug.h" #include "display/intel_overlay.h" #include "display/intel_pch_refclk.h" @@ -995,19 +993,9 @@ static int i915_drm_suspend(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); struct intel_display *display = &dev_priv->display; - struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); disable_rpm_wakeref_asserts(&dev_priv->runtime_pm); - /* We do a lot of poking in a lot of registers, make sure they work - * properly. */ - intel_power_domains_disable(dev_priv); - intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true); - if (HAS_DISPLAY(dev_priv)) { - drm_kms_helper_poll_disable(dev); - intel_display_driver_disable_user_access(dev_priv); - } - intel_display_driver_suspend(dev_priv); intel_irq_suspend(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 98ff603a1f84..45949b095d7e 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -346,22 +346,11 @@ void xe_display_pm_suspend(struct xe_device *xe) { struct intel_display *display = &xe->display; bool s2idle = suspend_to_idle(); + if (!xe->info.probe_display) return; - /* - * We do a lot of poking in a lot of registers, make sure they work - * properly. - */ - intel_power_domains_disable(xe); - - intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true); - - if (has_display(xe)) { - drm_kms_helper_poll_disable(&xe->drm); - intel_display_driver_disable_user_access(xe); - intel_display_driver_suspend(xe); - } + intel_display_driver_suspend(xe); xe_display_flush_cleanup_work(xe); From patchwork Tue Sep 24 20:35:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811170 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 63C30CF9C72 for ; Tue, 24 Sep 2024 20:43:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0FF1E10E752; Tue, 24 Sep 2024 20:43:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="D3u7f5U4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7291910E749; Tue, 24 Sep 2024 20:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210601; x=1758746601; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=DqEbZ8j+ghJOBO1OTz2MOzuHDYu20pU9AA4qNfPCp/w=; b=D3u7f5U4uSwRhgGSsITzQ0Hkc+6PLrh5GhPOf4kRvc5RK/uooYXP2iFq drgDWJzeezaFqn44MSwmy6aRvUaSuZVclMf1pg70arh23ZDpQfV/YcRtP KNRH51Oqes0JPxRzFN7nhzny6Uv/o7pflECXBre9tIic/oTfmxwjZMQTw GdbRKiUCnxh4GPZadznc16YC3QDGblaK16c5KvSPoE+YbbvTlwOHJXdVo PvHvWigLUVD1EhHXiJwfbUiPH7RXOhG7bhm/VQoNczUPsHx8dES7ojOWM UFIiKAs5ARWucnHjco/JUEUb9cSq0S6lWEjJE5R5dOtWfLnsh6WZ/j00y g==; X-CSE-ConnectionGUID: 3WRUMB/hT0aNe/UKHFpS8w== X-CSE-MsgGUID: yTglE42sTsKwmfWDmxwHsw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751544" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751544" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:20 -0700 X-CSE-ConnectionGUID: X2WBxTmGSFuXKeU3J03lGA== X-CSE-MsgGUID: 5zuiy0i7RDW6vEwLeDc2SQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298791" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:20 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:19 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:19 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ls1/9xo+/oXCPDQSDlx/AnoA9b3+2LUr8OA6JHPjjba684fqrX7bAMXORGpNK3+7Y+EAl0RLe4C77vK0Ozi0ELGer35idRGwOrcy4lud4RjImxWs0DvnNAGSv/gthFeakmHRPhEmUzl8bUSXHNciA73BlfHHeh+UNriGkwNJN4k1Oy8Uokl+I1d0V11CDGDEHdDaCDPKM/ZCu47axNFR7wN905tR6gy9YFGHlyYDFLfMM1CtsXbtnrK0kFQgKRorb78AQijiDAsJky6BxMJLhLCAl7/OjAvQ7xul3tiY7RufVQr8vPifPw4q18M5T53/sF20PkabooDXLD2n5BaJDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VrySffvbNFv8AarKvoY2IhCsggK+5CxmO2Lfq3nPwZ4=; b=Hbe3gS4E/VO9H55mMkrMn9YTqM1tbHAXOgskiQffGukqMFGj9unTT2EVHHVYfHUFIbqx+rcMttEwveEunUVPX5wqqCWZYVBGAN7+D2r9pMVdlYFuJMDbAOq5EAiS7yGfZ9sI+srcvKn+7mE80N9lR1FVyPV8CTUfh0uZfCtBswaJl+1TnYt3Vp+SCHM5jpHwM0DDKYZpUwfJtaZwJyE+15lgNlnTEc2UyufjpX0xz6CmsIZPerANoSdSrYHOrKGJXaMiBhUmQRUCpCPdml3o4je7cANoUOPz3uW6pikSRzMvgwGySViBQpbV8OjrVT6Ge+O6YPv8miX3JHAg4yC7bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:16 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:15 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 14/31] drm/i915/display: Move resume sequences to intel_display_driver Date: Tue, 24 Sep 2024 16:35:35 -0400 Message-ID: <20240924204222.246862-15-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0013.namprd02.prod.outlook.com (2603:10b6:303:16d::13) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: c33f8944-7ae0-44c0-3ccf-08dcdcd983b4 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: j2fXi0taPjqsRUPp5G2oHtYSNIXD8BP1xDFgEZgPfgG1A/UxqfOtaxVtSV/pGMQsZgotWM/UzGub3zYjbSdAp20JPgchM3XxFMtaAL0eHXDM8/MYDxnG0VkCSgKy3eA07PDMJ5V1t0HxE/5NgdV7OQBIHS/fPja+c+/6czDLXBqDmG9z48bqE20WPkjhoX1AFNEHgyPqfku+CoNB4AkskkpdzhWYJiqdpYrlm6TaeN8HwE0UzMShVqqW0JUQ1ZXuOkHW4kbTo1RXPsbWPoiBkJadgwlYmcIB6S8aebWp0TkspuL5NMf8r61y7cg5TsCueheY2T7gBain7i7Ys31L2EgjAlaGCGbmyWJZknHfOELeRSoM3N3N/KaZB8Gaq6j9JMHmPeLzt0z7Hruzq3JOzZBDkfm2HvVISC8rJueiJRAlfEzJjRMFvQybhyn+ajNPdA9P8hzGEXfS4TIesL2Vh3ziTMX5ugK/OFmdKF/csBlhVD8HnPvsDI4Ze/x8R2Oj4K5t4rxwEyfPTSs5Ds/2vTp/ZeRpCQbP6V/jdfoMNJPON5bYOatSX9UrTtJAMJQrrbFbwD9K0CLflRP207zMW8wbI6BzmaQYOAKiVXE3J0PB6V1q3JOlKvSO3t26qYg3RLRSH062ucQ2vdlHhas58XaB4ijJ2C7uP8XoCLBspvvBkgPKvW0NNqNNrely3YGNWm5gGPT63RQmjT/Tv8kF48d4bT6GLHcFMGWQJ+Gn3LdcTGVDZCVn8YGGEX2mO9Hi9lhiUmrdFvWLiflFz8xc7ZVqte6vgqe474JJaNeupWF4dTUwbCfIyybfhPB/ZkalpIhH0Q3kNQH56DOoLFoAXNebHjIhIhMJxFRpSn5C+e6BU2GWWHas+1Wc10oZ3WPU9ha1ySnCuLAXW8CEKeK9r0elO6VairQyOHNMPBnrqB35l2LueAfK+DLQ2jJaXvoe2axXjwbrplyUwQyUw2i4RmKmUJj+YoUdLZl936kEFq0j15bgirDLaGrBvvdHH562hBoSvO8QqHc/5ehD3I4nZjCWH1Xt6seFQgbGTtCvPs0yqssMC+jHPs0KfetUy/r5J10X+MYw2nfaw99N5G82Z+myejvuMKpgIfAGHSUQ/NBRVn0D2VKz5GDn+NbGRaUNLmXPFoYpabkybSSvf0EAfYnfuajdmQC5m1LK/kXXTFpgbyczXRLjpqGCQ/LG+tpVe4XSBDdk3VORpfV19GLiWIMXXzCOonyTKVh+vft6X/lr/iZh7P7T7Dpt4gJ4tgv++jRQQQPC40nf9FlxBT7yNg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PuOteCvJLJgQIa9Whi2y6lQZ87NzDLHEii5jyxu9bH4VB+pbgxxZcZI4pgiZtIB+QDAQJh1JTDHNndIcFuHrMTXlMO6DFp5RETVgekArLfeTiYXSgjc+5u/ULL3HcgEwmDiB6es09uv3UjOo9gEj3R0a4Irc6gtscwYNwQSVxO3O1Jb8HPs3HXeIuSjo0jkespot/UQqYjM1RPyq09Ub+wLYKGVsoSa4bm2aSUK1kZEDRMro4HLZ7yh0gk5CETXLOCPmJ/OXAcMMP925C3N46vWFtJa9dbfni6+s61VVeLrjJTMj5nMDh3A95VXqJdONnncHCsQQJSPqf0BYMDLk0eElXXExu9qJWiaQmR0y97NG+x8j59X4d75Lpv3p5AOgz4PmFPn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p2qSPZtZgyQfrlH5ZYuGzAkZ6fwI2Ttbo66geuNgOeONaJ1kpTJjWiKD6lZVorLjLuxd9YDIBjzhR2MXvqk4JDayXTTBXt+UCKbXzEMEW4GTAdeqZ6yshr3l7WnSya8hSKARBFtvqyslfK39A== X-MS-Exchange-CrossTenant-Network-Message-Id: c33f8944-7ae0-44c0-3ccf-08dcdcd983b4 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:15.8250 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S8DTQX2qZxMNEsceZoJMM6qMXmk+oAizC1/X0tcNj/M9P6f7VOBOrDcoMBaPSXPAtTPZ7lBZQhY1/6+Qj+YDJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The goal is to reconcile the Xe and i915 PM functions. Continue by moving the display sequences related to system resume from i915_drv towards intel_display_driver. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 25 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 2 ++ drivers/gpu/drm/i915/i915_driver.c | 17 ++----------- drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 +++ 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index f509ed1503c1..2a171cb2613a 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -53,6 +53,7 @@ #include "intel_modeset_setup.h" #include "intel_opregion.h" #include "intel_overlay.h" +#include "intel_pch_refclk.h" #include "intel_plane_initial.h" #include "intel_pmdemand.h" #include "intel_pps.h" @@ -711,6 +712,30 @@ void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2i intel_dmc_suspend(display); } +void intel_display_driver_resume_noirq(struct drm_i915_private *i915) +{ + struct intel_display *display = &i915->display; + + /* Must be called after GGTT is resumed. */ + intel_dpt_resume(i915); + + intel_dmc_resume(display); + + intel_vga_redisable(display); + + intel_gmbus_reset(i915); + + intel_pps_unlock_regs_wa(display); + + intel_init_pch_refclk(i915); +} + +void intel_display_driver_resume_nogem(struct intel_display *display) +{ + if (HAS_DISPLAY(display)) + drm_mode_config_reset(display->drm); +} + int __intel_display_driver_resume(struct drm_i915_private *i915, struct drm_atomic_state *state, diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 179fbb86923a..dec93f2f37c6 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -29,6 +29,8 @@ int intel_display_driver_suspend(struct drm_i915_private *i915); void intel_display_driver_suspend_noirq(struct drm_i915_private *i915); void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle); void intel_display_driver_resume(struct drm_i915_private *i915); +void intel_display_driver_resume_noirq(struct drm_i915_private *i915); +void intel_display_driver_resume_nogem(struct intel_display *display); void intel_display_driver_shutdown(struct drm_i915_private *i915); void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 12639fa232b3..c9df361f898f 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -56,7 +56,6 @@ #include "display/intel_encoder.h" #include "display/intel_hotplug.h" #include "display/intel_overlay.h" -#include "display/intel_pch_refclk.h" #include "display/intel_pps.h" #include "display/intel_sprite_uapi.h" #include "display/intel_vga.h" @@ -1115,20 +1114,9 @@ static int i915_drm_resume(struct drm_device *dev) if (GRAPHICS_VER(gt->i915) >= 8) setup_private_pat(gt); - /* Must be called after GGTT is resumed. */ - intel_dpt_resume(dev_priv); - - intel_dmc_resume(display); - i9xx_display_sr_restore(dev_priv); - intel_vga_redisable(display); - - intel_gmbus_reset(dev_priv); - - intel_pps_unlock_regs_wa(display); - - intel_init_pch_refclk(dev_priv); + intel_display_driver_resume_noirq(dev_priv); /* * Interrupts have to be enabled before any batches are run. If not the @@ -1142,8 +1130,7 @@ static int i915_drm_resume(struct drm_device *dev) */ intel_irq_resume(dev_priv); - if (HAS_DISPLAY(dev_priv)) - drm_mode_config_reset(dev); + intel_display_driver_resume_nogem(display); i915_gem_resume(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index 49dc91bdbcb0..c26a47dac332 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -412,3 +412,7 @@ u64 intel_dpt_offset(struct i915_vma *dpt_vma) void intel_dpt_suspend(struct xe_device *xe) { } + +void intel_dpt_resume(struct xe_device *xe) +{ +} From patchwork Tue Sep 24 20:35:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811171 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 76FB7CF9C69 for ; Tue, 24 Sep 2024 20:43:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 19DAE10E757; Tue, 24 Sep 2024 20:43:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="FLO75Lf7"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F34410E749; Tue, 24 Sep 2024 20:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210602; x=1758746602; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=hFOfTsL6BIiJdc7Q6FQ3wwY4kMQNeUYq/e0rgscRRzA=; b=FLO75Lf7eU37QlVE1vG/QCWgW99WSfAnVo1LptyhHTdZ5/+7QSFgpaS/ BaQZx7MSLxNHDAhCkYQuxIzXKg61hBCk5VGLkTpt+R7cKtELZURESIhBW 3h1+WrisvkdVUiq6R68unUGx1sPhjL6nIpCpKQsP1wKDLEf/++nhUCfRB qq8BUL+d1wYN/d1Ypt3Qi4BvhFMZNvdEXs+8PNAlOawFaqSDfjRHEu0RH tWmXrFeceiF6j1G2N+wraTHd/Tkw/lpTe/LNv96Fwhp4mL6a1eZtWn+Nj +M3jAdsmeVNhpRytSXHQfcMIiYwowc6VhKCh/otfkKmh6i5354tTmskcu w==; X-CSE-ConnectionGUID: FaG6+JQ9RxqVHolaYdMV6A== X-CSE-MsgGUID: 9D9aFk8oThWsiM2sH9Mfqg== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751546" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751546" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:22 -0700 X-CSE-ConnectionGUID: Nxck4k44QQGdc6yRSrPi0Q== X-CSE-MsgGUID: UyQu2as5QSaDwA6Ex1ttmw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298800" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:22 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:21 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:21 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=veezxBJUewU/HNK3loyviYRrHLFHvsbe3u8XnhWSZLHSTAUKPISc8S4Pdqfp7036VAiMaKjgeeeKZVHdiG9T0qxw3nluB0T+S6tUUTSleFNZWiY2pgHlzR2fSE6Zi9TbSDAJKkffSiO7EBLqjushDu79qvTtMu2+Uvo+wI3sVG0Dm6USyKRiAII4RwriPWMLc9iA/C0AqeqN4BcLiFJzNInU+lTxbSSS8fmY408g3nXHgWkn0+OcIUfWwY19+zE5//YdAwQkxnd63mYccot+x8c/YSh46lQtOCB20e4Z+JYdEjvQsEqb2v9QAI1qsRcDRFq9OlOhumq54pFVT2HKrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=waols33qSFJCvVEzq6wGeYIEcyctV0S/oKn1vxKvqO4=; b=ga04zVGtYI4E7Xx6LWhvJJW06WGB9iUc4t7inmeeYUb0ADgvdswO4ZFc0qkVrS1nLEjdkdQWYPR+f9OfW33lB0NTGNxrP0B9ZQj7x7nAF7BZUjLGLrIpZZk1v9O21djtqy2UHKIoGUcKx4Q/0Biynwm0CsRrRvsDOdeZ/687a3/IciYzZR/Bj8mz6c+jtz6vl7tMiwQ1mckOm8EwDWLmcECfZ+FJwG04n49JQmqTvQMZfxwZCrxnhJ8txzSHWVs9DMfefZAVXTjXj8Wi9BtE0AzKpY6kzYlV37qVMgFoi8WCDpIFBsTVQTA2UdOh2WlZ7WyUyktRtIIGKVJC/III4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:18 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:18 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 15/31] drm/xe/display: Delay dsm handler registration Date: Tue, 24 Sep 2024 16:35:36 -0400 Message-ID: <20240924204222.246862-16-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR16CA0034.namprd16.prod.outlook.com (2603:10b6:907::47) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: a0d9e73f-f5df-42cd-49bd-08dcdcd98558 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: A2fku/9ZeS+b3yVETxsYihjGhTyh6ckc5wuBJA41hpCdSfQm86mGFTgG60f2Bb5B6q6oG7l1kNX4ObtYnKo4fI+BuLytnt60JctfWEo3wQcBLi7zPUgV7EtlBopiPOrthp9mnY/M+99f3YHMcHFyUqre6Jj61q8hn4LL2469Zlb6ENWmp9ZWsB4bcApon3Nkjlu+ulpzZPaCgf6aFY3Lu/VX0BQ0LDBN5lKTxEGRkfer0hs3J9oJsZXog1SpoZT+0YylIm23fNa4IGNAizw2nFvjQ4eVHAh5x88dzwVGYGxxet+XcM7L/kyWVcP/20Z5zBnLI+SukWEWUDWK/FCEBRcjlh7vgABrz+Q/yOnQ1tEFJ+GV9kaZv7ExN2hfMG8xVHMi0Q4oXdU1KlZYBRUoBl6WE4aK8TeZGdFRI+NejS43Pw/IRDaR4MJBKptiW7kks9gAWra0cU9S8RfiWf+Q9w/vD8h3FvmP36b6MQ4+/doQPqPEeXRdZEV/QDn65+22IUQV57123/EmB76NX2OMvBdFIr/Edsc5KDcHHH1EO9rDkIbHzbKZtDlKa8XIJWedN8Nq3PWZ/7XSkxkPx2CmqclCinuOkRKxI8dbaF2ruWv5d1OMNv89omZckW0wRAuBFvpk/R/7FN/6Falxx/dZnSQzv6OLn4et4QrTqeRpRGswnRX8bo2wd4J3q52JEAuWtiM3dfRfUWKAvCb60Xpm8Baqg76pLIgpQukimkxeZvU4+bN9/IEIinGtjYq19czGerfLk9OmITZzS4VKv7HJs5ZQtCCLeA+988zvdKbZq2zHR89EGFuV69Lll+Mv6mmXR4rsCjfC94H9DyrfoZ5486OXwvkiLrXpJSyuCYA6CWqHCCNxTub0Qag8tPh2eV8WTKxD0UkV4C+MWOyvzPrJAaroXsJT8N2+qFrzC+d1fGAuvzcohhzZKTjXO/ZV32ZAceLH2dVJALkASMR3BRBaS/mp9A5p72b0K1AOHZ4u6yDku/GGWj53ReKZc7rH2Z2L47yihcEAELfPN2BGCbo/4AOdyGcdomC1xtGVW0JZ+f+oaq2ncZ1Ge/UO0lPbFFbXNtOJ/8mtUrQhtW9nAe4lnLtz0/uk7MpwNMMCyuGK4xUnMTUHqueJsUGgVvVBgcjbyLbf7hyF9+ooYfqeNwy4N82rTJZRCKiqK5qaHJUu7tg5eYkteg1eMMRpiYlfto/+3YPRIpQUehSk+kcX5NmhUDC/i0WHuFceHMGHRubbBXYgfIudkcgSctqy8Ltz3mMAJJfpFFC2DfgFbXal90B/Gw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS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q4V6CKHgjelOZShNlkySY4GlTfabTzoX2iHjjl+DEyGy6IaN6tPn78X0eCQcW0Z1mtxc4R0rMW9nGZoUrTX0FIdqN8nxIpA5vmbj16kcU96AgQ3UtaQxGDJ/1D5x9Q19FoY0yecOr5y7/eYPRE1YGoCd93yCXrBQvLP2ceFKSqfbGgoOOIendZkKNO2n+v83zaXkwhFDD6OyRxqUcMWOnvpkVl/+OioLAAQ5widG+Ym7k3wwcFcnv42oosrbw03dMcoQNR44dYLfBaPgl/fG4A2YZFWolt+Xx05jPXz0y3rEcdRELcbvaE/oyl5wLpR5iyE3ErIa7LAG4Jv86cYJfHUtne/HW+0c8BXwOzEZ0t9J79gTFCL/ttyQSnsZ/1A1IInw2dHXTGwq8gfQ7s/grS8vRTvevNuxQ65NdkfvyGEu39L5x8XLMygqBVRp38ppy9hZZ9Hn7y5ZNDyTLeVhmv04Lfxc7UjdJZeRLwBLXRon3vLOcLZQxETKA+13f95niKlhDaY1tGB55ZHwBBKeo+9hJD4LxAbVLg5uz8AV2dxkPTmFCCuhZWMGdXs7sTABneLKz/6CU8sPNkj5db5Ddg== X-MS-Exchange-CrossTenant-Network-Message-Id: a0d9e73f-f5df-42cd-49bd-08dcdcd98558 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:18.5195 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ord7RNlv9+IBuqR9be5XNvGY1GLU3ehGulMGqMQOcSDwTuhlycwUJkJbk2OtRUMz8XvGBmsVyhg6PJI/WVfWrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Bring some consistency to register/unregister order at the same time it aligns with i915 sequence order. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 45949b095d7e..e5df50221a04 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -217,8 +217,8 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_register_dsm_handler(); intel_power_domains_enable(xe); + intel_register_dsm_handler(); } void xe_display_unregister(struct xe_device *xe) From patchwork Tue Sep 24 20:35:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811172 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 5AD1ACF9C6B for ; Tue, 24 Sep 2024 20:43:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AC9410E746; Tue, 24 Sep 2024 20:43:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="H23MQkyL"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 354EF10E755; Tue, 24 Sep 2024 20:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210604; x=1758746604; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=+gjKdVKSh2h9lbA06IuR0YLotxVfN503+ggI2kJff3w=; b=H23MQkyLjB2JVbdP98ApscnxDjExm+lsPs1ijQLfcb8hE7hdd3T+4zYg 2RJNUncVMyVDhOGwGygGJzV/pb8n2j7cUbS1wSRXfCaYfclICMM5ecMBI cZB8S+MBfdxzylqZrkBbtrQLVCQwRCnGBGgaoX5kgFYene9ahlylTYMNg vESVrFfk7FOT4x0SkCUMIVbZrmzukjkS2b879ZCj4MrLLl8FGLpAOMi38 4z+Woi0PSik2ygcKTsS89PPeNE2vy9KkPB2eFYm1UP4h9EQOUylvamPiB G9UqEG6hrt/yeD/SjbJYK/386F97ND0cnhNR+ZG0XaBZwdkLObJTYqcMG g==; X-CSE-ConnectionGUID: r1uK3X8ARw6q/xuo8iAr+A== X-CSE-MsgGUID: 8lUGTLCGTCGVK3HGcV3E0A== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26182625" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26182625" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:24 -0700 X-CSE-ConnectionGUID: X1g2vaFgTcC0CkbwVEygtA== X-CSE-MsgGUID: /XPPnUEpRSaTd9o+eW6MJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76337803" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:24 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:23 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:23 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xxofmOR/VUASqwC2z6p0pkV1TOxNs0vHK5a/11hB/kjsE4HgRey5kV1lb0VnOgrzKbcZQ96+KDn4ENakMDWguu/rMmtcSKFohy0FpRY7YPt1LURLfe6YaaW+p/aAhePvvogTgkJSntybrPgFIKb0qPfmee9YY2FERynDtAXP+8SCWFcd4L+tLAq6U9sT73SBI7KH+fR71m+DsCK5xI02ITWQVewsIHRmIthqdkxe5ibKAU2b0lZ0Y/rmiF6FPNHoaZUdUpJ/R/AzC9jq0gbf7lsVFDzyxpTBd56WCHB6MAh4GW5DnTlUjbWQWj1uP5TkNUU9rVjYpTkTEDgsAcPmxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yMsZvsOJtikeZDAsiqwLg6sHs2tXm68WB1K/c/s9e94=; b=bV9ETMCAfDHfixzp0OU/m48lAyU3a2ftAipNZ4c31ieLLKo5hzix9mXLLJX5fTej762e5GdFU6BBX9O2nW5AE/SGPdJcF/uGI4I5actuvh0eboDGJEovgLFAJMZubBDDkxArPZ1LZXVTFB1om/xfqXUGbppzD7OKE9la7T6FO0AqsldyDYzVfhyfT0zkGinMZ0MJqQM1MIiKGGyJC8tLxI/eaW86FHpLc7m+okYaMuqMKxEsJzzukHXOH6MtK2LCGE4X6CD+ybqMQpQbxiK7mvlM38uEsOwzc3Urt1z3d5tlw0F0fzBhDB+3cJf2YzzaTzWaQYbD7EPYPeItRIczsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:21 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:21 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 16/31] drm/{i915, xe}: Move power_domains suspend/resume to display_power Date: Tue, 24 Sep 2024 16:35:37 -0400 Message-ID: <20240924204222.246862-17-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0253.namprd03.prod.outlook.com (2603:10b6:303:b4::18) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 30bdb2ff-0db5-4a85-05d0-08dcdcd986d8 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: MCrEa/YWHeBlsf4ePAJshKxOT7d93N6/kpWFK7z1piAy3isNSTz8CFM3qI6hM7C0wbXUuTY5cl6JvBzDeEdiNZJ9VefdFibnTqLYUZyKQbN0x96vA1C50QbtrQQCEWvDXG46Nc+8Tf96Hc5VlyTId6ydcQ4cbtjCl1hM+Incfd2OtjxYo1IjwfS8Lbv5IFJFX0xxjcXRwqRSzX0RYUeMK/Vm5gWAuci/oeqktA2Olx3r9Y81akjEvCcCAe+AQDMn/RzTOQqQba7VOgjkLt6ckir9kXgmF+XQAFNWAwqskUkiZ5qRaMATmvVrqmaiMnf3NOOQwrSSlA1K+oEbBp6GRzLJ5+fHNXhiujHjRnpi7+vlUOAw/+p+SX0V0VP8sQw9yVH8RUnCCv3sNS1g5mWUcXMpNtNKZ8KWt5F6MZxlUnVNjc9tNoiYmUB3Kc1G/HVhR1vJWCgL4aYIsFvrJM6K1QSFgjlvQ+JeC/ZjiR1DynLXEok52WG3sEV7gjkf6STTiiu1Gl6jPLrYPwxkh4IwMHx2T6imP5YKXruY2jDew/iCqoc2HutRhNF8kSAxHKOdeGXLqRCqpXha72OXWtDVtmZChWvQvbSxRRHrt0TRDQUqymemvBNPOP9aWg1wyw2AphrcdNxpJENXl70Jc8m3OkCFjEnufWJRNVG/iCht+AzdBRtC+NALe+DOXRKsnTL/0g/BRa5IlEQekcCvk/eFEIuS2eJ0t8iUryyGFMl3FuwE6d5IcRTd+TXVt5S+JRKoznbNfrQSYHdl1HEm4aed8++F43tAd0lk9TGjvzg2wijPKOIdSzHJZMdgcYINc7+m1wHgpVUUums9IsyeHIRwpAKYQTbs6k9BFBCRxcqsoB2qGch/r+7VCDOZFEqGszXJrcWQe4HuteXm4MrEey3gel7YUR7ckrgOjQsJ3RdgkYVKVx1yWNGYvj8UVyD/VFBRn8ItaO+pGgybTSjltL96q4g6AGed7ddFxbL2bihBUk5v2eP7dybjuLAomTfySopzCDPKg2N0809135Ll3UDAO/RrGPLhl5jRGwa4dtN2eEm3gx+L77zozn+Q+BYagQ/9jsXxoYx1FWjyInfZtAdANZl/f7oBt4liuK3qIoXbEk1Hpb2rJAEw90rcogDjNP16s7taNbUZ9nGvZnPhcYKSZsYNa7rxuBF0anLHeaL9EssMFarVzL12sLMFES/Ysl/3B3TJ7SzF/Yz50xVGfWPo1NlDBhuMRQJbsd4rcTE8jnfJJTccycXf8sLBPAr9hdW2YX1UYT945jjBar9T8KPP8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T3TUTEyIQl0pY0zC10J0dxNQvT833Ts97n0iQ5JNa3Osweq/wfpGYEuQAT6PVDu210WSKjxkMfKt6WJX2UIxeiDUDKgXXhF29/c5rj0g0tyeaOWAvneD+zihWi8bHBgDexml4EhstfRWTpgtiH6Y3Omk2tiKJVFapxHuS4tHSy/GRGMHt/ki7nzCn0P/POoOhGivtwwkWxeF+/NjS/AtKu0kLd1/GyPtG/sp+1LeXSwHmIYn0hyzdQMH/8nrQVZ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rur0bXaa4KWS+dQ4mTet7fJPsl7N8GQHyCIQD8eVZVTpnOXl6UmMTLgAw1Z9B5yEdokDO0M2BOmowrCF9MYHR0x4cY2uyLCQPUIxegGuHaQnWqCLpm+Sebl1Ok2VTwKvooagznS7dTTivIrEfvlKuPdEGqCf2FZjuLbDiQJmqO5fa5U5R5HcXGCDYZ83lwrkDtCVM/ndtvBo6XK5bq6S00qmv/p41bR2n/zcobfGNlDvmmy2g9pLIxCSa4pJYjTnjcljRD1BNCKBsax7Em7HhaguQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 30bdb2ff-0db5-4a85-05d0-08dcdcd986d8 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:21.2067 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XoqIxP2RgJAfZJGMTlHd06+C4RoN/HQQBRv8T5vug6qX4PioaaIxTBwb3WeZf5+awVUyHKKam6CMgwNrISObog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move intel_power_domains_{suspend,resume} to inside intel_display_power_{suspend_late, resume_early}. With this also change the VLV suspend failure to call the intel_display_power_resume_early. In the end, the only function executed there for VLV is the intel_power_domains_resume. Besides make the code more consistency give the call that was immediately before: intel_display_power_suspend_late. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++++- drivers/gpu/drm/i915/display/intel_display_power.h | 2 +- drivers/gpu/drm/i915/i915_driver.c | 8 ++------ drivers/gpu/drm/xe/display/xe_display.c | 7 ++----- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index ecabb674644b..923178a4ffe5 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -2231,10 +2231,12 @@ static void intel_power_domains_verify_state(struct drm_i915_private *i915) #endif -void intel_display_power_suspend_late(struct drm_i915_private *i915) +void intel_display_power_suspend_late(struct drm_i915_private *i915, bool s2idle) { struct intel_display *display = &i915->display; + intel_power_domains_suspend(i915, s2idle); + if (DISPLAY_VER(i915) >= 11 || IS_GEMINILAKE(i915) || IS_BROXTON(i915)) { bxt_enable_dc9(display); @@ -2262,6 +2264,8 @@ void intel_display_power_resume_early(struct drm_i915_private *i915) /* Tweaked Wa_14010685332:cnp,icp,jsp,mcc,tgp,adp */ if (INTEL_PCH_TYPE(i915) >= PCH_CNP && INTEL_PCH_TYPE(i915) < PCH_DG1) intel_de_rmw(i915, SOUTH_CHICKEN1, SBCLK_RUN_REFCLK_DIS, 0); + + intel_power_domains_resume(i915); } void intel_display_power_suspend(struct drm_i915_private *i915) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h index 425452c5a469..ccac3c06b2f7 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.h +++ b/drivers/gpu/drm/i915/display/intel_display_power.h @@ -176,7 +176,7 @@ void intel_power_domains_suspend(struct drm_i915_private *dev_priv, bool s2idle) void intel_power_domains_resume(struct drm_i915_private *dev_priv); void intel_power_domains_sanitize_state(struct drm_i915_private *dev_priv); -void intel_display_power_suspend_late(struct drm_i915_private *i915); +void intel_display_power_suspend_late(struct drm_i915_private *i915, bool s2idle); void intel_display_power_resume_early(struct drm_i915_private *i915); void intel_display_power_suspend(struct drm_i915_private *i915); void intel_display_power_resume(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index c9df361f898f..9e788e1c178e 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1034,14 +1034,12 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation) for_each_gt(gt, dev_priv, i) intel_uncore_suspend(gt->uncore); - intel_power_domains_suspend(dev_priv, s2idle); - - intel_display_power_suspend_late(dev_priv); + intel_display_power_suspend_late(dev_priv, s2idle); ret = vlv_suspend_complete(dev_priv); if (ret) { drm_err(&dev_priv->drm, "Suspend complete failed: %d\n", ret); - intel_power_domains_resume(dev_priv); + intel_display_power_resume_early(dev_priv); goto out; } @@ -1211,8 +1209,6 @@ static int i915_drm_resume_early(struct drm_device *dev) intel_display_power_resume_early(dev_priv); - intel_power_domains_resume(dev_priv); - enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); return ret; diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index e5df50221a04..d5be622f831b 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -404,12 +404,11 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) void xe_display_pm_suspend_late(struct xe_device *xe) { bool s2idle = suspend_to_idle(); + if (!xe->info.probe_display) return; - intel_power_domains_suspend(xe, s2idle); - - intel_display_power_suspend_late(xe); + intel_display_power_suspend_late(xe, s2idle); } void xe_display_pm_resume_early(struct xe_device *xe) @@ -418,8 +417,6 @@ void xe_display_pm_resume_early(struct xe_device *xe) return; intel_display_power_resume_early(xe); - - intel_power_domains_resume(xe); } void xe_display_pm_resume(struct xe_device *xe) From patchwork Tue Sep 24 20:35:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811173 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 A3EEFCF9C69 for ; Tue, 24 Sep 2024 20:43:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43BE410E754; Tue, 24 Sep 2024 20:43:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dAsjK5hd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3104D10E754; Tue, 24 Sep 2024 20:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210607; x=1758746607; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=dXnxse63m3TbC9iVc+XlDetHx1RhMIXmBkfoYo6eM5s=; b=dAsjK5hdwAFHyWUwlm42hS+YGb1iP1qBCH3tToRC/kAX+muMEUvASvEi yqYNImU4R5edk8Dgb5ppb3z9/tRXxPbD0TBolxd1TtAk1IWNs+477ktbA DJHPFs10u6PjoEgPQyfThT7R3Lq1Jk3eGRh3ryI/OBPujNnDW9+c81T00 pkfybszkNr524I/c03SoC1Fq2k0yFlNv3u/xxEKzN6HlS1HbJC5x2R+rv 7IAyUIid3aj3H1qOaW7Oxn0kWHJfC8otBsJwIkjgwRp6RwOlwdT9SKgBm +nA0ABYUgiSg0t2l4q/5B7NgoQ3EBoPuGFyCI7ckfdvQHCu2qr3Lyxvgp Q==; X-CSE-ConnectionGUID: pXUNM/kITROaW2+CzhDlSw== X-CSE-MsgGUID: exZ0yndLSUS4t5DLChUN8w== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26182631" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26182631" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:27 -0700 X-CSE-ConnectionGUID: 9jkwMvFUSQi3YnP46pprqw== X-CSE-MsgGUID: XLlGDM1RQSmGfpFZANxfSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76337804" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:27 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:26 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:26 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:26 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bYWEsmTY/XZOEKgrzk1wzxpLkO9QOl+dQ6/w2eahd6sJRQDL3dm/I2eQq2m18dGzUh7Je2GBksPnAGtXxHoyu29IiuOcZ+iK4wsByr1aAqio5hLz1WCFl/AqRKKTuJw2myAcJveS0sy03N+oFswswXyXhjHm3uj4XiCcMLWX6MqA+IpEAZqHWWQ/9i2u7rFMhjEiESZTAuysDYQFCry+o2apYMBndVidBGU33h7TCoMu3LncyXlqVXydgicO3fyaYNH474TwFqwDGRpu8pdGFMsTr7weKHulMVU1NhJjY6dCRJkr1npJCj4DtRT3YEtYKFq2dcTozJKAWMRi3wmxgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1K7XnzfvHXVClhtAdL5+fmo2g12b/SzqkL14vcoQNgY=; b=rEd/1LAqYTFpJnrqDJEQIrEENzPBS+mJqcTwHtNzJG3heh/NBhUBGj3h874/W/Ed1+98b7T2b6t889oqrQZZb1mKZg4PCHlQzmj5BxhNV+ebekNJkq5jggyNLFedFf0Dmy0YkR8M5lE9EB4HK0ABaXKJ8nLsU3H6uMfzDqzPzsLQBgzK5rA6Jv7QuvGOXXnrxEa9UVjEGLWaxyqnSst0GOc9mMMkHBuyYAoD+whg1N82MUN5FppUNsdIIyIaYU0VQ3c6Bzhy/MdxgVZMgd6sHVq78m84yTLXp1FeIttS3Ime67tjqF7vVHiLIJe99wGyLpcblCYjBJQFt3IW34qd8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:24 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:24 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 17/31] drm/{i915, xe}: Move remaining intel_power_domains to intel_display Date: Tue, 24 Sep 2024 16:35:38 -0400 Message-ID: <20240924204222.246862-18-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR06CA0001.namprd06.prod.outlook.com (2603:10b6:303:2a::6) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 62460668-e672-4a8c-14ee-08dcdcd9889b X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: ajT3VUqwhIeOa8vOSoqG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B3hgFD2DUjMqvgF6HNgdrNFYnXjB7zwMP1N8vDbQGCEQlHu1sPD2hoBrIWsJ0cucq9ZskCmf0kP2sgaUk8uwr1gOTtP03JLJkvQS3TnjYNU/eDdj5UcGXAs7DlpDuwMZDmikqEMSyPJNp9hSF+Pas0Eg2q/Cg/LXOUbe8fsur8bcQCDq4JvQsJRozBhCVSQazdd16cyU5kqHarOirvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lYVP5N4ogIDOx58/VrwzPU2Ne4Dp3JinInxpUDhA4kdJ8zzWBcEp8PJ11s3ZFJPIfVeS7jmYPF50KYAbtxml3me1yC4q7qmTsqT5NlBoObl+2VQUMIE9Jj+LqRfZyS2ruBbd0ItIi1LoIlsLozEUhx5/yDrSUI7aHklwM3kuZ/rFAzzNrKwFjIvEkXYDEvaSqGdkWPQTcEHe3PTvCvV0iL+HnM5ohVTxBEN0ZOlpFZHSky9B0Uh8KuAiVPWzDhMfRMZpsdgsDMuh2AFc1xiRHevCABIihROuSQAp/VX6j61ZXT1B3jBCZajbdOWy5EaapnxtRGfkCW5VFZilyS4hwpYZdi2nbdF83IoQyVN6cZQ0ZgImc0F7+GwzKfVqNXww2qdNxYFwf+dbSu/3rjF5VlHIwDMJvIxBqKOeQsnY/vE2gI8/KbyEsqHMZB2YzJd0piC2t7bNRU/tn+/t79VNtTL31qFt5Vvzk8Led169UwTfI6r//lSWe1Aog5s+VzFPmjnulws+vvr6Rt1BRYSx/JKEFk877YUIH7DwJUC4tW9ipxhde/reNRAsLmKC/0WFztXpZK4/lOtomWjrmijRqcgqfreHAdvv/s6iC0wibFNagenq4iF72TruTZwQppRywSFVI1y+0mwqxciyqd3PV8Su1YMHkRSLcSdsOa66AVLd0Qr5RXRD4ZupahUlC5XrG3BGqazUgsEF857chdYUHau3WtnCvhL0gjbtaKc74qVC1o2ts/BzWw7VSK1IrsZwQkFBthYbE6Gz7pnG6/qmFCx2Rtp4i7qrQHR18/eNPinS1kt/k0zQw+3mjx6uNWhUmrAywfqb4db22jXYHwnlEFe0CC4DCSqSDSOqLmkzDA5ulvroWlUnVoyVmu64Igbb2I8of8ylaspCyqjdEpJa5mKYzaeMfFoY3qOGJHSC/FTqJUMpYVACTK15dm1RWCGdS3HTNPTQlrCfc84QlB2gv65nJb5+6EMVMNb6fomelv31i8lyz0xfDqJ4JLC0NJ50SXskPphwGACA6LDx5/Qzf4zetABbT9Gr8hR+gxErcu3fJv6Q5Qhu9nZmeaG2dtxx3iFHSLK+BYhznv6fx8fwKM6+zCcm/QInLQtOxuFXpjrN4Q0FUU/VNR3Wvsg7rqdAozEYc00rHKAAAMBaw7taz7wxtXcA6glMZgRbDjd1km73vaz4ZTS8Vizk/8Q1hkWJqqvrC+toFEEVyUKGXk7ERPX+ZCL8nG2EEphQ1IXarKWqOErO/BOcy7oI558StYyoyqVWkCy7c68avlOETeD9xAFUfmMUgJmmHYuFkI1fHaL5KTbBxxWuQIkEOzcfrc9Q6/TzhpZgE8hIVCqI0V4cvMD3Bn1bDyIg5C3vFVWgSG+PoZVsPq5+SJCJLE2SU9waS5pXsOgyRGSpk9TltCIx03Am7QDbFH876FyZoDu6DDlLPg9D+z9E3VXSyU33LNoWFRPaMQXIffkAGYPupkunwVIEhrbMeO0YrTYB8sY5T5TWue/nk+EqBdtAJPtJesGBcxaoz5zpqnOl4ctaf+Ncdap3jsGK+8WGp7gTOXvKOFOILoaYsCHSd9yxWytUr3bsiznDDk9WUUbFeUZNsEydTQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 62460668-e672-4a8c-14ee-08dcdcd9889b X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:23.9303 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Uh53pda04/wOuOff6sXdE4Mr3D3KiUcGA90gpt2JNu69uI6l7Qlvf0KchbKCnmI7IML+8uCfqupicv1AfYv7zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Consolidate the intel_power_domains calls under intel_display_driver. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/display/intel_display_driver.c | 9 +++++++++ drivers/gpu/drm/i915/display/intel_display_driver.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 4 +--- drivers/gpu/drm/xe/display/xe_display.c | 4 +--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 2a171cb2613a..a64468e3a052 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -563,6 +563,13 @@ void intel_display_driver_register(struct drm_i915_private *i915) intel_display_device_info_print(DISPLAY_INFO(i915), DISPLAY_RUNTIME_INFO(i915), &p); + + intel_power_domains_enable(i915); +} + +void intel_display_driver_cleanup(struct drm_i915_private *i915) +{ + intel_power_domains_cleanup(i915); } /* part #1: call before irq uninstall */ @@ -640,6 +647,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + intel_power_domains_disable(i915); + drm_client_dev_unregister(&i915->drm); /* diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index dec93f2f37c6..4b2c041667e0 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -21,6 +21,7 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915); int intel_display_driver_probe_nogem(struct drm_i915_private *i915); int intel_display_driver_probe(struct drm_i915_private *i915); void intel_display_driver_register(struct drm_i915_private *i915); +void intel_display_driver_cleanup(struct drm_i915_private *i915); void intel_display_driver_remove(struct drm_i915_private *i915); void intel_display_driver_remove_noirq(struct drm_i915_private *i915); void intel_display_driver_remove_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 9e788e1c178e..53960326b68d 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -281,7 +281,7 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv) static void i915_driver_late_release(struct drm_i915_private *dev_priv) { intel_irq_fini(dev_priv); - intel_power_domains_cleanup(dev_priv); + intel_display_driver_cleanup(dev_priv); i915_gem_cleanup_early(dev_priv); intel_gt_driver_late_release_all(dev_priv); intel_region_ttm_device_fini(dev_priv); @@ -627,7 +627,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) intel_display_driver_register(dev_priv); - intel_power_domains_enable(dev_priv); intel_runtime_pm_enable(&dev_priv->runtime_pm); intel_register_dsm_handler(); @@ -650,7 +649,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv) intel_unregister_dsm_handler(); intel_runtime_pm_disable(&dev_priv->runtime_pm); - intel_power_domains_disable(dev_priv); intel_display_driver_unregister(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index d5be622f831b..df66e47daca3 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -107,7 +107,7 @@ static void xe_display_fini_nommio(struct drm_device *dev, void *dummy) if (!xe->info.probe_display) return; - intel_power_domains_cleanup(xe); + intel_display_driver_cleanup(xe); } int xe_display_init_nommio(struct xe_device *xe) @@ -217,7 +217,6 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_power_domains_enable(xe); intel_register_dsm_handler(); } @@ -227,7 +226,6 @@ void xe_display_unregister(struct xe_device *xe) return; intel_unregister_dsm_handler(); - intel_power_domains_disable(xe); intel_display_driver_unregister(xe); } From patchwork Tue Sep 24 20:35:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811174 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 57E30CF9C72 for ; Tue, 24 Sep 2024 20:43:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA49410E755; Tue, 24 Sep 2024 20:43:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MVShTRIo"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3210610E746; Tue, 24 Sep 2024 20:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210610; x=1758746610; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=DOKRcZl1VoT7fLPyPTW3qOBCEvKTC/ymmiIIfJB8fio=; b=MVShTRIoZyWU8BWUxORNHBYMUzpXNpgeZhsET3sOdb5oHxPxTB34c4vM iHlPI5pRXsoE6BhEpHSoqifrPcQ1Ut2P6qe9UcSMlzQdJTusv9/6qHyos rAl0h2UKr4clgNHT75fOLdDBCKs3unPIMRznBaivWXxjP/RI1fhEPy86r +wL1tmmnWlaXQahwik2Wu+tgtJOxizGwqxFeVHOeRpnJdjjaZfMEAwvsx 7YUwe14AkqXHEyc7vKbCpFivyoYd6Nj/5oMQ1erK5W90WyYly6a2QYwKz DxntHx821Xvp5qOYPhD47VTv+R2wKbSDXs1vgWyRhD0Ir/mxXhIFri/Nr g==; X-CSE-ConnectionGUID: WO2kuWO2SRa9SZsLw3AjaQ== X-CSE-MsgGUID: vZAx7VWrRJunjnw1w0rz0Q== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751555" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751555" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:29 -0700 X-CSE-ConnectionGUID: AagPLzJAQSaICiLrbYsEJQ== X-CSE-MsgGUID: RZqIll+iTtWJwAAzisLVVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298826" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:30 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:29 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:29 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YI4yn8ja47DXAuEVC9d8rcJmE+4vXf05m40NrU+6ClB9BNnBD5kEVUFdVN6/LwTEOljZNNAxC8x75T2+euzfVJccx3bHN8gnce5pPaEEaqE8PQ1PTRucxkvPm5JZdge4LBW0zSLHP/74iYGVHEnHp6ftWL5/dkelBH0R1mDYrf0DK8ck1scBW3GwF3Xbi7/EKgqKHYvVCSsp+SYYDpqhiCFqM0fUY5i5l79il+j3BGyPrgBkyB20xBafIbVVbTLPCSiVCHqL4wsOChJ58YWo74MlLJQwGjXDOkVpKihUoh2a+NfS/CsFyzAuRsIkCTcBmW/CAKl33bW/k9t+OVcgnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+QDW5xayfVVbVARaiXU8WdoQ3nY9Ij7ff9kj0T7Pc0o=; b=ooyz9cT+FTSQAAtbqATDT3Si87shCi4ev01bYFjGlq+wOg0Lq3Zy5vJ/PBOzObuzLo6y65PILtBsmNwqqXfgUIqUyRsPYedoHIaevkpnDaWtndCZqktij4DwwrlubJJNZlf1BqQ1ur6pYXg4i4j5mkg0OwB9ega5OHG9ynXrMmj96okNdtt5XNzk7LJRd4TSShOOUiOoweYhuO/91JFt/HXKWp2l+AdROSSP7pu+sp2I3GTxzFJR3vK0+VaBmhEES2GxtOw134hJasluLMaWqYqFLGHtN7fBE+lMWnKF2ZtxGYg1w1OcDGeMB3C1ZDCjfn3ZirXi3jmENxokbnDSMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:27 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:26 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 18/31] drm/i915/display: Split resume_noirq calls for now Date: Tue, 24 Sep 2024 16:35:39 -0400 Message-ID: <20240924204222.246862-19-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0091.namprd03.prod.outlook.com (2603:10b6:303:b7::6) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: aba9444c-0ef2-4da6-b0b6-08dcdcd98a63 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: 1b5DwFiA6WEk1jVGuSCr2oi9KjcgXo+ByyJWALATl3iqVHxjjx1f1RcZOYeS/rzXRc8B+PRFLiB3A2V7SzY4iPS8B3g+u0etUrnDRSR/YQvGSJ9iy6hnnjLwb1LImgK2Y4Z5y95MOGpSUg/FjunGNGfH9eDnuFndPOAP27vlwHtZZgTvhk/eJ6lEwzfzeZLn2xZTe4bKdi1p1NosNG1KxuzdPuaRmao9mXt5Y2TYnzbfMiGW2H2tRnYQYIgw1SHZ6z+/EYFej69VB6PDGNOo1M+lBicXfcs0mwwU3344UB/6RtqPZR88sh1lyYt1AjDx8rmPWd1wB4tDA7moSd6d6hqA/1psivfL9FllHaGS2xfdVSc+5lr+Qez4vYHE7fX9PYA3ihWU4PID+hE9L14Z/uQDDNOLZo1kPx30DQp8LVl17kw0UEHDOcz8RMAuUleIKnAGjoQ3qKGZT0fZUMmtHz0caanb9QpW3EjRMLxusYxntrAcPzHr6jJukhQQ4ofYO1yFxcyo8Asdg8F7RKDfGblLkgO7/N4loGGbZJrtHQGoNm6N9FT0+a/WzZqRMNb+NEFOv7mVobame5dga5lrcJ0KnYbxrga0RaeLIiY7bOEbOuffQu6fjNbi6tfd38DTpSKy+tcIKQtyWEmFtphj0h426doe93Q8B4vaw2lp6fF0BboJRKpyezjZsOlL4ebenxz/J0/YP+EOCBRXLQYOLzInMXXYvZfPm5qASAqL2/q3oCRMJj4sLQYinHWhgFEcSEmK5HTpPMtoWXCUAp0u4B2MnCFDTlCHeXHAVutgWr2sOk5QB2kaTABpwpdZr6Yg8jEEA0dq4py9M7Ogw7EL3unVx/wKo5I7Fnnk8BkwWT1iFgbCz6lUVbFE++v3jBJmsQvFP7IAgNr7jBVl/pDwnM2fMC7TEFExwGrLrUL9yWnWmdivNcynkcROi+9MChaNmfBcCTLzOLRhqBqp0J2ErTgcihFaIves+lUPY5oFW+kvIx9isR0vKY5gFVEK9WnbLpOhnf92wGAB1orrkv9iQwu9cYOmlCs/v7d4YPwQ7Fft3ZoUUYR9BwoMLQxkSY6qjKNAWkLEVPvu1JW1IorApgVXh9Ht5qGVf8mdYHghQ9tlpei8AfPvXsfdfyVV+t4T9zhdSE5KUP8uidt6GSv9RYo1Q5w65HdA4IriAYTlcWZz5z0B7RZ5n+F81N1qzDDjaT1rb8r3UxA8b3D7SwTFPTtbU4n/F6nPmX0z3JP1ms/dqk6YTVEQmaCiIfa/kNNVK+d3TfL7g2fQLNsl/YvG4w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qFQaIMV7VruK5Og+pXKY10BACa5Mp97DXHBkm4AHwc7g9KqUkHAzWaeehWCxaT31hwkbQm0V2MXdpSaI8kDB96YX6N+153R5Tm7QH7/mSNM1q0Xt1oTBN/EBl05SiKkaBW4KRfQ5+P1t3YEQCqlgThMyO+3s2l1UIwHGuPjEv4EyYCPNXMLPczmdv5NdxnCfda1RA10V7UBF8KhxqMlB90KW1ehH8KdRABjkPe+oDrpEv6RVOwQHv7jOxW8/heKlP0XQSoBAU15KKyzdV2WjqoKV9JhxFi9STGfAy6KM0Qlp72Y4lQ7X5c14M79nf4pui0xQ1wHyJb99QOqElXrn3+d4qKp7ZUfSLYdIOqOHnz/ojbCROwHzZW3MHhJ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+4tAawKxtM+9bXpvBjO0oKLqxhdrM0RS0nEadxurUpiWlpoH8EfDp823lrOwrNht3UGPriHTxIujoKgonP16U3iwwEczQqubYBjWp6wa0LWAsB11J875XVGwTraJ9DWTgOvST4DI6MlJdVXnEcEXDNdUVVx7JQ6Bp8+VWCkAQw== X-MS-Exchange-CrossTenant-Network-Message-Id: aba9444c-0ef2-4da6-b0b6-08dcdcd98a63 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:26.9507 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LMjwceiT0xktvolENCxueDgAnAMO45AuKdSQzFpiSMVSGNXjP7OwPAXHliPqgDWNC6x4QGEVB4Q5ELMD1lFGxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Some functions are not yet called from Xe. Move them to a separate function that will be only used in i915 for now. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/display/intel_display_driver.c | 10 ++++++++++ drivers/gpu/drm/i915/display/intel_display_driver.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 1 + 3 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index a64468e3a052..85a51b9d49f8 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -729,6 +729,16 @@ void intel_display_driver_resume_noirq(struct drm_i915_private *i915) intel_dpt_resume(i915); intel_dmc_resume(display); +} + +/* + * TODO: Current sequences missing from Xe! Check and merge with above function. + * DPT is also a missing case there, but the TODO is recorded as the + * empty stub DPT functions inside Xe. + */ +void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915) +{ + struct intel_display *display = &i915->display; intel_vga_redisable(display); diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 4b2c041667e0..e287574fcd35 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -31,6 +31,7 @@ void intel_display_driver_suspend_noirq(struct drm_i915_private *i915); void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle); void intel_display_driver_resume(struct drm_i915_private *i915); void intel_display_driver_resume_noirq(struct drm_i915_private *i915); +void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915); void intel_display_driver_resume_nogem(struct intel_display *display); void intel_display_driver_shutdown(struct drm_i915_private *i915); void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 53960326b68d..65f885e03880 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1113,6 +1113,7 @@ static int i915_drm_resume(struct drm_device *dev) i9xx_display_sr_restore(dev_priv); intel_display_driver_resume_noirq(dev_priv); + intel_display_driver_resume_noirq_legacy(dev_priv); /* * Interrupts have to be enabled before any batches are run. If not the From patchwork Tue Sep 24 20:35:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811175 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 33479CF9C6B for ; Tue, 24 Sep 2024 20:43:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3AAF10E756; Tue, 24 Sep 2024 20:43:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ORh2hWNy"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1525710E756; Tue, 24 Sep 2024 20:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210612; x=1758746612; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=UUVJg5zdGCF+GcY1g4fQ2cdn6vEsU9iOfEP1VDM8uM0=; b=ORh2hWNyzB5WaQxvEdvCE9m/6BsvwbF6YjT0MIRcAQn/Hf2OJdt7z3Gq +aY/Zxw3ULLzrQ9ZnjhivyMxt2H4IBaZ4CYXXs9d92tfeTQRYBRtcvqYU +Ja6VkY4er+F9LFEL9+SGBqBHM8D6LhJEZv257zi8VuqHbof8s6S6NMfn v4NJHq17pxxuBDRf+6Rd5J5XEFkWTOEAk8/RLadNu8AvQ29Q2Xc4U8mbF cgLdTv2G8b2LMxL5HDKN3R4nr8XHrpM2GvP/ZyvqJ7XBxz6D/82AI2sU/ xHJyKepDLOWJAtVqKhGF25TVgIM5Y4eP1JBmBShdnsgWkV/AxVtaB+Qe/ w==; X-CSE-ConnectionGUID: qCg/WdE3Reab9aiXNc52Hw== X-CSE-MsgGUID: fU5nbExdTlKiGOAxJPmSvQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751558" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751558" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:31 -0700 X-CSE-ConnectionGUID: ef+nq2FXTo+K0HxSbdP6zw== X-CSE-MsgGUID: uHV+d7qrQb2E5oqzO1KC5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298832" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:32 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:31 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:31 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jSbrFQ+mhlN42NmV9AruL+YvGbTc0sGDU3xwAiJPEl3D36fYN3TvprABSv3/0yfdgE5TNswMQy/OGMA9/44lZDVpug5VUkRhK4pHLzqnb/uvtO6Fem4FETg+BaorKJW0IBbshEOsCjoXdxoDLiz7l6My3cuJvxSzvr0fb68DyeUxK94pRt5Mn7qcg50OXPq0cv1bfT1RALo4a6dkLwckLuD5sgwF6ed0HQ9OMvHavf62Qgts2DKkSXH32cb6EGThIMX7WjluL3vwI7Edl2rF8ASufjhstudmNGt6Mk41pPTWeM0GEPemqdsyyUPJffqdkcK1UxVZ+RJ5JREEkLjMmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GmVwvg1Su6YuY3O0zwZFw4kBarNgiIDBjlGMgiCnO48=; b=i4EwKo2kGaoPxGAu4hwySks4SJKSaLu415ICPOeWK70QCfkeFaLT+OrjKdIfLtIgCeWSuDBl9QKVqcQP6+O8wK6S8zEm9LQ90JLA4SkPgoNASlgxHYdbyXg0E00oKTq/oezTYo0dUaYnLyhfpTaLW2n0BvRGx898uZ0rw2x98LoXplYnYP8JJP2altWoBODry9uwO4YCM0hyiTr8WAfrN9ccF7rANrOll1u5C0nEDw4sDV81NXxax7RfMBW6RIBb4FW9PFzzfn/vKvElDE1fTMyEmFFHBL28xnJzqHjggWSU5IVp83MTK7ulW99JPFSZZHrWLBeENOz8xE2YIiwIXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:29 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:29 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 19/31] drm/xe/display: Align display resume sequence with i915 Date: Tue, 24 Sep 2024 16:35:40 -0400 Message-ID: <20240924204222.246862-20-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR06CA0021.namprd06.prod.outlook.com (2603:10b6:303:2a::26) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: f5fd4fb1-e91e-42ec-0844-08dcdcd98bec X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: Rx2trXSBm5JR5UfTzRiltooJdBebzTxX+OgR4G3JA4PGnkdsQp2m6x+diG+wLSoz/u6tGWNv5GTTPLs8ob45MIqsrepZNU0dxQWUpAl14G0Oo40XT2g4KybSI0+kMKpg6oa6D/zdKPhUlW7Ewuzjnd8HVmHxE26rp1+++P0IRkdoyxEPfg0qc1uEJIbJi+RQcI7FBon/TID+89kmVUEQtP4awoRyvSLRJzFJxQMY/To61R75M0/Zz2zfXwiBU7F1ZuhGUHf1GeOF5iXdnngR0GWQy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I; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Avoh++px4eqrSe5+VAwhe3Pw6nW9cFLLgGk1L7+y6b3vCA7bCg/0rVpaRfDY7vebyBGZk3XSF87NNA0GTLNQpn1N5Vkid6S0HpkGryHUpLjfz7eBleoJHqnu+/QRjCtpVBnGzIMSGmPpdIPYCg4nPuTig3bYhm978hFUyWYvtYycsrPb57DZQdey5lgY7e727hjNaTczeqIv+9zj3+RAlZ3B4Zvu2D1XxS9PmvO1MZThetMteqihPESVZWDytX8iXsReXCLs+sBykwu9cNk47Jbex3WV89gSY9osTgljya1PYI7pgjMWV/rdLfimlkIJhO/tZXFZnBCem9U+XUlvOoFfSeqVpriNycZ3sjXeXzl2KfB3WQit4Gw2jGmuuqiWLDMXnqJZE+Dxin7fhnR/YeD3+zfutFcKI4DT/mJudsRajUNNntsHIp0zrnJgD+H6tz0aWIkuVvmsvpWwMxKQlsQ8AOwBSvsO2FMtKKGuZhPLu+i0IdDO60AQL5YZ/8xeJe3PFoBkM1PKoAxH0EGOMjk8C4dXF38vsvYEj8OAZ/1DWvyHLA7LOzCBNq9sxpOshJYGYEXa9ZuLwzGno0FHDkTumKFVHFyO7s24Mbqc8TFrymlZ13yFXyLNKkUqPUB0EHMduqF0HBJRltrqG40RyJo1j2Tejm7nix+XFujp1Q7HOKsMEa0ncPmVtW1FdviReZbCYos8ykNq1ZBnNw2lZTldeHfelDxPlt9M856bZaqKhkyhZTYf8vZMcQD5RU4Vyh0tHuM85YgfB26CL35+u0CwLbyQKUrZoLb6v32DP2fWzDZf9WfsnKHMc4vr6c+Vu9/rjhT5nJw9XKs2OmCzADJkdAWB45vab0cxH7W/quHVOj2iX0enerfdbxe4n1IAUFjO9D4YRpexfQPBZu5gBADk6jWJ9xzW3aJ2tUG1zTAO4+xVf+GSTRUUINIPUm9T2lf28Zyk/q8CCrj+ndZ3mrnj91VorFa+QPVrpKwCnZBs/pSIuOsI7fkAVLXc6LsaOi+0t9o/BZQbCxXxaf53F9K2ptdEHr1vaXemrwTTcQ5AHioEgNVuhaM9qAs2Hz4g1mkaINxM7w9OVQ19vlGj1REsKWGGGbbs7R5rREhVQSQ/WdmTVxM83forGCPayWKJsl1JVrXxRE96bxQJ5syowW/61gjM1ji4PJm5tSCNpT7nsJUzWoN0s+hHdhcUvyaUVPQ1K/91luyVs0ofm1rjyd40Yv7e0i/O6MYLb6gt6BZ8zMXiMgZjLjPgUc5q5vX8YYRnEH5TVXm0TzF/udu8c5TGgbVGrd9eZ1lilT3akt3ewkwfRLOQfzlo7ooKSSLVAcrhoqJGjHTc6QPfPw4YZJBOvy1EWwuN+k6HOVvIMhWvl7QHpkbMjkn20TDa5dRPJHWjdTRVbpms5HryAkSSJU1RUtBOTDPdUMKWAw49PH+e2ZoUB7AcTLiX2eaKFLdajVxEwQpOQXhl76pINTdKt+sXLDPwhJqrPm7l1Pf/SwOsFa53mB7BAEzxXwnvXCfZxqF0EIpeHdXrqDUMKDFmdqxd7/AHaXC/BJR0wIdUbgkpS/x28FCGEkUJSWIMOGn8HftTixmhxugB094Mr5lkZg== X-MS-Exchange-CrossTenant-Network-Message-Id: f5fd4fb1-e91e-42ec-0844-08dcdcd98bec X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:29.4891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: haHWgTXK4rbCt7DWNJoMwYW8FpmTu5ishizJeA7Oi8s9pRKkWWmZBaBDoWECQ8YEjbLBS+De5+VXO+hx+kiE+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Resume DMC before resuming IRQ. Reset mode_config before GT resume. Use direct intel_display_driver functions for that. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 23 ++++++++++++++++------- drivers/gpu/drm/xe/display/xe_display.h | 2 ++ drivers/gpu/drm/xe/xe_pm.c | 4 ++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index df66e47daca3..959635653cfb 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -419,21 +419,30 @@ void xe_display_pm_resume_early(struct xe_device *xe) void xe_display_pm_resume(struct xe_device *xe) { - struct intel_display *display = &xe->display; - if (!xe->info.probe_display) return; - intel_dmc_resume(display); - - if (has_display(xe)) - drm_mode_config_reset(&xe->drm); - intel_display_driver_init_hw(xe); intel_display_driver_resume(xe); } +void xe_display_pm_resume_noirq(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; + + intel_display_driver_resume_noirq(xe); +} + +void xe_display_pm_resume_noaccel(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; + + intel_display_driver_resume_nogem(&xe->display); +} + void xe_display_pm_runtime_resume(struct xe_device *xe) { if (!xe->info.probe_display) diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h index a801db19b64f..b4ed5b598c2d 100644 --- a/drivers/gpu/drm/xe/display/xe_display.h +++ b/drivers/gpu/drm/xe/display/xe_display.h @@ -41,6 +41,8 @@ void xe_display_pm_shutdown_noirq(struct xe_device *xe); void xe_display_pm_shutdown_noaccel(struct xe_device *xe); void xe_display_pm_resume_early(struct xe_device *xe); void xe_display_pm_resume(struct xe_device *xe); +void xe_display_pm_resume_noirq(struct xe_device *xe); +void xe_display_pm_resume_noaccel(struct xe_device *xe); void xe_display_pm_runtime_suspend(struct xe_device *xe); void xe_display_pm_runtime_resume(struct xe_device *xe); diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index 33eb039053e4..f5d89c326d46 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -182,8 +182,12 @@ int xe_pm_resume(struct xe_device *xe) if (err) goto err; + xe_display_pm_resume_noirq(xe); + xe_irq_resume(xe); + xe_display_pm_resume_noaccel(xe); + for_each_gt(gt, xe, id) xe_gt_resume(gt); From patchwork Tue Sep 24 20:35:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811178 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 D8FC7CF9C72 for ; Tue, 24 Sep 2024 20:43:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7480610E75B; Tue, 24 Sep 2024 20:43:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hD0ysMRj"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id F363810E749; Tue, 24 Sep 2024 20:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210621; x=1758746621; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=dbwGkp4QJaXh6E7xhEfuF4dJNtp0H8NNisRly1dr7Gk=; b=hD0ysMRjUlorUPSsgfOxkbIT4oyJfWeUXvAm4go53vNlOUWmEbcpE89P hawKr9qSfBh9A6Ml4OO2clRQyrr10X8X8WoGqdT/0IKYiETkXac2hHXD/ FW220FFBTxZyO9dqXiV125ZNugbAZECREDzCp+1GTA/EYEcIf0RGm7bwe 2NkJSa83mcWnUc+vB+ueM9872XTRrhnP5k+NcYhDJP/fpruXLlUZW9dbd zT+hrteqfynWsnv2XSEVBonDkP0awoMKTvE505e4cIJik9MkOPq5ye70p JMCJT8mAo1b12KGaO1pXJmMpKrYKjfK8B6EPJGp67VJO2EZOE8TPr29VS g==; X-CSE-ConnectionGUID: bILBOjzERlqKMGbeRaD7cQ== X-CSE-MsgGUID: tTo2KXUKSo6WS+acTu5zcw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26182675" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26182675" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:40 -0700 X-CSE-ConnectionGUID: +JQam3tiSdaLknIiBZWbgQ== X-CSE-MsgGUID: iwRWkeEgT/u8r3wrR3JhLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76337815" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:40 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:39 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:39 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xRpQb8ug1cR8UFHnPOHV9zI4F8T+QYEYf1XMZrInLscacZuKCnRDThLYdmkCoU+8i05aZMURwEQa3CJh0A9vm5JKyZDbxk4/jAwvx9O/hVNTzznsDO2fnA5H/ZFKQZ6yi1xucaw9AneCfFklIh1y1DGTxzecHw75QGVde/aiAlTNM3ErQdk3mT94sdnmKLwooTFPdx6dl3/H6MgVSf+8ET7asMcPo1gXTQRok3kxOxz+G4Rv2Z70DO+fYcLM7G2AeovLBI2g1puNLiBfvYLBh6Z+bVK8kYrlnORgUepqLEM/9jvv/1gZZ+PDNh9FAWEFpNlwiSSGsnldUK057AQWJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IVdq99S+fIg7PUw5z2sq0tM90oGa4UqdtkAZjmVFKmY=; b=OoxPPhdTz87rieV7UwbuskhTGwLnpqc5Tj8sJ4qB35jCX/Ps5/xzMGfSpQz4jSQJbsjr5e8KO79PEDPwJzwhaInYBLlsiTsGnR+r5U6spf7bhRgvbEI60ExR9Xuq+/J3wMElYXScp6ouTxlCecZ+akDYU+ICqpcYAsgxYqKyUR27mKEatXVDUdB0j7k4yX6Avb7EpWvt5aAD9H/5OxYhswAbLEDjThoVkSMPIRcV92IUnGHVZN/4kIUXA9C/UuIg9coH870NTzuFsZq46hNzXRqrK3tCcNzS5DTthKNTSqGaA0tfuAPGxKiNQZxKJhitTwiNsMMdg6TzroCqUwn5fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:32 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:32 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 20/31] drm/xe/display: Align suspend sequence with i915 Date: Tue, 24 Sep 2024 16:35:41 -0400 Message-ID: <20240924204222.246862-21-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR06CA0022.namprd06.prod.outlook.com (2603:10b6:303:2a::27) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 42027b8c-b741-442c-4d9f-08dcdcd98d75 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: 1dnERwpbnCBq10C7THF+xjQB6pCJvqy4gc6splq1x0KICJs8VybfO/aMtistIl3TGJbh+zWFJUsedkeMFCz4QQw7ke8n2cyAqOcv9vcg8xtEBz+GOfbFV0bLKhIOcQK3M3BQDfPKnTvPPS/qRuouPNNAoRliZWpkpIHcG3MPwbh2hgt7H0Fdb2o6WlAT+RSEou31meRWTB9pY6qgGHXNmcdPPoQsHlzXhNUUR33jP5LRaH75fAZxZRDHDp3ZmPD128O+Yx7YjBL3xsLomjRGGCyY9iAkQnCcv4H9D88Y63oE4wgqkPB19PqrbD4cWTO9Xisk1GSgj/eOr1DUMvCXt9QpTpxC4vg49qf/5/RFzBxQsWeoYnGqRlIsXOjqT3x/Fol4Mt4aAl8D47+ogNtMTwNQsJ5pGM+Yt/6IrJOa7a/clzB8qvywgKKawimf+0RSUoRbpHhCYt5Bw655SuWJlPPbBdWkFn6YV1/0hIMRlaUBk1Cf5CR9hhg81azxCOtK+e3Mb6pWYRh3V8gX5rMVv/gqg4jIeSd4sQRbTDYcA0pld2xgR+N69+d6OLWM89hkDTSWN/ctu8DTQfKzsO7g1/V3LuW1yvY7j7uSOXpenNLIwrPHaJuT7+imvyDmz/fuBQX0zWMHC/TdQ1gmwmG38V+GnkkRnZ5Gsi1k8SyBAJOKD78wUhV9T/KniDoFCEqH++v7vuolb73TpY4C5L15YscTeF8JsdroSuyMzqqx+D9ubbB1zgNfbPa0aB++0I1bb/rNDeMiIUcMiq2JrwyA/ioyQkwEwHpCizAfAP0Vxx6mYMYNca1GTCIcuOIPeblVTnt2WjTL2OCNiCDwwEXNHO964SdD09l0MGPfEhlRm7UA9olGe8c2JZPR3ecveN38NGTTMeTiPIhG7hnfkx93M17I2czZ835iWruEatirpZB9xQ5EoTeqeVdINuS70OwmeYNO9Qo2D6yH+NpN8i40Gsok5Ab3x1A+byRSnqNv2wf9ABcTtMSqIErA77ErgKH+UXxkFpUPwKUUMH5NMjD/MmaMN1x5X5+YnlfNZpvkBXSJEZr3wjGEo5/KneBAQVehBFAMYF0FTkGK50X5uWAJEr6zEixDSofwphCqEqgNZpY61gZx+2bp50FFYoCWW1A33LxiNHEiE3MuzpLcJroGx+aydmvsPQkSMGsqxr8C+oH7JSoZ+cDJEgpy6+GqjBzZk2HZ6Pt2mCflrme5Y35lXfn4P++g3VioPknwMH2w0dbKI2akKvMxcsasyy2Cz+UiqA7ncrBD0bXlcJkp5oxdrCLd8PPGWRd0vKlXBt5wOT0wouCYnzMCkrgMAtv2J7EJ0Oy+/26CneaZTrLSMdgyPg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yp6wXvxJ3x6v3fLjHJ4Txfiu2zTlE9swYs2nQekBf1zoqCRGIfc7g+vwN60VIjh2q8thjuLAYK8d65JvAQ1ADXaXsLZCJBV27Ow6GrqC9E11qG6ZZbn281WFoCrNzZCsWVfIv0ZWuhaK7lq8Z6ngAKJguMTH3uGYN2NLcyHpIgTuCI5pGSAJszZRecFs2LY0gB/8WNWBuIykDhaIFoM9F9uO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1rDtCW+hiFFbJWpXIdJK22UYYX85eKlKtr7GT9fJtb/46PzPZ7dTkWlPH+dW1bI1I2IBwaeRVaUnBfsccyQlsBXBQtBT15BJoLr3C0J4I6aULlwKgi/Q8fi3qgdBH82xedmNO8UP5tC4HlrnkZK8toV2a3hCCpx8mcuDDGi2Xih9IbgbChZxG2/rFo+Zlg1Zxs87mT5zG1XeVd+zichNNUWrbKmoE83JY6F6wiwU+mjTHD525ZJuhYtdknVWi6L78fqneskqiG5RPYRz7eWKnDa4fNkmYY04sbA3au9suoTziGyVc6FXUMB5aopXb1REsOYcE/ubjY6tbg== X-MS-Exchange-CrossTenant-Network-Message-Id: 42027b8c-b741-442c-4d9f-08dcdcd98d75 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:32.2217 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 20sbV0kk4PJnHmWMkIFweBrFoAhfZLYjumrw/qs4Vw0SOdEO0lcw5g/jjz/zic9g4aTUMbzQvgyKX190zhlUog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move a few things to after GT has stopped and also IRQ has been disabled: - intel_hpd_cancel_work - intel_display_driver_suspend_access - intel_encoder_suspend_all With that, also remove the xe_display_flush_cleanup_work, which is no longer necessary. Then, use directly all the intel_display_driver functions for a full alignment. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 25 ++++++++++++++----------- drivers/gpu/drm/xe/display/xe_display.h | 2 ++ drivers/gpu/drm/xe/xe_pm.c | 2 ++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 959635653cfb..44850b6cd382 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -342,26 +342,29 @@ static void xe_display_from_d3cold(struct xe_device *xe) void xe_display_pm_suspend(struct xe_device *xe) { - struct intel_display *display = &xe->display; - bool s2idle = suspend_to_idle(); - if (!xe->info.probe_display) return; intel_display_driver_suspend(xe); +} - xe_display_flush_cleanup_work(xe); +void xe_display_pm_suspend_noirq(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; - intel_hpd_cancel_work(xe); + intel_display_driver_suspend_noirq(xe); +} - if (has_display(xe)) { - intel_display_driver_suspend_access(xe); - intel_encoder_suspend_all(&xe->display); - } +void xe_display_pm_suspend_noggtt(struct xe_device *xe) +{ + struct intel_display *display = &xe->display; + bool s2idle = suspend_to_idle(); - intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold); + if (!xe->info.probe_display) + return; - intel_dmc_suspend(display); + intel_display_driver_suspend_noggtt(display, s2idle); } void xe_display_pm_shutdown(struct xe_device *xe) diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h index b4ed5b598c2d..256bd2d23964 100644 --- a/drivers/gpu/drm/xe/display/xe_display.h +++ b/drivers/gpu/drm/xe/display/xe_display.h @@ -35,6 +35,8 @@ void xe_display_irq_reset(struct xe_device *xe); void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt); void xe_display_pm_suspend(struct xe_device *xe); +void xe_display_pm_suspend_noirq(struct xe_device *xe); +void xe_display_pm_suspend_noggtt(struct xe_device *xe); void xe_display_pm_suspend_late(struct xe_device *xe); void xe_display_pm_shutdown(struct xe_device *xe); void xe_display_pm_shutdown_noirq(struct xe_device *xe); diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index f5d89c326d46..77eb45a641e8 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -140,6 +140,8 @@ int xe_pm_suspend(struct xe_device *xe) xe_irq_suspend(xe); + xe_display_pm_suspend_noirq(xe); + xe_display_pm_suspend_noggtt(xe); xe_display_pm_suspend_late(xe); drm_dbg(&xe->drm, "Device suspended\n"); From patchwork Tue Sep 24 20:35:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811176 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 2B9A2CF9C69 for ; Tue, 24 Sep 2024 20:43:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C45BC10E75C; Tue, 24 Sep 2024 20:43:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dk5Yon+C"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id B07AF10E75A; Tue, 24 Sep 2024 20:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210622; x=1758746622; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=ja0muhopZ6QblYwAOCJMliIKebMJASajxspWDDmXJaY=; b=dk5Yon+CDkmbJNzvIKhOmzBMgnA3FOwJK7a2YDmTsERu6ZeEtNDgt1ol QDNafvPtHOF7zAEEGB/QNWOZScJvQY/G4kwA1JDK5W+94zFU2UFcufiyu UB7OOZPkYNHTzJBFxlsUTSQK0fhzkMhsFYzTPAAsEILnexYqYNqNTG0dt XrLsd6D2thYQJ1AJvm0jwYQHR+ZDHvn+PLo3HTySExoVFjfuevUCdeQ2h JGhROOb5nBhNQqFz97KsP/sMETZgBG5I4woWpkGGrOSTkCJv+sf1JBVZr EsYZ0gihOTSxzKv0xm91BLial2rAZrvoAwZHpB0fzcdkase8siQmVIHjc Q==; X-CSE-ConnectionGUID: BKh57lhCTPCQA2KRTed55w== X-CSE-MsgGUID: qNhpJ2umQgWUTh6ZW0AJ9Q== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751569" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751569" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:42 -0700 X-CSE-ConnectionGUID: OmFrkB27QsKu3wAZxQvOTA== X-CSE-MsgGUID: QCIjF6BkQtuKOteYByl82A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298851" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:42 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:41 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:41 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VUrV1NG54ks++qZpVmhq851jxP1i1QfU/BaDyTs/kno65fW2wfXvm5dP03CghOLVl6J67E/WIZtLikBTEyWFOlL1MUMdAlgGGO4cNRVYq/y/OY8nCFvUZ3yPEgmtQotJr7o9Usj5Y4neKhO9TTeoTSgXbm9HvW85IOnxEsXXX8bja3P17vA9errI8944nTI242sdmZn9r6xDgYenxNFW7sYVKVLlXjThoxhhzIisi/HelsawCQSq2+4pWrioW5XkCCwTolCHnZxQXfAMtyiJxM4q0sQspNpFWIPXqLPW8ZdMtkx212ehgvkaWdHPZ3x/LVguWcZiuJ5G9jd7ZdIgVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bkgoA1SOaV0ldLEN5Kx1J5WRjgURZYbpyGEvVCMce1I=; b=Iwjc48b2SuqJlarxjIZBfy5iZbgYgUm0WpCFfWFrxtxsbxAR2dS0KrRtS6vG4OxF5sDgFsRE9MmfFtcj63q/fWFFIXRPwPESOUcXRdJqOSa9axMzf6LH2irVSM36TK+7Vun78cyUqiLkW1KoUVBubJb5UM6wfieSXaWHnNiSTMunpzbeQQsX7phCVi+8BQQmV+1VQwjXGJc48st7gqbGq4OEMI1jicuoM5orKMAED1PwVB/6jS/bv7fMHdkAfRBirOkGcVLPxncwhVsK7SvbowWQUf1OPLoGaY8khRZyQj7sCykhrFsPfzCV0yZ22bP9vxQL1qcP7SWo65UDaBqRQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:38 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:35 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 21/31] drm/{i915, xe}/display: Move dsm registration under intel_driver Date: Tue, 24 Sep 2024 16:35:42 -0400 Message-ID: <20240924204222.246862-22-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0356.namprd04.prod.outlook.com (2603:10b6:303:8a::31) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 271b10ab-ab70-46f5-1744-08dcdcd98f45 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: aM8IBfWz6csDbnMf5wP8ef+kRMNfz6M3KOoo+Oy9WwFGSCn4exQBqjcOomCURnP5Q0eWmXAuC9ldPfCoLhJRJ6m/AHS3ngR8qVp6VXzFlF8CZYKtBME2Z+KFNLIbiz9yDFoAKqpOcesrVMDUl9vyyvhQTLZT1TxJV0QTMhqdKBUoeLyST+yCEqj18XNDPsvGazU05G09ZtYbXJaqD4QpK/OdtgVOj5yMADACPqSA6k1s2ImzzYjCn5fgZYjPNWa7dm5rTwZl8JhSXNilsa1WKP7G2sbve2XhX3YiZ9OCCfFSSd0fQJGToXvlID9HQHCMFKcXp6J21R636xaRhtiXxaLmOR18PHpb5FhKIjNDKEqkm9NZLMf4gfXzFqtJmHgIh94Ys2FoMcSDjLboEazaqeBxwuHssQVpV/tGmOJUAyylVelJl5w9nJoWtVQqA2wau07pGDXurBUxfqlcwv/G8YCJIz3H9PHp/6xIK4cJ04CIo4ZecWburt9QhpgY5PctMlkMoF3qAmmorLGfXcVFps0OX5oVahLiCQaKWOapnbysSDTnqIqiAWQ0IKyYHs67BH6RjIv+9Iebgoj/zW7SVom9cQkZ0+W2nMoFDPL0dC0PRS3qzotdMtUeJuG/RGn2Xw/PY9pIRfHJ4YHyVB6a0fEwYJsOsRfa16oByUN0wikkS/mj+WCMje6DW7yNOut1Hrv0xKpvMnEjK17I+nANVL7KEpPqIQ+0rXZ6Sg6WBYnBjNSzgH9+9SvqDC7hFzdtdaFz/8UDs6xyZ/2LJuIB14JIlA6pMT1T6zu8ZAMCeFTqm/56+etkofi62pWRjcrgqsfI+xBwIv6oiqnplS1tVzoAAuzb+7ep1ddXWZeRkz5JLCOZ0y/ryNxACWlu7DUZ7dqZW6M3vErCBTJI12yZq9VP4DX59roS/E2APqyy5LtItdv4CmWeeeMKShR+Vqk5hdN9ACmHS15s3Kkb6eyyPjOCYGRPCiBlkBFFQcuJlxsWro5KtZzgCwttAdZLlWVdcFNk6yOQrNHKH9nHOLV49F3cf7h1kZvGCve+XB/+F0IDRFD8QK4vsY29KrqhTBnHzmFdSd6CSgasBxpyBCf5dLtZqqszqmnGg1TEf17FILkZTk5lYKsbu0GBIAfGS/wiXJiHM3ylNLsj5AwVbTN7uIoWjhBeVhbh/ZTrV3tnPWhHijsulQcySZdz8lNj8cnoqdBh6ZLRLSa6G3ff8+jpZ9tY2GkCctldl96dBogKTOVy2N/ko/RUJzGzaCS0F65edUOy2WlQztf3ykt4/2UF+y7DWScKUD1grgNl3mefGiAZDaRqK8BZpamOnAqlVGT2rfzoo73DfJImaErIu+hPjQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: a6bqZLz7+lNKimmKSMUIhsyEGJFGUHXlcE5NSyPhFyY37UBfJp8OtTYINQNtuQWeb1Lh+CMQThVCMCKMVyqmAeeebvmqmQMkygo+tzOY7G5NcSuMLF1cVtX+8bficQVyGSoEWgoLoIY7DSX1aCTOgtidGIHtxLTM2BIlK0s1yr7X2wQVZ+X1dyMsn9rxDVpxtL9APIQAs1qWu3nMhxDKrFoiAXAS+WZiP7DjzfR1XumsTN4QZlYdHY2KxUZ1A2sfGtTkum4UoqBoBMPxNkHuQKxUYBg6OQbk8XtZBtTbiMej7blHNgO4PB5pfdUZUxyu99mDf8Fa+6gKCV1UJviWBsAqTatcgrweaTp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MmzwtvqigAEfxem64LaczgZNDwkGNeA3qYuCe7yzS4BRyilddy5HvL1DIAys41XwnGTKuBJpw9VsKloE3b4LRcF1Rh/HcO5EnIoT7j+Fx3iEygHEvBhoz+Yp3v+gF33B5jdn2akcnc1V5YMbt1cKTajMkzEzbC1RNbdwk9pvxvpzVrjJ7f45GC5zRfAvw== X-MS-Exchange-CrossTenant-Network-Message-Id: 271b10ab-ab70-46f5-1744-08dcdcd98f45 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:35.1515 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x0ax/DwvO4QHgvoj2kB5dIckc6+1lpfCsJF5HhA66XheGgLWE26DQnxxBPiTfufJEatEiOy3mKtTeP63Iz29Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move dsm register/unregister calls from the drivers to under intel_display_driver register/unregister. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/i915/display/intel_display_driver.c | 4 ++++ drivers/gpu/drm/i915/i915_driver.c | 5 ----- drivers/gpu/drm/xe/display/xe_display.c | 3 --- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 85a51b9d49f8..f3a586913c6f 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -565,6 +565,8 @@ void intel_display_driver_register(struct drm_i915_private *i915) DISPLAY_RUNTIME_INFO(i915), &p); intel_power_domains_enable(i915); + + intel_register_dsm_handler(); } void intel_display_driver_cleanup(struct drm_i915_private *i915) @@ -647,6 +649,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + intel_unregister_dsm_handler(); + intel_power_domains_disable(i915); drm_client_dev_unregister(&i915->drm); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 65f885e03880..7fce210d355d 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -45,7 +45,6 @@ #include #include "display/i9xx_display_sr.h" -#include "display/intel_acpi.h" #include "display/intel_bw.h" #include "display/intel_cdclk.h" #include "display/intel_crtc.h" @@ -629,8 +628,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) intel_runtime_pm_enable(&dev_priv->runtime_pm); - intel_register_dsm_handler(); - if (i915_switcheroo_register(dev_priv)) drm_err(&dev_priv->drm, "Failed to register vga switcheroo!\n"); } @@ -646,8 +643,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv) i915_switcheroo_unregister(dev_priv); - intel_unregister_dsm_handler(); - intel_runtime_pm_disable(&dev_priv->runtime_pm); intel_display_driver_unregister(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 44850b6cd382..6bfad26a3c06 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -14,7 +14,6 @@ #include #include "soc/intel_dram.h" -#include "intel_acpi.h" #include "intel_audio.h" #include "intel_bw.h" #include "intel_display.h" @@ -217,7 +216,6 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_register_dsm_handler(); } void xe_display_unregister(struct xe_device *xe) @@ -225,7 +223,6 @@ void xe_display_unregister(struct xe_device *xe) if (!xe->info.probe_display) return; - intel_unregister_dsm_handler(); intel_display_driver_unregister(xe); } From patchwork Tue Sep 24 20:35:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811177 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 612C3CF9C74 for ; Tue, 24 Sep 2024 20:43:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F1F8410E749; Tue, 24 Sep 2024 20:43:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mlWEfeW0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2D7710E75C; Tue, 24 Sep 2024 20:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210622; x=1758746622; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=AhF5+BBcsKnbYaWVWbev/XNTjUmUeBqf+KJoPYDDN2U=; b=mlWEfeW0Pq9YqpdryBNMRXkmBScjVKuvURnQTJp9fdV/xm44UHy2Vk9+ A/N71jhys8WqptPjxb870J94+QDtCBKQGwGz5SDOpMNfTScwnz7zA8Wjy 8HuAwtHJm/mdttxljRPBuC/uumjOEqQW5Af9BEVvZMC8vny+1gVUj8o69 td2//YTwBb8cDuQ5q26rhUN5Cs6jUEDkikwbkf8FtjmT7Tha3HcJfepm4 kE9F1kSV1crj7kF7upzHPaldcilp1taJopdB09lDF7Co4gptcfSoLOatH RxytYO6Ezr6SRwxfAjkCTqOQV3TAWuC4+X5Yb3czjbgozDxPR0A+gBPkl g==; X-CSE-ConnectionGUID: 75JkyQ3NTyagIQaoj+xfUQ== X-CSE-MsgGUID: fO3KFzUdRkawH5zEg80Rfg== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751570" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751570" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:42 -0700 X-CSE-ConnectionGUID: IVSJYfIETGuieGNqou4trA== X-CSE-MsgGUID: anONtLSjSVqjjy14mreYxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298855" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:42 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:42 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:42 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OsqWAqW2M0YO4HA5PKpMTKTMyxdL6Myb+gV21YRYvwfVxAXLMOieEY56oTnRZi6+LSTsWhqHPpuk3msQXn7DsMyASUAAJNZx7pwhmVk7Ntn8dn29YEaVG+FcWuc9qAh5PzlsExsxJ7UwGxybIStsJwPwEjedoyh1V07SW2yAuMRFzwGYP399KI2g+nOJhhT3zsCNBn36lUbQJVLvJahd7eGfHQ5oIFO4voPr12xH9+ELBwV3CVM4Rnq3QkSQdpU/PriyQ2wHYsbTBiqxCQglva4fbonRvgH504UdUAs/GYVe+ChxF0cQBuDSB1PD3/gJQHy+NKq3NOJ98HMcGtiwiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=smCGk6+tdoXeK/oR0zEqixIHDV7lT7FTEnLdWZRnrZ8=; b=sJaWlyLH9pCA1B1/TrlSN+9dA+5kR+1JJhYMx+m+V4KXmmgrCn/Gwe7W6VY438ej5+IOQJMJBVLvagplWW6o3w3RNNQlePMs76rfL78Z3I91y6pHu947pFsKE5G+oKS6f3unlz2bWf8iI/qhAQRa+lse6qNL8ds//7E3hr0sjTThTJkndl8hQdmxGJFktEyQpT55byrvGTSoEO4wvI72Zo1S6MBYVuNN/J/pa9N/QJROFixOq33DYMAG7NKJsFyB6E8769lBIUiuiXg1QnYsuor/tkFNg/0BfDkgDQ4yxYD1FYOGABSBZMD6jeLzwJn/ga69+0plfIyjrTibf9logA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:38 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:38 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 22/31] drm/i915/display: Move runtime pm related calls under intel_display_driver Date: Tue, 24 Sep 2024 16:35:43 -0400 Message-ID: <20240924204222.246862-23-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0275.namprd04.prod.outlook.com (2603:10b6:303:89::10) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c1d9c1a-0eb2-46c8-f234-08dcdcd990fb X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: xiKesUzGfNNTDiUrrt0KxXfW3/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dIsZPFjJ316k3pF3Hemijzh7EfQMsBJnHc9fOtkzzCk7/lNiCLircZ2AFzyctCUyjK6chZjVw6oRDg/ZDAX/mIbTd5Nuylo/nBRnDbyRh/+fu4Y2PjU1Y+JGevJY/FsOr5Pvpk80Te6HdWDBTOb6MW/m8cZpGXTYMVujWb/BpdpIugxGgwAsVRoj++8xIZyIQOOgeBdwnZUBbjnQ0UqqmGjFAQq6AI6P1O2l4N9cpmLNZfK0CxMo2zpgtXHw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NTRHibDZw3kbaP+d0pR4KjTn8ohaOGIIEKmF+IMt8iGeSQbHUZssAL1IOvhLiwpScMRbHOuoPU4/YqZrRz/SQLHl1MEhxLbnwjYtejgPhsmUFoK91f1d+iNw4PhTvXjcodnjkOVMz5kkyZi0UOboPzJEDN6VzkDts1Icw6YBzWYxLcCcGnxfGvV/GTJG1c2XQqlTdrhIs0E/vI4Fn6FOfC/0j5FZFnB41TXfzQMAy2UvTY0D1rNykDQG+CbwIzH93ydj5r7NLOIh9W92X1H07jT/2F6d3uveK3bqsioejOfI3Sxe8cFaDi70vzXkJlzHLUOfWenEOo6ZH0mqoLAGHs8ZHP4seGp7i2/q1Bxi6PDEcVhHpo8OLNR15lyNBbnM1zzwg7MWN1bQdpXXiO5r+dgb/k0KVH3VdrbhAZY9ReUudwtqJmL+Nrm3x0xtDCiAsxtD3Jk8TuVOViBjkcv3TqYWocMFe1JtmWgm+Lf5ihU/ecpIPBF9IupDLE6kT+txoQiQ9l0zhvWBD2CWc68U7Hr4r1u33cq0E34YMj4ZOuBZqcV6wqnreFBSxhl1MRfK0yWoPOGSRnsyGZa6k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-f234-08dcdcd990fb X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:38.1830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R1DNAxk7+ffTM8bhQ/05VZBUqq3A+n4LavlVspORL+0Zrj5N89WoNf6bisySQod6wgjkxWD8q5G3OH1wQjbboQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Continue moving more display stuff from i915_driver to intel_display. With the end goal of reconciling xe and i915 sequences. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 58 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 4 ++ drivers/gpu/drm/i915/i915_driver.c | 46 ++------------- 3 files changed, 66 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index f3a586913c6f..62a7aa56f0da 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -856,6 +856,64 @@ void intel_display_driver_resume(struct drm_i915_private *i915) intel_power_domains_enable(i915); } +void intel_display_driver_runtime_suspend(struct drm_i915_private *i915) +{ + intel_display_power_suspend(i915); +} + +void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915) +{ + struct intel_display *display = &i915->display; + + /* + * FIXME: We really should find a document that references the arguments + * used below! + */ + if (IS_BROADWELL(i915)) { + /* + * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop + * being detected, and the call we do at intel_runtime_resume() + * won't be able to restore them. Since PCI_D3hot matches the + * actual specification and appears to be working, use it. + */ + intel_opregion_notify_adapter(display, PCI_D3hot); + } else { + /* + * current versions of firmware which depend on this opregion + * notification have repurposed the D1 definition to mean + * "runtime suspended" vs. what you would normally expect (D3) + * to distinguish it from notifications that might be sent via + * the suspend path. + */ + intel_opregion_notify_adapter(display, PCI_D1); + } + + if (!IS_VALLEYVIEW(i915) && !IS_CHERRYVIEW(i915)) + intel_hpd_poll_enable(i915); +} + +void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915) +{ + intel_opregion_notify_adapter(&i915->display, PCI_D0); + + intel_display_power_resume(i915); +} + +void intel_display_driver_runtime_resume(struct drm_i915_private *i915) +{ + /* + * On VLV/CHV display interrupts are part of the display + * power well, so hpd is reinitialized from there. For + * everyone else do it here. + */ + if (!IS_VALLEYVIEW(i915) && !IS_CHERRYVIEW(i915)) { + intel_hpd_init(i915); + intel_hpd_poll_disable(i915); + } + + skl_watermark_ipc_update(i915); +} + void intel_display_driver_shutdown(struct drm_i915_private *i915) { intel_power_domains_disable(i915); diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index e287574fcd35..b1441a55d72d 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -33,6 +33,10 @@ void intel_display_driver_resume(struct drm_i915_private *i915); void intel_display_driver_resume_noirq(struct drm_i915_private *i915); void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915); void intel_display_driver_resume_nogem(struct intel_display *display); +void intel_display_driver_runtime_suspend(struct drm_i915_private *i915); +void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915); +void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915); +void intel_display_driver_runtime_resume(struct drm_i915_private *i915); void intel_display_driver_shutdown(struct drm_i915_private *i915); void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 7fce210d355d..b3eaa55ebacb 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1373,7 +1373,6 @@ static int i915_pm_restore(struct device *kdev) static int intel_runtime_suspend(struct device *kdev) { struct drm_i915_private *dev_priv = kdev_to_i915(kdev); - struct intel_display *display = &dev_priv->display; struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); struct pci_dev *root_pdev; @@ -1403,7 +1402,7 @@ static int intel_runtime_suspend(struct device *kdev) for_each_gt(gt, dev_priv, i) intel_uncore_suspend(gt->uncore); - intel_display_power_suspend(dev_priv); + intel_display_driver_runtime_suspend(dev_priv); ret = vlv_suspend_complete(dev_priv); if (ret) { @@ -1437,34 +1436,10 @@ static int intel_runtime_suspend(struct device *kdev) if (root_pdev) pci_d3cold_disable(root_pdev); - /* - * FIXME: We really should find a document that references the arguments - * used below! - */ - if (IS_BROADWELL(dev_priv)) { - /* - * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop - * being detected, and the call we do at intel_runtime_resume() - * won't be able to restore them. Since PCI_D3hot matches the - * actual specification and appears to be working, use it. - */ - intel_opregion_notify_adapter(display, PCI_D3hot); - } else { - /* - * current versions of firmware which depend on this opregion - * notification have repurposed the D1 definition to mean - * "runtime suspended" vs. what you would normally expect (D3) - * to distinguish it from notifications that might be sent via - * the suspend path. - */ - intel_opregion_notify_adapter(display, PCI_D1); - } + intel_display_driver_runtime_suspend_late(dev_priv); assert_forcewakes_inactive(&dev_priv->uncore); - if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) - intel_hpd_poll_enable(dev_priv); - drm_dbg(&dev_priv->drm, "Device suspended\n"); return 0; } @@ -1472,7 +1447,6 @@ static int intel_runtime_suspend(struct device *kdev) static int intel_runtime_resume(struct device *kdev) { struct drm_i915_private *dev_priv = kdev_to_i915(kdev); - struct intel_display *display = &dev_priv->display; struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); struct pci_dev *root_pdev; @@ -1487,8 +1461,6 @@ static int intel_runtime_resume(struct device *kdev) drm_WARN_ON_ONCE(&dev_priv->drm, atomic_read(&rpm->wakeref_count)); disable_rpm_wakeref_asserts(rpm); - intel_opregion_notify_adapter(display, PCI_D0); - root_pdev = pcie_find_root_port(pdev); if (root_pdev) pci_d3cold_enable(root_pdev); @@ -1497,7 +1469,7 @@ static int intel_runtime_resume(struct device *kdev) drm_dbg(&dev_priv->drm, "Unclaimed access during suspend, bios?\n"); - intel_display_power_resume(dev_priv); + intel_display_driver_runtime_resume_early(dev_priv); ret = vlv_resume_prepare(dev_priv, true); @@ -1515,17 +1487,7 @@ static int intel_runtime_resume(struct device *kdev) intel_pxp_runtime_resume(dev_priv->pxp); - /* - * On VLV/CHV display interrupts are part of the display - * power well, so hpd is reinitialized from there. For - * everyone else do it here. - */ - if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) { - intel_hpd_init(dev_priv); - intel_hpd_poll_disable(dev_priv); - } - - skl_watermark_ipc_update(dev_priv); + intel_display_driver_runtime_resume_early(dev_priv); enable_rpm_wakeref_asserts(rpm); From patchwork Tue Sep 24 20:35:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811180 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 13394CF9C69 for ; Tue, 24 Sep 2024 20:43:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA68B10E751; Tue, 24 Sep 2024 20:43:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ASu/SpDC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id A831E10E75B; Tue, 24 Sep 2024 20:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210625; x=1758746625; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=PtHFhyPW+zIzLVcQj7w+URJv3iWOJf0anJ01i/A4j1o=; b=ASu/SpDC307bgEVU4FnJcET8M/YkJRhD9FAd8AoHLPjIq4twQ5cbV+Hw vRvzvxn8uNHcJhxlnD6iyhuWNGCspz6Gd9y4GRxn1sM4kz4bsyP7yj+vY J5Ue51RLXLvpPFvgDXgB+gkhaw816qOD8aoXr1K7Ewg+LqSXW0+u16o4i k4rFV0p5o248gR1nzy9Trvvfl+0AUN9IwUHlc3oCm70mGbqZ2rpSxqYGt eNO9zSVS8bKTBZ6zje0cC5PKKKwNcjEEy507xPjs0dON3mst6oLDYxLtE h6nOu8N03LbopWJdoyqsqBuAgIX9F0ALdeId5TjrcmnR+OLH3GkVWEhVw w==; X-CSE-ConnectionGUID: O1LCJWoqQyuKLrVWPKdWbw== X-CSE-MsgGUID: c2kt1WzQRaiuEqXPSoJo9g== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751572" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751572" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:45 -0700 X-CSE-ConnectionGUID: 1YJSOrh+Q0ucKNp7VBtGbg== X-CSE-MsgGUID: ZJBbrn41RfaQkCifCfjjDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298862" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:45 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:44 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:44 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:44 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.45) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cnYEvs1Ilcnnrogf9EqNgVhtD6LcN4YdH5Gdyh5TdX9sBHShMIR16EnV8HLrxnW+kfuINJ33UAUcMvE9ce1UDRIdN2Xg+R6hHYJ1uWlWAbaya252Zoqc30JnNigHKgsyTAZremOfNDxhJFabzxGneWlgWGkjRae5MFG0+rlNdGbM74O3vWl+lFkPVAwD66bwm0OJPOSNNBiGOUaJDkQ1LhiJfxDd0Zvi7No9kYgoezt1Eh6KGVYSfLR3kiyiulqWwFbxOVE6ia9xAyjM62kiRdzV8SUnWjxBQFwKa6e2LbSC9OY2tIFf6Gae93kxyJuKJ9BP4J4lwP5NiTvKuvOlBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6USX93cQAz+Kl+0qJVnMMwLzsbQMETntkaHrlJm1I3Y=; b=V+7OprrSTFcPTaEIZaAgW9mcotyn/VyhdQL4Ftq2CJrgFHU1ydAaw/hNMV0pcXlK5Xslpnx2GkUD3KDKoOXrI9jiyg0g+VNb+8bU3Y439Rnx9E0PzJwzOJ7P0faj3F6wWIYMKd3NvKqzKYs4EttE2mmp0gnfp8zn/n9yEDJuwf8+PF013G77gewXLjRXMxWQTfkRXfwd7BYMpThiwIoose/AvvjosBCSLVD9/xAz/A0J9KbK9j42tyNzal8HbJkkoGDxz7YjRrzU6veYIeXCho25zJguWk4XaVfd3Vt/UuVolJO/XPH3Wvu1kzDsnkYFW122VR5cdzFaIBik8Rlz0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:41 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:41 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 23/31] drm/xe/display: Prepare runtime pm functions Date: Tue, 24 Sep 2024 16:35:44 -0400 Message-ID: <20240924204222.246862-24-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0360.namprd04.prod.outlook.com (2603:10b6:303:8a::35) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 045bd30d-f1f5-41d6-402e-08dcdcd99311 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: dK7HMkRMmX/2JzcAmtHmxf0hynoM6GOvTRxhYz8TZioNEJkc8OMzTUewA66NxdY2paCqp/VhyCUsbDiQdPs7Ic9Io+UV8lzmremD681kVdJBMjIhYN/srA+SxKhT1Io2vo2gL/L/E2XEpCbrgI+1ftk03lK4x6I/gtt8AeMstzH+Ff8bmIplS/36oT8a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KhITD28NKg7B0u8Q57lxnA780G+x+5TjqhdJGGk8MOUqHb4aBA7YvJqJsF2H3k0nBUrwtx1wKaHTLOJ+YpPh/qDQWiiaToEN+y0qprTEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Sxk7lI1cC5yK8hk84+q+X7nFnMRe+Serez7TjUf9T8EjeAi0OFEsEx+3kjE+e+J7uLJJ+6UsOYXvWu3+CxBPcJ6r2uM3AWkFIb0xh5vB5W+li4+NEu1U5SeSuDh/jGmymqtpoMQu5C8T+3O0ZzK8sFGlWRQSCY7D8L7I6DJGb39KAWlfDeOkRGgzKspnL6bKe20ZBylT5e5ub8dDstSgJzgTQHyUpe8ZO5hp8YAMY5nY12cBSTe5k883h8SgzqDEdpvWe2kotMWctjTeJhIB7isdWufrkIhaitoOnhp0fN4224zJ+iCccClQH5ST8fXcD9KpwVffhd3A95GXiDAybNM3sGZEfOd2cJzq06ffe5OWh83V/TgQSa+EfprihxZl5Q0xzPF4+kooB3qhCPJ8aYB+gW/KxGIaycXDQSpNEYLlj0wTntmbkASqi5Mo/A3fdzcFnoymlLkO4+kfP9zs2pqhFexZ+VO/J38tLBVJnI1Rf+zuQ0PeOW0Ji1X8DYTSGg6jDEzA7BQiflXBA83fyXc7vV3+1ZmHG67ZoaPcedb7uLUlE1Q9EVp0rcbZntcKeyphXA2I6XrPosDfapo4ZdJQ5NiUWXEEqI/ATleuNZHcgTlZ7R37NMeCRHjwR/lIHoQI/rKvdKs7inYU39uF4tLF68qBtqAV1Ixl4rWiciFG7DjnGcknEP66Es0JUOhDjz8Rrd9uLhyKaXO+L9PqP3ms6XHIv2yxB1/fTALfFCzgFuXPKU0n/z3ZK7uOy/52OhllMQLlaQsgb5QxlgKq/P5srLnKJwwyQUzSL0n3iVhfOaKXmVeiszPT1CPcsq3JMoUu3VPcvDPQY1o2BurN9fV50VHNFWoHmqe3VBC9WUcSO64PBy3xNzR84O/wEZ8HUQBEg+D6QYS+R+2hEO6UyT6l3C1iF/6/xTH5Yg9FnXmlVaL1Tp+YBVi+GHZQWsITMGRvMc0MtIj/E6QX2NcyQD6xbAW8/IS4Y8lZ7i411fP/uJ+Ce5lh+6JjqmeO494y24o7Yl1540N0drrv4GoEXcXa0x6xvx8PvIPIh3TPHkARNq36uTxQ9pnG/cEHZMtkDoagiIuRyVp6L0UgGhpRYFPEwsB7bZc1WMcLgOcVYoK0tGS1ow2gIWYEPhc6vAyhaIuvG+pD6KSAWVju52nl2xuxWnv7T5N1cClXKr+C8ehWhbJYwEXVL6Itcbds5BeUv8eZJYVVqtx9AviTkj25RMmKsBJio2wSw3waxRUbm+ii74ravWz+F8ghtoKlEOpAkBin3gwn2nsveNs4HctDHJ7XGBSvAw11Bb3cXd7ITc7Kw+Jf1ogLNt0Nl6F2gtug0WG5b6nbbZ7vOw/y5XqFzhiL+rHByQPFvCQHcgEc0fNVWKjLY2k/rK1nEtfMnp5J3lNj3KuJeprKfP15iIn73TUmeVrLiAoAZUUZiZ1FbpvvwTPg/4hBCTO1WRQej1kVIfGolGl68s6tm5mBLMPmAzocoQV4o6s6DCiozZerbWJLhCrlU2gxElRZZXHBi9hrsG6+UrQQudP82l2PQ5Pos61eJwY89m7n2sU0O5J/WHCEg30x81uuis2bvtoACQiC/JwhLgyK6GRS7BEe7Sn6QQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 045bd30d-f1f5-41d6-402e-08dcdcd99311 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:41.5365 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AU7x61zB+e+YP50T6aewVKsFN9wpOhbUod4tyVfxr2WOeaGIlKyTriPtgwsa5yh+Iww1GUGOqwrdrGT6K/5ZuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" No functional change. Just organize the runtime_pm related functions to allow a later sync with the i915. Move runtime_suspend down near the runtime_resume. Create runtime_suspend_late and runtime_suspend_early stages for a better visualization of the missed i915 sequences. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 41 +++++++++++++++++-------- drivers/gpu/drm/xe/display/xe_display.h | 2 ++ drivers/gpu/drm/xe/xe_pm.c | 7 +++-- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 6bfad26a3c06..1ab4dd51094f 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -388,17 +388,6 @@ void xe_display_pm_shutdown_noaccel(struct xe_device *xe) intel_display_driver_shutdown_nogem(xe); } -void xe_display_pm_runtime_suspend(struct xe_device *xe) -{ - if (!xe->info.probe_display) - return; - - if (xe->d3cold.allowed) - xe_display_to_d3cold(xe); - - intel_hpd_poll_enable(xe); -} - void xe_display_pm_suspend_late(struct xe_device *xe) { bool s2idle = suspend_to_idle(); @@ -443,6 +432,35 @@ void xe_display_pm_resume_noaccel(struct xe_device *xe) intel_display_driver_resume_nogem(&xe->display); } +void xe_display_pm_runtime_suspend(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; + + if (xe->d3cold.allowed) + xe_display_to_d3cold(xe); + + intel_hpd_poll_enable(xe); +} + +void xe_display_pm_runtime_suspend_late(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; + + if (xe->d3cold.allowed) + intel_display_power_suspend_late(xe, false); +} + +void xe_display_pm_runtime_resume_early(struct xe_device *xe) +{ + if (!xe->info.probe_display) + return; + + if (xe->d3cold.allowed) + intel_display_power_resume_early(xe); +} + void xe_display_pm_runtime_resume(struct xe_device *xe) { if (!xe->info.probe_display) @@ -454,7 +472,6 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) xe_display_from_d3cold(xe); } - static void display_device_remove(struct drm_device *dev, void *arg) { struct xe_device *xe = arg; diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h index 256bd2d23964..64ff2d2f5270 100644 --- a/drivers/gpu/drm/xe/display/xe_display.h +++ b/drivers/gpu/drm/xe/display/xe_display.h @@ -46,6 +46,8 @@ void xe_display_pm_resume(struct xe_device *xe); void xe_display_pm_resume_noirq(struct xe_device *xe); void xe_display_pm_resume_noaccel(struct xe_device *xe); void xe_display_pm_runtime_suspend(struct xe_device *xe); +void xe_display_pm_runtime_suspend_late(struct xe_device *xe); +void xe_display_pm_runtime_resume_early(struct xe_device *xe); void xe_display_pm_runtime_resume(struct xe_device *xe); #else diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index 77eb45a641e8..4cacf4b33d83 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -418,8 +418,7 @@ int xe_pm_runtime_suspend(struct xe_device *xe) xe_irq_suspend(xe); - if (xe->d3cold.allowed) - xe_display_pm_suspend_late(xe); + xe_display_pm_runtime_suspend_late(xe); out: if (err) xe_display_pm_runtime_resume(xe); @@ -450,9 +449,11 @@ int xe_pm_runtime_resume(struct xe_device *xe) err = xe_pcode_ready(xe, true); if (err) goto out; + } - xe_display_pm_resume_early(xe); + xe_display_pm_runtime_resume_early(xe); + if (xe->d3cold.allowed) { /* * This only restores pinned memory which is the memory * required for the GT(s) to resume. From patchwork Tue Sep 24 20:35:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811179 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 6C794CF9C69 for ; Tue, 24 Sep 2024 20:43:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 173C410E760; Tue, 24 Sep 2024 20:43:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KJKqaIZQ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4716A10E75F; Tue, 24 Sep 2024 20:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210628; x=1758746628; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=1bTXtWG15MpR0fHbG8z56jaP213m4bN+mAzlWrsd3cM=; b=KJKqaIZQYih0pJoc/y/zLzCJ140D5JB16NhNzDzXUl7ZFAIXJoRbTXwp zWfrFfpaKSkp8mvM2NlHNGA1TZLNKxYWncgmKyyFQOkuhx6G3f6EsZ8WJ 6y9XEtFFvlb8HvpR1Cs6D6LHAQSx1JWJsNlJF1d4doyMJXzOXKfZyJFaz 7zaRRi8AzeSK4U57pyRkxD37cJ1udJQmKnVcYVvZOE1YuhZb61VsSherS HFogM8WNQpP/B1LioBIBfSStqaNW15jBAcpdxFWycvEgykfez5XW/f8Ak KxC28Lokwl2fHIRGfc8DX/rLXa/7frK8Z6izn1zQuin2vb0HzRGdF9MuT Q==; X-CSE-ConnectionGUID: eVVSz/BSTTqfnsleGmNuYA== X-CSE-MsgGUID: dncZOb5ITiy49qmO9GM0tw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326187" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326187" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:48 -0700 X-CSE-ConnectionGUID: mkz28BbpSoyiYsLMrZ20kg== X-CSE-MsgGUID: M9tVyyUFRVaTelXlZ5yyRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001695" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:48 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:47 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:47 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:47 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ccrZHzYqkX7HfzudVaHSNrI3h9BQFcTdvkcejxrjjRKwXWfm3mxxLTP3gY4YAZuiJVBk6ZQejGW5PRl2wUUqr3wRtNP+/EyptO1PDeAPetWplpkZbia7mx2eio4iZRHZf2hYcv0DSK+tVdFDyT2JPNIqm0gRH0T7OfMNqVC2i4JogTap/odSKQWWuTnTOpfK6LBnspi3zrhaoE+AgUuUgbdWbfIJe4fLLK88LmXEejdMM37AVjovtR+0Yqpg0fcpsnwqtXqoU+Q0Z2bF76JvFpdvJ6agnbmttk3JE4tMXMlpcGewrhKusiW/2LWikUANsIbv8yFiMNWelti4Q7LPJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ngO28UCwI/G6U4rrsKlWSG/Kcr3dBBgHsDpnQ/yc9cY=; b=K2aNl3p2c4O/1I6ZHhP+lBtYmn9uvX7a4ZZ0FOk5CYboXTG2d0Z/nPxW3SpvXM86+2SXrdJYmjSOpVkgTi/7ks63AhsUtcuu1aMyeGUHQq4CjhIyJ3LtUDR/HJst1qBH0j3/LnrW+Bjnmog8/I/n4ZejhMemm13aiHbQdnJGZfyM0QjqtXKegpIqJxIBeftrzwP0rPS83atJuvrDaI0X7C5v+QCRNoFtIXnJtfhhZIYN5WfIhyi4X6CI3kecsl0aJs/ULE38JXMj/rc86oBdsjJZWhDYg1zqNaQIh07CTtZKbUpPY+/OFUkTAQPECPJ3yYwXKsp/I4/ViC+FQNAAZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:44 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:44 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , "Vinod Govindapillai" Subject: [PATCH 24/31] drm/xe/display: Call intel_hpd_init on every runtime resume Date: Tue, 24 Sep 2024 16:35:45 -0400 Message-ID: <20240924204222.246862-25-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0003.namprd02.prod.outlook.com (2603:10b6:303:16d::30) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 83b9e602-53c4-4294-eb18-08dcdcd994ed X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: ZAQdRwkMpAt9W7BCH6DsBz+mg0yQheWE2ex/v5FaCN8itGUrfDLM5wGN/biLfvR8+jfpehkjeCAroy0g6SZRfrbPlbjpTw9/ApuMkrjJHt8lHEBKRJ/RgRDRWvJqY04c2NH0Et+lO6THqq5XVbsu43RsGtQH3f/XQgoGBJYgGEkegn1HIZv+0pq98VW9LLU0WKITaobksS+xLtHYSAR9ZeQsQBNGWdJjxKWI4K2RrwRuIeEUHUD7iBr8fDiArKyF2bLffLkEsV7LDtLWewFAz3ujcD/gfYIk3mJ6spIMwPgsKyKtk649jmBofZRTbJMCS0SKCGE25oiYjElQ6tS/p/i7fLfekKDCzTBlRn0pA7Jo+E6QZxVFvyWYBoKD6vbxslOrKGyyprqdV9igHidqg5ERW41XGRu/WDiVZIqS6fMnQ4msQZe1PHl1XuWfxRSBxmWqDxUsA6tT+bFmrCXO86odC+wuaX/tYyNrCsCZgdDANQDlSZo69b81o5y62tO5B7bbZsRxuI+tGE8gw7AuxD6GAKqjFwwx9IL5/lGaZ1AAFPzueHz4R2s6DvsSOFiJG94e01gRXbHtGYHek8l7Zz+VIjGRoKSdEYC6woVCcyV7uPxsfjcjhezpE5HB+0Bh3QkouEoImS4Bn9z6hbksdCheN+oqDqiZhZ4kbMM4CNfZ5Wg02+VfDMJbFs3djAZ6zCNWBeFOhwCz3vRiva+xJLCsh12R3lwx+TfX3HVtzXGNE/VuR5UEUoWG31unETtwXMvqpPF1jPfWEAk9G+NXXJHUewocuplRXrD4ke/J1DgkxdZdKCTACbgl+CT2Xhv7iJ3vLIJpqlXkoqF5cIUShgTqAZsVkrPhQhMPpawLZaRG0NTGc4yCp3lMlIGjjPV9H3IK/a7I1gPAD0XOhz5yLl24OMwI/q0ZlDCFCmXj+e4JED+KT1dRXR9dfZ8DNNszxuJv2HeSxcygNlNQ17+YLEUn84NGMoZoZB3mg0YUM2eZWn4uEogfI5LEfTBlFYCF/iTA9mNoGpvPkjz3zOXYbW58AjBJ1qS/zMKJEVXbI6+n5xpu1s/V5aIdbGs82Dws2VeXOqtUvnHzeVtTn5e+iWcqlh8Io5kNbtkOld8n2YQ/H9pZuJ5uojJalOT2Q2+j1Inigf23VjVBITTyjj2qFpPWwgRiI69aPUANRhlq7Uy/FNXd96BUcgXVSXyEl0FbBYEzqmx0zXdObQzW2B2dI4ds85AGvSbEH6rcwRCyBGqzErpUlR7dsgVpKxZTG3LdzVxLDbtYIkomZHRFqEJPlYHRnTsurBlHXSr5wTXCpy8vO2NHsaLnYALzn0kTFIo3wPBXvKJ43yAUlH33+a5Mvg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L1Onn6eOxBBv9PCw8HCRZu07r4d5ZJHZdr8mSrMwDN3xILCdG+6TK9CDMDBWUJ29FqKACkMcnSDsvX/WZ+eRon7DhZIyXrQ8C1E0DoyBjaraX71luesjLF00swWJ/sbCDtJNOxkhuD4EStHlPfnbxvQnGMoU1AtEylhLPclm6w9SCt6kCs1UbICgFpowVvgQFmv5MNFSIivXLDT5HHNuDAweuvsvnezjj4QaCrJjD/nyt2o1VyXj4W5AOu5HbT150Dim5llGHEeBEFQfwq0emSSRkhCvla18qifsBNTGAOR+3S6HC5HPY1f3ExS/LipTa3NKJvqe4EJOrZ1NZp4F2i7oNBlvVWxWD1ONsY917bm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0YGNnxjGBIK7v2PmIQIsIUHEAfluc/Dg4siMrrPCuIkqdP9aJjiJzM9HSuoXTTLZ5exg1WkVwqOV0B19/L2rbfM3hCnUmU5FnZ/fpd5a/HL0ve8YLUcR2TzgrDFB51StjlGn4DiNaZ2rabHDdyui7CBt2dKEqfhdthn8hIw== X-MS-Exchange-CrossTenant-Network-Message-Id: 83b9e602-53c4-4294-eb18-08dcdcd994ed X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:44.6420 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +fUsfPAXlpR9GlYRS//NelDiN/IZITYkynJE2irXOQ1TOUlnsgz+brMASXFRBdK5wa9AVdUjKMmirwlquGoSJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We need to ensure this is called on every kind of runtime resume and not only on d3cold is possible. Aligning with the hpd sequence from i915. Cc: Vinod Govindapillai Signed-off-by: Rodrigo Vivi Reviewed-by: Vinod Govindapillai Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 1ab4dd51094f..4d1dd5294b89 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -330,8 +330,6 @@ static void xe_display_from_d3cold(struct xe_device *xe) intel_display_driver_init_hw(xe); - intel_hpd_init(xe); - intel_opregion_resume(display); intel_power_domains_enable(xe); @@ -470,6 +468,8 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) if (xe->d3cold.allowed) xe_display_from_d3cold(xe); + + intel_hpd_init(xe); } static void display_device_remove(struct drm_device *dev, void *arg) From patchwork Tue Sep 24 20:35:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811182 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 63C1FCF9C72 for ; Tue, 24 Sep 2024 20:43:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07E9810E762; Tue, 24 Sep 2024 20:43:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Hx0s75I2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE18210E1A5; Tue, 24 Sep 2024 20:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210634; x=1758746634; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=19T9khI/c6huW2hETQhTVTkysnKQoSJlLThMK43nIe8=; b=Hx0s75I2Qb944R0rFtphF8c7iX5bahALxJVoHCLa7/ap+qXure+qJg9N DnXQBmRvAfs8y8LP6qIFmsBNnkv0vuuEDAcAa7gH0wnwssLm9zkouIHBE nFxibHinmts+SimFuiL4TpRkEDHj65jWN6vJJCbm9+APvOo3RahPkZ3ke 33Q4cFAx3F44KZnBsugJSb3l5ng1HTQn2dfH8Q2fz8f56LiGdarB1FNoY H1q7tjESKZ+eMr9zEDCZyNGcXl6EWL91VofY+EhUUo7mNhaBcD5kkLB+k rgcoshnOrMtHvjaN64fDcJOGEFQK3qCVnfnMG9FIAEPDgR1odSw5eJg8/ A==; X-CSE-ConnectionGUID: GI72BQ6gSCK6lA7sVLmK5w== X-CSE-MsgGUID: G9R5DYhZTcOql9T+kzHufQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751585" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751585" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:51 -0700 X-CSE-ConnectionGUID: rFKDE+whQGW3yXwW2MnIUA== X-CSE-MsgGUID: 9yn+3gJPTgSW4KbqMTaJtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298909" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:51 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:50 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:50 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:50 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.45) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pdGy3yamQe91wPuDGR4F0nwPJhMCPD0gN7fpepGvb3d1+Mr+D3FAUYaaBhDkI0+oogUV/7FGYIs91H6APhdYBWAQzhdoTPkPgiEC+zzVzPzZV+3KEVIrDrh3uv/W96yqi5uqZpce33f3IjG80Be+tab37JjQoToqKnj98sgQEsxI+WXaLlEuw7H8FtMwolJ9SGw1X9nTKMyZll4t8kfLQUtHSsm/GXqTthMYUio66gtDIBdnRMLZwTYuWikvyIAsMoyd++XCaeByjfq7O5TuQUqFENWwQMfFgujB8T6sjqfOIJXAF1eBFaH5weC61iy5B7kvtJPl+8ESQOZPq65kew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FuzcOcQQU+7fscClvol9tNC9OgfDmQVNyhF4nHWJ9QI=; b=XA0aYA0bOyYRWYXuMO9zZRgpKr0MmDvH4/5zBMfa6qcHGXzluRDMSOIUW2t4v7uyPJXOi+UsJJrle0gmXBHTjf18f2wqzhrxWyHEPVewV2KZZ6ueY1W96kj5WqTUzNUWqRLQBF3jpy3YeYyNH6NAFPyw3c6vRl8XqAeSbQ1Qjhq/VEQ/9re6ArPc3H5vrpfgQmo6WCnxAOJOzzKOPg9eJLlZUOh/W+PigOU5VDLJMBGlVJF4kTGPNdIJ0ECCfYQS52N+Nx5S3aQkQFh2V5dieL2njC1K6+KmKgfQa0nFgFRGyOb6N+tY72ySHUqR3BqXkaS+pP5/qJ457m11vkTwKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:47 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:47 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 25/31] drm/xe/display: Move hpd_poll calls to later runtime stages Date: Tue, 24 Sep 2024 16:35:46 -0400 Message-ID: <20240924204222.246862-26-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR16CA0018.namprd16.prod.outlook.com (2603:10b6:907::31) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: d04f26a4-0437-49dd-68c4-08dcdcd996c9 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: hpCbgS+7kOSGMZ5QZ8G9c+oHb5SlL+ruJ+3KuVlqiHVg1KLl+V1xeF03O7wnzxndQQvNIPo2e0lBrSbEa+KGOotfQjKjBMes2pMFmoMz2Lf1nhEmceF3CD621qRnrgXBX4CygdAE67S9dpM5vd+Psxn3nQKzubIzTnq8ao4WjYz7f1HEvkd3hu/JgyGbtlw3o1HgZnz+OanDU7lKgmLBAZl6LTXKLnbbUrVQfdvDSfgPED5h1g61k8jIVuuGYB9CEMjQ7YzNLJfag0MkbxB4OoZNwPqIV63XoEIQq879vVxY28t/yT3b8RiOI0oEU3SvsLZLcCE1c3gxUePaW6eG0QpBu9iB9uXHZjv4QfPV1mi+Ar29wBUYYsQH5JGgrBgNhHVxb8jxNGar46J5qv0Tg74D0HQUn2R7V7Y1DtH8uM7BqLbBW/JoA7KXlBWKR0mmLNlTcA7V8ygKDJJVF4aTs2xvZ1+si3Rd5/CCNr0d1PaNNuraS2eM32yCO9fqwoC/QhqMtWP6fMXY4PD/eDJmzHvCda2kAcyNDbpJB4JrUE9b+VdCHB8gqxWOmIt9k8IG2NfIHb3tSBer2NjUFqeQkAMeQ8hmx6Lzx9xYJxbbfPtS04RmmZJTAzGbzzNkRBDm+rhHwhsmnzRBtUYoQQHOWj51O92LnLsAmOHm/8yiCy1gGkU1ex017+9CkEBZcFY+TppvisaE9ETOej7gaNSmvx2VBATz+o4QoyV6Fpl0GAndA6iHbpKklCgasBRm4U+2fszYdTvQrVTdRNAetRmJc1lIvqZgjO9KIb/XeCCm+PAOL4SjCagI0MlTSm/Ec7X6OfsXwcOXAVg+8Niy+QOhbNyh4iZi4yalzbSbnQi2IbQENzp2AVYZmvxVmjhMPXcPYOUWfl4FCgX5lmz2NgrQZ3pT5WfdAnI97EnHk9Lr0KdF7u70aNKNeHxEIfF7gGY6WacFo+hJYNKYSSBhgVd4W7NLhFiEe0/wEodvS5p4YI9a9Q1EeFhihOQ+xrIFfNA7AjYF9e9Rn72RgFKV9YzOsTDHHZ/GSPiT8dt6ULImljwMa4pW0EF1qe2I0Je5sWZ6wI1+mi8Id3lHScdQOsC0Eiq9NL8re2hBgGEfKsdlg7TOFWjZYn3fcJHB5LbQFKMcpD6gSnpK8BlEnx0TA+MrVBFZN5ZRB1MRSbvkQ8rnJhLgn77X5Y1jYevN41a739e8KIMpG5iWFN1uypvxxlXV3JpERALZNw/X5vzCRbd1w47w6v5HzyqKh3CIVBStrCXvfjAxt7FCNiLz9uWxu3aawem6lMtZGGMY3Yd5358uOmkB6xPlGdzydHudujWvjxgOKjhcgEUJ93RG/QFam54J/A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bib89YbIRrkvyPIoUD4scui5o/41eTWarpPzy3tz38TjIzNbS9DJnD3rlrQfwuntEcS3FTEy2Vzmi/ibCE8kYc2R+1O5pT+kpiL7+CPSh1MYAXVhoG+hxx+qxlJXqz4NQqNZZeS1KNv1A8OJAAwnB4moQOVyUxIawPKWw5Av8PgpJFR4pfKFFK1EqTF9GkJrT277dWo0jlxhDeAcDCFipJUtplayivSpxuBfXNRqtC6zlQwmlk3E3jA1wYAV3ETWl2i/Rx+OUyS3rbPaOjf6OSVELNd1tyvPreKT8zKAzuAliExZeAa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nrNDQhjA8Ke8HDyuLbzGTxTUl/arDrIGmMsvQW0ns8y8ZHlnGXACDomZ27fDHfmwaYoqQR6MP6guVzth5DmA+lgyrxRq5bAa1lAKuzECbJoNqQ/c02+uCNLSu0hZaOXewfF0d/g6Q5Y6TmDi9WZu2I8wgBVHc0XbgbmYyXLN6STbJkXO2L6Y6lMG2wTFVktXakrJJIlH1NWtKYAaXpi0JiZY5GOHtIZegaR44OVSg== X-MS-Exchange-CrossTenant-Network-Message-Id: d04f26a4-0437-49dd-68c4-08dcdcd996c9 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:47.7274 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XcadKd1m+wrIv+rKlkI2FaiWCH1oPBhgqXTauJyApKXKc3QZkWdXw96PquGaPIwkBPm0LqZeRGaLlgIn9u7mVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Align placement of HDP poll calls with i915. Signed-off-by: Rodrigo Vivi Reviewed-by: Vinod Govindapillai Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 4d1dd5294b89..c758874a9059 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -437,8 +437,6 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) if (xe->d3cold.allowed) xe_display_to_d3cold(xe); - - intel_hpd_poll_enable(xe); } void xe_display_pm_runtime_suspend_late(struct xe_device *xe) @@ -448,6 +446,8 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe) if (xe->d3cold.allowed) intel_display_power_suspend_late(xe, false); + + intel_hpd_poll_enable(xe); } void xe_display_pm_runtime_resume_early(struct xe_device *xe) @@ -464,12 +464,11 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) if (!xe->info.probe_display) return; - intel_hpd_poll_disable(xe); - if (xe->d3cold.allowed) xe_display_from_d3cold(xe); intel_hpd_init(xe); + intel_hpd_poll_disable(xe); } static void display_device_remove(struct drm_device *dev, void *arg) From patchwork Tue Sep 24 20:35:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811181 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 3C3CDCF9C6B for ; Tue, 24 Sep 2024 20:43:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D05F510E75A; Tue, 24 Sep 2024 20:43:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QLGkgbId"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id B3BEA10E751; Tue, 24 Sep 2024 20:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210634; x=1758746634; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=5oKBgg/kLxWTS6byL3uecfP2vGRnHi3FLBbBKlDiC5s=; b=QLGkgbIdEHOpu+vtqf2ARbYi+Q/LE/ECXvsZ/KCHzK08qsB1v9tcrt6F EZV161Q64jJ631gcjswEkG7qreRFxrK7cNRkeblqhirgOtZ0PRhRR2Aj1 FOXVfzGlSsxPGqII7Tmz4wJlBT0uQR6jv7pex6J1HdyTfVhQA0L9PHlzm Tho0Zxalnhzx0mKGsrs/7WwVOcWQJDC/QiQ2ArcpveBJhhXNGpVhK2wc+ qUhRaSVI2JJ1vb2C8skH/05poXO/Qhg4QSiVtNqHDMPp2+4uz6TR/ekuB qWRFLYq/VoMeNXKhtkpmniSK7PAoc2AlZGZ8PRrC/iYlKfO/DQWeP8v5C A==; X-CSE-ConnectionGUID: z+EilD87Td6Kg42+Jue6vQ== X-CSE-MsgGUID: IqcQLpIfSUGw7p2ylLZRMQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326195" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326195" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:43:54 -0700 X-CSE-ConnectionGUID: pbviSRStTfaFIf29RY3Dhg== X-CSE-MsgGUID: +Bqm66iVQJKekV3Fi1I6/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001720" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:54 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:53 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:52 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:52 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ix90QsiIVBgbEpR8qgClx3zdaqsWK3sMwdU3oKmDLL5UMiG8nQcH49ybUSQMrkwg4HX9HfKVpi/pkSUnoHEhlB5wEwyxUzahyxuFRuWd2YNX8YiNK5aaCrnbqVhR65Uxe9McFNhVnDQjhzEBfKFNL65oriI87KPWgTmKp2HDse1aMVWfCV6IsUT8b9noUy69446oYoFC2o1MR2ghmYDxwHo8QD1FETQiw/O7lf6Sj/8s2pbiHvvK043LpmOSIsx7erROFq97yFFegI0Iov2tV3YqI+p8txD/3ZUKBKc5cFOfO/EQ+RUOcdkKeQtaKLsc53azfDO/7rmpBZPWJVbiYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ld/Y/M5RwnMguRCM0c+/hn/jhWo0KFTbN2Ej1MiDISY=; b=h8XxAGZuoyLWnqn7S1IR3E4r0nhKVA2MNYi/U7nAaXu7nAQZYDNadNEMajc1R0y8rLMWgQUWXtCxjqFpXK3S9wuTSNsie7SbxBjYGOp18VmPRVqDtghj81hgZehautdoLcKhywAIOJy+izEqUeaSMc5H0sLylwfJmhvtiWImGrfMoH2dJDnr5gE0L8wIJMI+RGUu7vxZRQf0zXmryiFPw3EeLMH8gyZzLPyKN6ArUA9QZehkoH71FTfF5DmpE27OFBosiyjSeyjdBf5IvpROeXv0CAztexISWPwjoP7DlDAx0k8U9FD4ceCzJSDhJ9VEDY6nEEOolTdYdaTQr2q3aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:50 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:50 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 26/31] drm/xe/display: Add missing watermark ipc update at runtime resume Date: Tue, 24 Sep 2024 16:35:47 -0400 Message-ID: <20240924204222.246862-27-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0115.namprd03.prod.outlook.com (2603:10b6:303:b7::30) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: 4bdd43b8-73a2-4308-df6d-08dcdcd99867 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: SMMu3jIWWoDw5JjXLUKZ+H0olbyeNUJSzkurQSEb4oaYOVSwY7g678z4dgmicWpZDQr3Q/2vlL2hoGgB58LR8g7tZ6bAgaaEDnZuUqttzYTUGZYNAYf8lybt09d3J9yzZ+zCpsmwdOmdvxsyNr5sCyPNc3dNfo87/vDZUKrCVwJtLGTu0zjK4otKu4PTgCblH2otBj3RIT3nPzwkJ3agoFyqtMZQOGiyCd7r3xV780sVr+x4Ox7gKXKHWF+IeeNg4YAvg29t+jLGh9UsQdLd/323i7wajDXOAAXy5gchf05tLHX1LNqh5VNbm7MzwEHxrMO1kZ59fS38zs1mwsj2SpbUDtERW4pfIx3EYdnRWYaQc7Z1Z2JWiP3BpEuGEbJ0XSbGC6mmumeKNgjOul9nzgDuWaAGNNmvmcjdjKrl28GRiUIOUt42051wwqGgHLNpQWu3UYzoCn6+qitW3+Vrv2r5M65MoJfp3gkENMZrjzasHahksFhjhxh2mvpIlfMuZzMj+WoZiTHt4tExxP5Tlss9vp0cKiy3ozXdH2fDI2FcHdjIIGOghbJmfLhv1S5CxgBjavc8FsbPoJSDuCp93VjY3bhaqzDUeDfZrA9swco4tTWgn45pPzswRXiJvaQFe5w+mYsFDwIzbWFHuTGdzhUzxhCGIc0VXGDimnu9yMnQwsMLxU141i4ISvPbwvxh/vP7cNJNa+YiwZe8iLM5N6BifOpD6eeD6ds2GB8WlkPa620FbaKFSkAhz/QxfgN3VNi4wEcnECBpdftXo1w50AwXA7lPHnjDiAHUoVUD9jcdnsdR7dRhUmHRrnd3MozJWwBaxZ3JS28yt4seqN8fMmZxj14UIggraeQzHEYunVRnmBmQ2ygJTL0iBTnISuU2Da22C3DWfhc7L5pWeePBCzSWlkliwKWROaG05osUR2T1r3ykskAlApvMSfOxM4tIX74Vrh7FBJ4KKnmfl43yTqgq4BnfRvYQjiUJNOu5fzXllkJs3K5kd3BjwEeWduirEGogC/t3Gwkq6Gm/jmLLRXutjUjnbKlm8Uv+5EGOO1l94cH407DWE1aHBQqVv+IgIF/sXECoP8MMksH3JeX/Aq5KYJ6rbPLuDwXNDxybHDKHvJsJ2AD8LV5W+IfjHanVvtO173GCmgevAzAfVc5jZeug/RDpM80wWb8pZbbfoBVgi0L7OwjZIgq8HolA3VO9Tqt5bqQ+HydvUAhetKAIZZm7MID9ncajw1Q7k7217DnD71DFk2GU8T3NfmUvMn+l/hX3Af9wSg1E72Wu/uVPQA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /IRUHpzk3pqKQ+p/Oug+wlxDTvxwlnpt4xI6BH4ukVQXtiNWVgBnIxpbOxa8D3SPTjppbdltSMp5W0szFvuvsrNi3/IGBpvjAWDN6aRjjqXcplgw7Q1iBrDPTDfTxPaKr6LXQr4x67LU22fi93yJ04NZ8uv1q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Va8BKsXUil0AlfoGsFJVew2UQi5Te27a/xe6JMe8Ec+WVr1A3i9LWxuZrA+G6Rs+gmOFsPWVkvJoF5nRtWx06gWDuQuaxH6H/FpSLNTvCHnPK0ws2Kd4M/OXMferBouyw7chUMvlywJ6jYJ2gLm/wTrl4ACBLVolHMGE8hpqfFFskQOmW9lEmVShzMDvGGcRG5XvfwMiMH63p5nekmFv3RVWliXMTk8IcbEuytaHKCEwPjGMwJOUMlbjd8sbBnLRgPj/uVjJleP3rJoNQkpAeGzowUVgqNpO9ijJStwDnyhMh+AG+9/5tY1L6tH49ZH1H0ZNomM25vy2o8Jt4oAW/qRdl25l6V/cz8oRQY0VQ44eg1I2rW2W1V4BQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 4bdd43b8-73a2-4308-df6d-08dcdcd99867 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:50.4529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kuEOWtgUePT5vwUWP2flloJRVeMZXi0+9yhoL5B6VOftkp/sO6JAYz6J8yk4awmA1XdkkxJtO3eFnMdEx/7fzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Continuing the alignment with i915 runtime pm sequence. Add this missing call. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index c758874a9059..44cace0237dd 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -27,6 +27,7 @@ #include "intel_hdcp.h" #include "intel_hotplug.h" #include "intel_opregion.h" +#include "skl_watermark.h" #include "xe_module.h" /* Xe device functions */ @@ -469,6 +470,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) intel_hpd_init(xe); intel_hpd_poll_disable(xe); + skl_watermark_ipc_update(xe); } static void display_device_remove(struct drm_device *dev, void *arg) From patchwork Tue Sep 24 20:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811184 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 C85D7CF9C69 for ; Tue, 24 Sep 2024 20:44:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75AF010E761; Tue, 24 Sep 2024 20:44:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IXyid2g3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6BD210E763; Tue, 24 Sep 2024 20:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210645; x=1758746645; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=jGEXJi12ALgy3inKTOyd7Yp2XqZ4J8vum0/oRQYngOE=; b=IXyid2g3j93FfVPtB8G32uzSpXa64McaLUzcZw0AOmvuLqpqHEf0EB+i XGiMq3MET1tleWg94HGFIREago0T0G1cb4K2yxCyLOaW9AxEvU0niKsp9 /wPoUPRDlrpBkOh+OG4ESMvyFgrL6qoeDbH+Z8dt7vEZtgEoIlhpHLd2+ TZ0k3H87G8KQRzwxEBQ9/CdPIoU0KCXoBUvMYo48VQOXAkkGgunklcKBj f46NDKEyLVqVdYGCqbys2Tpfl70Z7eTSH/ODyq6cT30qMI8RKx8Rowz8H A78u2a3pa/kQroRd9y0XLT3eYVkj5lupzt/SgQ5E6nG0CBFK+Ud2CuOaQ w==; X-CSE-ConnectionGUID: HQ7OrljLTNqNJbQUwz2GMQ== X-CSE-MsgGUID: dQSGFn6MTLCcOTo2spVAZA== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751608" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751608" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:44:04 -0700 X-CSE-ConnectionGUID: bqG9fh6MQZOfTWNFJjyR2Q== X-CSE-MsgGUID: 24TVYvj1T0a88zfz90VVYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298943" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:43:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:56 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:43:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.48) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:43:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wx6HUzLO29uTo57vzcEoZUyDYjEpjslcpLBoXUo6OB9k/voOzS1+dZCQi0nAZVDVyKJ/ZFbOdrearThLPQM0GQWlG9caURSb+cg/H2F79321fF9dJLj5gdsARPpuM9AqBJ9uICzklrl0mAHJCn+SVUVVpZSxtOV+pj5upvtqryXrBGMWReOz112B45Ydk3WS5cTHojTCL4QDCV0NiVIS0IYTX5qBOVekUizCTlbrWElGl/ECu8Ge4gRsWPYAqLI0hHBCHdCq8wnq0apUSL08tipAAKbcqQdluVk+9gT6gmSdWzyLN/eYl4+kICOdtV2ohphFuWNUWnnnURZy7/PJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oniIeQiNUkuJhLfnbiUW2DuMMBZRakNC9v5P9wfHyBc=; b=Zyo17KKRcF2/MpDBiUGhChGpgZcwKFf+8THk8xHDyUuJ5eyKlYNg+J2F12j8wrmReuQhnb9L3dKKvBNh1QYL5f+mrQ+PVAoGz3EA1nzlzCGWOVNMre578FKp33ZhspDIUMpLhS/mpTglohZulSlLpTK1yEKlIMfH3ElGwb8qPT4FtbSfa3HRjB0dbomYcQuBJCEWPSHk5b7ShwbhJz+RR3AYwSugGsJrbONdnWp4ZjYsPTwpdDDhhFBgKXEUCEf+s37n39jHpL8XnxWSLqveN8+5c95zziReDEWmuNnlmgg66H1o1XpS1rmVcJjq2sZakEBR526RkkNSCHvPoKeJPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 20:43:54 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:54 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 27/31] drm/xe/display: Notify opregion upon runtime suspend/resume non-d3cold Date: Tue, 24 Sep 2024 16:35:48 -0400 Message-ID: <20240924204222.246862-28-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0118.namprd03.prod.outlook.com (2603:10b6:303:b7::33) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB4965:EE_ X-MS-Office365-Filtering-Correlation-Id: e1df608c-3263-4c02-38b2-08dcdcd99a85 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: XN2NvguClyWkYnuoBaKjI0/Xpb54MUhyl0YtsZdqIJR/dGIj1Fvlc1OiIlEaNq8ryi4UMYACp5RESNEn/39bW/7qCTx8e8dokOCCQTkXwmorXpjxj9AcSYCNnSnZG3cSNspd5iWpBq1bdeD3Aa5U8QGgV4Mw4KNGOD6OCXbbdcm1TdIIiVv/xklgAQT4Etc8K59XgVzpkKX138SdEPo6fFeLOS9uBzcLrpoOvlk9AcvA8GRqBtkiVKIUM2xl0GXXx7DNJ5lnb9up+RQ06zPvKglZdUPsPxQtHqVeGpuTdZaqcvAOz8skkoxomFWl1IpJoVFZ45QeUot7IXq+gcxL8dEOgmUIZKo8XdPsGbjBfedkkkG4gJeMEgJxbwkQhM08H7yX17KDg3zTuayivjvOWM2biDC/EpUZC/1dSqUrM3uENRwEgb3ciUBLxwfTOHrlJWC/jg6rP6MUbC3auU6I3lZr23zkQT9XHKjHvtUXvKgxslI/Ul2StnVETnp2OdPgR++2j4mlBVPx1wNbtvxWDDGv5NH6A8zsFpneM3LENW4CTS38XN0oDRPs54JadvzWZu6O0e28gtq//EFxlyuF9CVTt168/py6vyVMJMD5cke3yRUP8qZTSv+pGar0+wkRN2JILmlemR4JJH1xxIONjpscbMwIzDu2w8947M49u6ZiWah5Vcg/MAw1AoEtlU12uNxgiJP1/9KZuFKoEgweOPKTA96Zp4uWkK5AwrzlT0RFHNoktlv1Ks+VOyvoVcesFkxrGCkdi4T6WfttEJFGCqgf3QZb6+yKN9QgOC5tnkDHizDc5ofN7ZMCFTRxPtjrvMomjBAAhWi1VB3z9Kopjo3P7sKU+Ib8m4qWz5iZVHjwa6mj7r5UKRnEzHuo7KNJe/jCkxoKIONATO4TRM0fxbyqGYiPF98oafsmkVwvYvKcJ5d5/tTp1itzMTtjsppSGqGij8D4RdmdY3KERFDF/43cP/hlzukQlLV2Qa7f5CnDLdKlj8vV/dn7XdrXAR9C2hE+SqYEUCHI8D9+lR+mzSJEdTiDfvSr3lbK6ppkTCUVo2uklPvE89gWhEo6TYwtyh8AgbzWfEPgkLoQNu2yb/KZsbPDCvdSsxxlwfq7RQM6HVtOMFMVC2mj0MCePxuqZYIgyUbd8pG+ILFnub73MAndwew9n1bvSskXjabeLh8DNxqgR66Uyp55vonfDhcxVSf/tfGvrXEnVFyhEMPD9duOsPVOrmMPy4t7FvWihCOlx5PxijCtmEUWJvF+wqVPnuONgUVdsB+/T6AFOCA8Ow== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4vdg5T3Sk2hzEphbxA5aBvR3w2F8qXyQ+Et5w9BBy+JxxBVNp81N9xBrQFpexCBBuxjhVU+g6D7Y105dgxMn+5cX4jzVerzWQ1HQFEY8E0WuQPae2p+jGW5usK6xYhC5YtDq/bmrT7ytStI0Lalv6F/p4Or51rXdxvlY1DFYDe+0nvGNH2I0QEVS+9pcf9yF8u4IVVPl8u0hvj00HLrismlqKB3R1O0WZLdm0OAGwE+VsSGd/BsYQM5nFdNvJJwIn7jUJ0lZtvp3GCzilsMfg/0na6QU8d9qLAo5yMoxwouCnXOnzu79Jg8a3vh8xJ8APilaDfsP+HJS4QPYOpPPcqLSr8DtpIG8yIy96p+QjMQC5KsoEBWb/DXIjFsKZoRQrbNKEF5fAJWeaMqZqrtvHkw7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g6jwXU2BoSAiJ7vPoDft/UfryhH9Q+nCgREeTDaOtOL602+xC6KXq/l7SOiCfs4HCXvsCGhwGIkcrgG8uPPhnJ1jbZbFYe1DA7/L+4b2BlgIJDeOX2hZ79BvmcTa9dvaia8QlH+2AUc0Lcl786/A== X-MS-Exchange-CrossTenant-Network-Message-Id: e1df608c-3263-4c02-38b2-08dcdcd99a85 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:54.0248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /xtLMEP3ZbjFUzsO39PBy3gmKf7IQCuAWjJOG3WNAt0BG0tZ25mQsC4LR4S+OAF5xe/8E1HqrjWvhlRmDZSVnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Opregion needs to be notified about the power transition even when not going to d3cold. This aligns with i915 sequence. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 44cace0237dd..780c8d7f392d 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -447,6 +447,8 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe) if (xe->d3cold.allowed) intel_display_power_suspend_late(xe, false); + else + intel_opregion_notify_adapter(&xe->display, PCI_D1); intel_hpd_poll_enable(xe); } @@ -458,6 +460,8 @@ void xe_display_pm_runtime_resume_early(struct xe_device *xe) if (xe->d3cold.allowed) intel_display_power_resume_early(xe); + else + intel_opregion_notify_adapter(&xe->display, PCI_D0); } void xe_display_pm_runtime_resume(struct xe_device *xe) From patchwork Tue Sep 24 20:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811187 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 219A7CF9C6B for ; Tue, 24 Sep 2024 20:44:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C034310E76F; Tue, 24 Sep 2024 20:44:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LfHO2ZKx"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18D7A10E765; Tue, 24 Sep 2024 20:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210645; x=1758746645; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=ECc0WZ0ROROo2VGgmvrN0Bsxo2LlCDx2JyS+TlzBfu8=; b=LfHO2ZKx+eoqilIvl9x98H/4YoxTeO3n6YiSi4Bjf3lGNkIFZMY6dO/5 sA2P4y/gFkSGxJUwBhyIa9kCF+DolP/r3B6rSPZVzv1xCUAiLcqsaJTvR wgzfjurdwOFKAZazyz1SEoG+pnX85hZKqKOvj4ScsCdcs8Wmry698lecO Ar/kbV4lxRxrLv4ehXYRCevj/qeYKYlUj017k1dWNi4tuzHxVT8KCazMQ wRvZpgbQGWsLafbGZ1nfcd6uF+04oZfwJ9xd6GsAeUAjWRkK3x39OaF0M X7v3J+g7C8+FF/KKPzoFbDrjQutYJpl189ZRrbQoc+sgdB1+w6aWYX42V w==; X-CSE-ConnectionGUID: L5zWYDggRPiVkos4DQ6kAQ== X-CSE-MsgGUID: tARTCOVOQXiMA2kyK9tyoA== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751614" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751614" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:44:04 -0700 X-CSE-ConnectionGUID: 3eCjsX7hShS/LwtkxNzErw== X-CSE-MsgGUID: HNI3pOMNRNCKaPkIZ/B9kA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298959" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:44:01 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:00 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:44:00 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I/VRmiRKUqNeifNdNzhZSmMIz6kcXqw+SBhCVeF+eHzexs81WES0UrIY8+Cq5x84X73VBxhVtdHUlB5i/1Vsl/2pd54t9WJ6XmFMIWa9og/9rpMoMtkb34Zu7TUUeL03bqPN7NLph47CDbXmG+7tlDJzo56DF3KgLUDNIOng45YIjTFiEcGKrvDo+ZQnYe1y7BCF7RJjXdKgcro5d//F4a1ykjJLqvbiHLdtpXIQHgPpRXJZntEJArbrUUyggPvhNP0e9dnczS6zr0TFKCG6JkYOotoZ0bdZrO2IIQG/nGZYZGvqLdSSlHIj1o5AnTjt9BQ0B5sVW3RGZ55UQoIzDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=egC2iF20uqubsH4gsXtGXj85M1I3o9vUNOZDDWxlZ6c=; b=aG5oE2a94uQYsPUJyzdNwXOXJmgf54Q9MoZgqr6uSlqpYBSwMSLZwAR1AFDdRsYNsNhrRJ7p7eNRifbi5UF7yeJzNDSjNT+YWbzL5grLmdzMsZd1/KGPALZBitgbehKHKJfA+10rzDteZq6lacpLlPin1e/PjgB7TGN+0LEfvCt/w/B69Gy7GgSKpQZh/zk6zLXobxZqR9gvWfMU2UdbsVglealfcUT+DR+M8SCin6rZfsSNQ0fYSJQFrFSrcDVXPC60wmqKZOe9FWm2aLeylbf5Q1Mwip2lzgNapMeOxVX2ubaoKuCV00nQm2q5y2lwpVpPw2+8a9ZHOa/Mb5dCxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:43:57 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:43:57 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 28/31] drm/xe/display: Move display runtime suspend to a later point Date: Tue, 24 Sep 2024 16:35:49 -0400 Message-ID: <20240924204222.246862-29-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0097.namprd03.prod.outlook.com (2603:10b6:303:b7::12) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 618da4b3-db10-45fe-50ef-08dcdcd99c4d X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: zUmtc+3km2oHdzBUcUytyV3JlTDskI2X/oS9Etid4vGYUX+pDTJITGmjQ8jcUdGDB1iWLuEejamvlts/AnAz3IVTIZ0PDZjSu8jjJ/M1+W6I8QwILh9mm2/RJQ/QqsESpdISuDKrcRsR1XMPzGEQghkDbwi0M6bK6WOpvfL6t+berO16qlJHuEnhS7OrjQmMjhfYXjK30ThCYBpnEYZMFnUBtwSfHeXzHgtXi5eq3KzeNnt0aY2dA0zYeg7tz1pIqxNYR6nE+g2fqQFfgkndbeW2mXihVp82Gs89s01THe54F/uTFcpEPnuaoWuJRX+5x57SqfgI/kohAhZxee2Z0MPbX37blfm2ovI6qMwOnCJA3XUnwoorxEIzp6BgTZGJBwBKc2jfAfTVbvOrxCYKI+L9Ex9D26VRWtn1kHGzue6bDyog8oK4CQfoROAB82RyyUNnKy40zaQRDYWwMSaw4/mSOOz5cusIPBDSwlWbvR9IOhbqjhTNFtOv5bb4atmlH/FmttecAIi7qKkvP367CRYx2/6ufJeKxDcWoc+3KO0FNspajVd2Prf6Ur2cmbiPy5jh7gwYvwVTpNV04IoR3nt5mIYQk4y20HWgohaY2BWdavX9EJEKPi8wF43rUoXkDO5a5U/ZHnnK63dxYpLMCiW0Aj7QRvEF84ItqncFRZOKbqN8vHH+uT8szxTuHt+TWawXNUHufRAqEUjIjJhXQWVex1w7o+QLINFcuiGaXchKGXGuFQ3qx3HVVXma2if+NpKixTJorTa9kcD96I1QJprFQuQxSJooiPobSKVEZmQ3qwsYrmX8TQSv06ZZXYU1hUaNun1SnsTPvMy87G3ZcsIk8bmMk5XYYMZu/Y6xU4Le6ZpTt0tHZUcS2kWmo9j3ihs6JzOyt2CNSNfKg/FiZQzotjZfT43Wosi1yy5qbQ4OhmF/CaEGoXxBt5BjDNx0ufmWG0LszKpoIy7XzKF5sFaK0SYuNDUDdmky+PJUMhUUr7es1jVF/yA3/hsQcV12uhPdxXRhxStPc9m+gzYjeaECzN0OTfE/mabtbBML4PvhXq/Dai8ZCCErYGcOR+rwsaWr2Xw3bv3QJCiuu6TMX8DKF4JTKDaPy0cLJUO5U2k4PaNsmsr2IYmMM58B/AlwXpzvjjp6BtXPWVJbvZ8h3vKrsXdbtSH2V7KlP1GAqEIQCaaK5wNfxC4s+Lfir6MrgNBTClwIBCHSGHDqo6iGytrrxm7YvIFmlSFn/XqDxOff/d89OGCxZk0TqjsOVc9w2NvOEM6TryvruAmCMI3zLHWZSEJlQmPmmv0u6v141FkbP+PrUcUIGZ3Q/GQBbOpvdxbqLJtpcp5uVD/V1P224w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MXfy871ga+1yx0/kMVA05jV4wB1Duqogpoh85ga0AvDN/P1vqqHTmpg/ty0xYXaUwMJJSPFLf4aGNWSCNpm3Xq7HaPBk+NXG26HJrajw4PtrZjPb1ni7p+rnpH5NaMvQxL892b0qfZQtVS5iVUQR0gx+WCzsfQlzm+3XCbaYuMZd6HimBXwWL8B5n2PTTuJhaEgXZhbWx6Xvc3yDwn3NhrNxOvvromC8MlU5WgIzCnHmAtWwMjRNMljk51OCGuebecQpgDTy2AlJZKPe5tWn4iE8LF/mhJPi3yoSmUXk8Vfbv1UsxhL8dGhRw1HAX0xXbbm2KA3/A4DldkH218BmR/g+fc8DiMOBjuPDe5qOs8yslh4Vm4dMcKbiXrjn52oOMRLHWG7XKdyYZjp9vNrRu9QjjNiysXLJxzg0euj1KMXSy+/WcEYqvIWxWT0xEVEc1rqjvemwbkm0CsX/QnIfQx8da0Ek/KLSK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41E5FGDRif1RhYZD887R5wSkISYVXF2a4WVAlT7adpWFlRBZyJj8i5PKim0vkCh8KUw== X-MS-Exchange-CrossTenant-Network-Message-Id: 618da4b3-db10-45fe-50ef-08dcdcd99c4d X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:43:57.1566 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SFDuBu2dl5D3rfxnJovLupQWZ3eAwj7M+iJ//h0L9AKLSFpTl+iZHwL8shjVOV8LsOB5zRvodnRBpXn2RXMrJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On runtime suspend (regardless of d3cold), there's no need to perform the display power sequences before we disable the GT and IRQ. In a matter of fact, the i915 runtime suspend needs to disable power, which asserts that IRQs are disabled. So, before the runtime_pm sequences can be reconciled, it is needed to ensure that the Xe's IRQ are disabled before the display. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/xe_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index 4cacf4b33d83..16854215bea6 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -402,8 +402,6 @@ int xe_pm_runtime_suspend(struct xe_device *xe) xe_bo_runtime_pm_release_mmap_offset(bo); mutex_unlock(&xe->mem_access.vram_userfault.lock); - xe_display_pm_runtime_suspend(xe); - if (xe->d3cold.allowed) { err = xe_bo_evict_all(xe); if (err) @@ -418,6 +416,7 @@ int xe_pm_runtime_suspend(struct xe_device *xe) xe_irq_suspend(xe); + xe_display_pm_runtime_suspend(xe); xe_display_pm_runtime_suspend_late(xe); out: if (err) From patchwork Tue Sep 24 20:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811183 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 69F9ACF9C6B for ; Tue, 24 Sep 2024 20:44:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 166A410E75E; Tue, 24 Sep 2024 20:44:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KJFnMHCM"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6680410E753; Tue, 24 Sep 2024 20:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210645; x=1758746645; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=4zzmANmJfZc7GpWX9u/m2RJcVTiB0MnB1cbKjvH/sqY=; b=KJFnMHCMO3kBOTtqvwO8SbJCgPHKJT0etK8wSfIIXieO6W4A03nb64rv 0/iFpMGGDmPxfAHmidKSigYDoTY4WQr8VTX+3BcQAb4H78GTNpSA2LY/H Uw6VpFW9JCVu4vIRaw/GfYoJ8loDvBFmPTC3nCh5EP4ET3kXt1EjK291E cBi+MZZVuiUiwOeR/5LigTdMyumgfEweX7CnZVsC+c5vmAnMCOOGcGk1y sia0/70+PJLREa+oxhV2iV5BVbqqi/i9Ivbobs9rWU1nuWLNj0GtlO7go o14wc7CSqatqoatESVJ2NA3/cD6Qc3Ogp3DlLssmdW6Qhm1YmpRN5A7ef Q==; X-CSE-ConnectionGUID: 7nHh3ZrVSeuy9KoVpddg3w== X-CSE-MsgGUID: KgwvSHjpR2+baIPCGXtEPA== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751618" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751618" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:44:04 -0700 X-CSE-ConnectionGUID: jvDelCkiSQSaDa7ar5PkJA== X-CSE-MsgGUID: TeatzF2tQEKu9fTe0CDNug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298968" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:44:04 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:03 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:03 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:44:03 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xvPVN79yVUJYHvsYbwOTs1X/H9rhWbvVXs22gnEUtLG3MY3DVHdlJ2VH9MBgKToaZ8M/UOPaZ7BrhyyOVqfqUdtiQ4pgLuhesW8CmnXDoaVfYXZjgxEjNJYvpueuVvIgAkHtECDVaFcTDbBucNd9wvA1oJ6OKeCnNGzkTTiL76VH9HHvDU4TpQOXq/14wGn/lY1HC1mBGwa4PTfJ10yQkroQpDYx6zQZN3kX2jMpWisMuV7lcU5MkYPM7ifXCDr7n4m8dxXnY8KfwFEtR5bLPbgcV1K6xYbmAMzaz80ih2toItbwFVxBXmPGxAD+n6qjxk3yg79QbVk7M2uxuwCMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LB1saqzz8i0kF/dEiHh+B8kxpO5+nIl79YwMI+sv0+c=; b=C+njtCLc2DBcqcglGql3is8ZMHW8ZPm8L9IVW7U09i4GJW3Q/V1vZPOwtQqZCMAjE9WfXasCS1/he3rim3I0XRMxdwp0Ujq4Wr3Di+xDfPJMdgh3el8eTIt6B1XhOrX7qWWgxkeZEkh9obDt2pZ3MaHlT34igDQ8iuSCkOKX7BcEEBkVXRhbEyWDOQGbnbbrfkMOEPBs0CpuF7nLo7MCUQzp7qeAHWoZ0J/xyK1djcG6T7m37pUJA/zOe7hbrxArOVaIuWJ/VovF4KBmZav21pMc+hIHDDAAgfoywGRLFuIhfdRpuoxP5U7Vq8b5+BbNGW4B+eQ1+gJwwEVDOLSexg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:44:00 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:44:00 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 29/31] drm/xe/display: Kill crtc commit flush Date: Tue, 24 Sep 2024 16:35:50 -0400 Message-ID: <20240924204222.246862-30-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0302.namprd03.prod.outlook.com (2603:10b6:303:dd::7) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 11098bf7-4500-48bc-6bd2-08dcdcd99e3d X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: 86aAjjSS1voCMuSIGWqWf59nLzTphv05W4ayP2eu5IMvgmNLyeTPRVkCom6gMkrMOEexpcFPu2Yx/I8XWA0ampHwDCCYTuY6DMyN6mjSHyL8wTCQTZ/u9LsbEvWfKfTGGqjm4K5opem+7Pfv9T7dvYFb9uR/yQpU3BL0Wul6m9Cm/s/pYKsvYbpSs10KK3Seedcqkmq3DFiW0+mwUIVpR6wrKzWUjoc3r/mWXZ/3nAPvlb9tQ5oo7C78tljUTxmS7XrPB8p+NyRAIqdqKCkOvYwo6wIrwk8vkKaP6Dn8ZhYi2poWuUlDmK0aLSpbQEYnVrLDe2hGgTd7XjD85uj/LD5lD2MdAxjin4ROElaX17jdx8pAtcxu18guKMtqHx3UBZq4ImVMcTEMMPyyaKVwL09uX5WMdqdrJHHBn88PM2JJ5FoEqXIPOrpetMpCIdSkaiSV0uTsdX+Xq3UnPUNsS04f98xCjvlKHJs8Bi+WGGZCz7CaBQ08d+Wcy1eePy3IlmdJpBM6yVj1AQ6C2khRiAqYrgQqXwFLfujpuSp6Yw1qlD2GGP5ExBNohHvyBNTJ0eYreqV3gWDSnJ2+wmrbbmA75V3GwpDY3UmQ5z0DDcbQCuhzSXu1VA4pTj/XTbu9HNjCN7seuuvptJx3GVVx3IvnvgUtXQEBxK3C85sjhasz8vhzJYIhExdGiEbBMMN1SF2sxS0AVecKQS2YOn6mK7pBGsSHF+VhvSfKz9O5DxL2zJHWGUWCjZv3h5JhxzOMIqPRo4OdxSocLd3YaNkrcAsT/26Y0YZk5fLZCfiJxnXsMx8JmZ+mzz5p4FoadFDIaODQk5anQZ0fuydd4iqGpR8ydADLcxXbdMYRZ5qnhzyaxDsp3RtmKj+j+Hjqt9SVab0Xint3I/pytLcx9PPZSYZP4qjPdBnK6NClQfF8Oj5FiYHTPWQkrZKU4JXOLrynmu/DciLmSf1mg8HNtW9PkhuA9x2RwKhrXLeyqj0PtUKBBZ2Q8768mZZ8BY9kJ7VZBkA2xi5wniib3r74fSIk3erc9Y+PmI9OeXrDRYyZyj8WGONP4jF8xJze7uWkQ/Gb5iiEgZp+2qzwxBS8M7ufKjubLucskHu+8iVvRWDMnaYCUGOFOgl7PgnTtLKSHKuYOlb8o1dw8aezB7xT2rnLxAcYZPE6wiu7bmvUSeVe2Ba/vTnD3LPVZ6OADrypn/8JIvd37kI0qDjropVCeJQALBoZZJiDL990rZHEYydg8uPE/Sidicdw23Wxd2vjPZoIcNJYHz+ZKSuOFdLvkm+2YkXLYWSLOypcqQUdfycu/5HqUaB5shQPYtpEPhA4alu4b2vV9bjuo0llbD7mi5NecQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uBWfltBn/UqXXK9+FJ6xK45br0KUlZjXFxNcMVqJHxfVnvGXgz1mVk+udA3Io6BUYzZGCZvNRYM5RFVMz/3g52fItsOYTUVOCk1ESx+UAJRgRj2OFOxmty0Tox8L8OB4+mK7GGVvEG+jQLg2Unnsb+TQqR2sUtFVRp0RMDYhn3ULFcFumGO8uEEeYK4rpfwzpsYnqgKLXLq4A5APWVYOn2wsewjPVG17tevqKwSdz7f3qWLl8lS0xRqNqnCPpyXJC2Z4MpIjNn6JPTRNV3YzzfMcHM8Gzm4ys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S/ZpdQ5sct/dPWrLm9IIy9url1u4cpLyGa/gc8yTODHCZDOB5SlCzZw62rO1zmGA0LdWoHyetbfk+JoXiCHTgv/UifxsnMah+uUDtz78lxcve43TjHNdmfg1FNDlS1MnSPdvadVhCze78YXyDI4uFPjs/bUWXZJfiUC3tQXzuOPV3OODjzB7OB33bMWLvi09kbgqYQOXpWAIY+MgYHLS3Q3QKUT7cNd3Bfobd1DNDjJE+Rkmvbf8M/wmdQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 11098bf7-4500-48bc-6bd2-08dcdcd99e3d X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:44:00.3128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lxNyi/XtvHEIhOr6f7TtLdeBgVtn4o8aAvfqmj8124tMnv4zk/kaPwKVZMwE8gtFxPx7CjULKJcCZ9pfAsZBPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This flush was needed in regular suspend cases in the past. After the clean-up and reconciliation with the i915 it was not needed anymore and removed. However this remained here in the runtime suspend path. However, the runtime pm flow ensures that there won't be any flying or pending crtc commit when the runtime_suspend is called. So this is not needed here. Clean it up. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 780c8d7f392d..23bdd8904c44 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -283,27 +283,6 @@ static bool suspend_to_idle(void) return false; } -static void xe_display_flush_cleanup_work(struct xe_device *xe) -{ - struct intel_crtc *crtc; - - for_each_intel_crtc(&xe->drm, crtc) { - struct drm_crtc_commit *commit; - - spin_lock(&crtc->base.commit_lock); - commit = list_first_entry_or_null(&crtc->base.commit_list, - struct drm_crtc_commit, commit_entry); - if (commit) - drm_crtc_commit_get(commit); - spin_unlock(&crtc->base.commit_lock); - - if (commit) { - wait_for_completion(&commit->cleanup_done); - drm_crtc_commit_put(commit); - } - } -} - static void xe_display_to_d3cold(struct xe_device *xe) { struct intel_display *display = &xe->display; @@ -311,8 +290,6 @@ static void xe_display_to_d3cold(struct xe_device *xe) /* We do a lot of poking in a lot of registers, make sure they work properly. */ intel_power_domains_disable(xe); - xe_display_flush_cleanup_work(xe); - intel_hpd_cancel_work(xe); intel_opregion_suspend(display, PCI_D3cold); From patchwork Tue Sep 24 20:35:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811186 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 BB1CECF9C69 for ; Tue, 24 Sep 2024 20:44:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6533F10E765; Tue, 24 Sep 2024 20:44:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Xm83grBY"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 355D810E764; Tue, 24 Sep 2024 20:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210653; x=1758746653; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=Hn3r+WQ7PmyRLF8YYk7BKP8F7h/w895fPiRUOeZBGrs=; b=Xm83grBYIrt965lPzayNfTupqxDw+dWyoA3UF9/l6OuZXIbGY2DsU32p ZIMMtLyB035hGgrXlVC5vYYgtDGRm+heI0/W2PrWaTiLXHxUQN0AOuf9N ilY9szBjELI6Ub62XeCLj3oNq4GYvKfqol+CtsRHdFQpRmzcGcYJvG6vj SE5c7kpTxJTzHcn0XM6q8DcWIBrmFNWhDOXicmAwgL5zHGKt9PkfkciQr T800PyhO7ZRN86x2mdgUWEngQ8shzwQq/P3JVEB0S/EMmBjGy66V2b179 zNzASA8jsj0kw7QyixgRhhEd6qdG6bcDa4wGRSL+YosnlnrgB6KIOUjzV Q==; X-CSE-ConnectionGUID: VuOCrMTgSaeYXlwGgYX5gg== X-CSE-MsgGUID: tRJZ1VlhRd6yZBH0z/zl9Q== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="43751625" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="43751625" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:44:12 -0700 X-CSE-ConnectionGUID: KoVHVyfsRiaTyWVU4AhmhQ== X-CSE-MsgGUID: WvnCRI2USuK5RPOhWGSOiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="76298976" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:44:07 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:07 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:06 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:44:06 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.44) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pKK+2Z+9y7R+wDWaBrhS+5qxTHoUWk2+SrsLtBTcy6zMlnwJtHwk5BJ81RComViXMo0ryPa79X4AlndEdij8epnI+wx/V46hZly+vHD09n9cOtjDa41tWUYRAJlUVs1xwhxbK/XE0iiiECWwzj5J1GvGZ8u5nhmtJZ7+4JFqhX8Gq4g5NEifopL55cexqj9gdsbnd9WadYtDZAPZkz7f8biSmM12w108ltFobHrQuc1TjeAMZrX5CuZAmKofX5t0i978IoeGZ3Hw0xoZG83+AojlBw2GCMOVWTtJ2ikT6bM+9sjMiSohPF9tbonv6aODhGHTLlLdNdkJuO26uLyE0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7728YYDObPGhW4LvuhuCY2Sqw9uuDo8UVZ9b+WdmX0U=; b=BCsp711RC8NhADj0w8rAzvpqk1XIdLiQCsvC9KOfta6HuOl+QE5H04HjoZRoLFpss9qdcYk+ijEAfge84EFzIt4bWQQ9TJR5EB1cqh4v+Eo7bK7aineLA3UzCc+VWKPyEm91axvgnwK98XpT2cQZFVueaXTTXWCDTSzcgyeMUvWfLyG6WQDbJBBmad9P8OdqrMcEZ0ZrdgqkuJwElFwiFaGeAtz7AlF4BXkgBdyWg1lW69lBKdssgDL5CRAnvw6HWpBlEah1yJgQeqc6Sqt5v8RUY0081bFX/JM+vYfl8/U4RIYh9Qx7ak70yLDjYIavc3RMYluFd3n++xabBy/NVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:44:03 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:44:03 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 30/31] drm/xe/display: Add missing power display handling on non-d3cold rpm Date: Tue, 24 Sep 2024 16:35:51 -0400 Message-ID: <20240924204222.246862-31-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR05CA0013.namprd05.prod.outlook.com (2603:10b6:303:2b::18) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 98e60f63-bdf7-47fb-6d00-08dcdcd9a05b X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: wCSRLyoV+/vxLdKd2WdjOP6E++Wfm4Z0FsM5r6AzN1wIC8n0YFm8+440sCW/tPbORIHtrcyL6EBDe2uOjDL/+MBpJArD144/HEPPaNVY4mSLxu0b/zzA5N1vmZTC2dk8WYGwLmDn6TrdhlkcyH0c8zco93dWOcQUcpKlVZ0Ccx+LviwRj1bk8xq6TXK+MJsS0HAK0pqnBwvtq6PVpWg3t10PuPgymU9GuLntu2P/IonPOWGlwYhQZHJv0/t0iqd3WAWvmyITrPYE/vYZiHvXkxp5PMmPfEAexsAYGWLLEpFlXtpLueo79x434juDYqNqUMdo25xx7aEB4jd7v2FxUeR/aZveJM40sECEMsyYFZ+R4n6qZ/YnycubpExaU8kLEf2p0wOZTeG6ZN3vXEi33bzDpRu9VaN02crFvyFepHRxEdGQ8d6YKH2hF5erePN3ZUG6g+5YW+mRDVGS5p7sGHdN4dexN6LMyjWHZRu6gp1+Jm9lDMKqEBzwrXG2+yVBqi1Svg2vxPB2dnt4L398eleGdpvwyq6PLsKFxEn2V2BKBth0oeVpZcfuQFJgT1nqSnXUbAIiIs2EbJaSZP+XtZFaxsKmmvsIAMRXB5Zpy8+cC6sO0z0bOTcYm28L+iRScCET6W1AkrvXP+qhgf7WTphgSAy+qQGBqZVFIups3cF6jfiemjRaKAN2VOiwubfcEa7eajIT+Nva9TUf+VTw2wx0s6I15Uhvmho2T2QAnVrYWoc54Pzcv0n9ngkLy5VKWdAV566ye1XFiFAUYNZePqoo1dJRiAcIU3bNlaLoDDxftDAR3/kZu04vrHLFsBEib2hkfIT5q9qASjLhfyyzsN9Xil07OmQ37JDA5puWC9+cavt/l6FNOjsn1NBQtScGNSghmc095AAri4W6cwumEe5qMixEHrShon89CzY0Uxyv1ychILDnKuDXyHVybnocAKWOvjSSN9krjcxQdFMCS2qXVUkyfBjJtO8etjCnd1FXkcqhg9fPMB2xWiu9BsVf78IPj32SDD+SxOmWdZb4KS4ZL78Pzg0HdW/UWXEJCkOXIX6ZHARg36JJt6usN0P1GdsZ+beofem2xqwphSra40yE5DWw37zavKc9dx+fMgavP8yuIn97yXzmpd8B6/UpSpm0VTVO7mcsxALo25Geie8otz2UI9aQ33f3b5tR4qRfhyY/gF1dL7uQPnSrRowszMZcGD+QVoltvQJCcPbon0snpXqqXlTYqkDdeC5lCEK4K9Fee4k7+9S7FDPG61rdNQ/LibpXH8BIEA0+NY27H3S2psYUFGXKh7+Rc6poKnaHrW28WJiicc6HFcVEAa4Etb/U0YEFLAfDog3+7lklwg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-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vr9xQWIcvK9WehdDIS2dIx3Mf0/lTlaVEIsOfvRClQlQiwaaeEBUju8T4CxcLF/t2VTr16lMlsLNAffMmvN9RgC/mGuYBJItupPcusV11mMYNu2d5KiGm02w1uy5/OZC1FyFGc+MKcH6v/5DEy3nwjA1Z3o+JWIPoBCU1jPzwTCDHfB63BtJN2x4mg1m+xK7MeXBgmrWw8MU16DZ+pHw8cRj0tt/23t/qT7OP2Tx74LUpGTd1/WN5k4rpDYzgSkpUyFFOLQ+OVgWFkdCeVC6k9xwzYOevnpaR9BhgIeDBuCEgZAsZlj3yHbkra7kzFzW+Xl+BE3SJP5O/UlZPducsN7Fa9k49UH+AfV+RrgFMlkykG98BIFL1V6h6p3O+rsALZEnx8dbedpf3hd2asAdB4HqZK2N8yk105d4MkkjdQJP46qCoXPQoNYejm/4BJpea7hX5wKQZZ2OtnIrXmePRe9k4eRNcBHpmcVTtmpwDb08ZRoSbpUgZNt81Ym7G9lXRvIq/DSiDrn8tiF0aki5g8CVpLlrxjJPu0SrZ3OmN5GLdbJZd56hju/l3GXFAk3+mNkLpg6Otz22Ut3g== X-MS-Exchange-CrossTenant-Network-Message-Id: 98e60f63-bdf7-47fb-6d00-08dcdcd9a05b X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:44:03.8133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l+ZnPBtdFItKWNyRwcuYi3b5FJ89dQOGouvAFCDvfcZnDdOKSrUE/vxfYI/nr+cyPMgCiuR0yHnxBaBDuUHoNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On the regular igfx runtime pm sequence where d3cold is not possible, the proper calls to power display are required. Align with i915. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 23bdd8904c44..ab85c7fb217a 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -415,6 +415,8 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) if (xe->d3cold.allowed) xe_display_to_d3cold(xe); + else + intel_display_power_suspend(xe); } void xe_display_pm_runtime_suspend_late(struct xe_device *xe) @@ -435,10 +437,12 @@ void xe_display_pm_runtime_resume_early(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) + if (xe->d3cold.allowed) { intel_display_power_resume_early(xe); - else + } else { intel_opregion_notify_adapter(&xe->display, PCI_D0); + intel_display_power_resume(xe); + } } void xe_display_pm_runtime_resume(struct xe_device *xe) From patchwork Tue Sep 24 20:35:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811185 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 5C967CF9C72 for ; Tue, 24 Sep 2024 20:44:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 027A310E763; Tue, 24 Sep 2024 20:44:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="OrWansM2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9A3C10E75E; Tue, 24 Sep 2024 20:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210651; x=1758746651; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=f9PbteR21BU50Ov1ik+/dpPT8Qr40Jnjf3iKpD9R5Rc=; b=OrWansM2iAVpxzKzPouIS/VjqIMk+McJ4q0HWpQX0rLaZX1wiMhRXoxx N3sA5rXmUrNjKV92JUv9ECuSbCibUlr7e7Pz/MrqjqxbJi7J0UZ2/my8h 8zoIcw7O0Xk6NO3nm8NLrF8voJbda58gdaUxt/V3EXNsQr1ln2L6iQW6I yOzE/o3tYO5O8z9EKqtC57H7TL1LXWXJtcAxIqz7fi78ivuypGVdLa1jQ yDmemeqBLa/vXlZ7MdoMwqT6MG8j5xyyyV+SHjBBsKOAsd8VA2l6SuNKa f5DAxgXQM6iL9KRwHxkcBjgzCKh/v3SJhtcOP2EqZKsbjV/szOKI15tHz g==; X-CSE-ConnectionGUID: sw5ujRRpQgucM8WhCDaQ2Q== X-CSE-MsgGUID: FtZnncKlTMerIQoU6dqMEQ== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326222" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326222" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:44:11 -0700 X-CSE-ConnectionGUID: k61AYm2oQ8GAK0fP0DGXRA== X-CSE-MsgGUID: whzMSQ7CRLSaFhjSaUiZ5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001780" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:44:11 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:10 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:09 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:44:09 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 24 Sep 2024 13:44:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sqLyu9rmPxsHq3Co+xaDMa5FZ71cQ1mG5WzK2NsKN3iTp8st/h0d2IYgN1LC+VH9GmpEQ3uV6jtDmS0sK/XdyOsNKn/OmyWiz+vTruepjEjZcLliW09JLdwVuHzCtrsUX3vmB8jc6rQUei1UP/0Aq2kwDLjbu/9gJtTk7VOhFfSA9Ni4hPa0VIt6EsKgfcjl793FKfsHbvO1KPen4xV3g3UOHi1XmqWsMIlyiqVm+4s3EnJGcv3enIbFVYiNi1FR2H7yU83xf2u28CgTxdTmStn2KZk7IqI1PHhmDasSigRNW4e1CUFGEL/8TNknkaCVLS5C/uZQGM7utG0s87idnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nQ/6AykCCnH6PxICJFFq6G0rKEiMd/v05pl3akJQigw=; b=i4KF0pQ+iMbp+pCQJbLv+e1wVCrUjviZIEWwUQtbdFHcBuoIg3y5ebTX5edDICmhHWmBOseRIcP9MLFSJprAv3Bap0B6CzE5riLZ/+AQPzqdJiua0X+IaKjvT5H5CSWZmh4HqGM50DlI9oL6dK3busukjjja+VGTZMFEpnEljEdZok51UpPYxE1R8/f8+FWPwSV0WMsZNVJg4S9A9CoqU1c/W2NlFxM8ndMs1EVpuJyo1eairXtPqdGFk0NSsyRgLjHVd7vqP5riQ33lEc6q2QbI20+DAf2AAH7+fUcoL+g7DIyKe/D7/gvkwzngnq3Rqb8R1YjZhortcl60oR0NMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) by SJ2PR11MB7425.namprd11.prod.outlook.com (2603:10b6:a03:4c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 20:44:07 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:44:07 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi Subject: [PATCH 31/31] drm/{i915, xe}/display: Consolidade entire runtime pm sequence Date: Tue, 24 Sep 2024 16:35:52 -0400 Message-ID: <20240924204222.246862-32-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4P221CA0017.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::22) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ2PR11MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 019b67a7-cf51-4311-6343-08dcdcd9a231 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: vu+SrTDLGwCBegHRsQkp/R+W47gTbNBnyXUf4H+et4jh036swz0faE6iWhVPOizTlrEsm+aY/OQkkKgxmFvRcXI7wDBrKzgOnwOk39ryhw+V1PyCq4WfAlXkPbXbfSLwoby+LRA8UmR2uqDKqOe4IdvwDo6BQgQKiSmw2N+v3avFgqikIt/HK6lc+mGuBluFhGq8+BYxvqW8dk6/vP0UZRCxdrs2tYR8ylc8LW9YpUx06DyLJsVwpvrVpqF+eYDHdxvdQrpro9Vz3u800KeTENk6PggikUmn3lRsaMSZA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.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wF80i/bdxuKOYc/ttS8WiZf4205VybphUTkErwxMCZOr8B9Xqf8HXy1sJiuDZPwTLNuGcaViJ/cvdKVX4G+zjGl5Qq00WPz92pu4ohqMTnxZVcHE4zR1ds6ylR+7E9D8puZtlBZU41eEq8eMPmcIfVJ5oP43T9oURTSLw5Y86X87jJXQV5EATN6VccSiUUHpAiW6P2AeYdoAiJBOJ0i3yPrjnlKLFMphnWinK/F8q809Ko68rqtt6nxbtI/e5KVhlvWLVSdFJNOII4P0m5Zf4Sor9286k4sKpRsDEQe9z4fH8Kf8mstfrRr4JQSn2T5G986SFeTmI4426c8l64Y3lg6i+1OeUT1HKWp2+ZOED0AoXtFIN93gi6rMslKQ6Y2UqtAOcffLwMrVjEntzJ6Zk50dke1ZlJYnX7Q+dgHDiKioWgTOrIP0Eb7bY0rScPF2vsMwAqBJZ7SXEHj3NiDZTQIwb1rFqUzt5fIMkG1okj9eL+7nI6mbxXKN0qlTTZrsOR5JMm4feuhFpjuTf70NMuuRJ79JRHae9JiBvymat7KCmeN7sTTbGClAwccr68hd4x74A6Dg36N1AM2pVMkFGzOwIdpWvlmFOibWS4LdGQv/UTdID7Kp0p+kxXxTKB2tvX8th0Y706mtJb34BgtrAmChnS9gApec6sdMksdSTHC/iejKYrLp1DECmxCTzQfUssDTSsS3F5w8PZ1+xQ8JCGYnnq0G9NN3SArtaggOpYLAGO1AuKeAC1uCmV15q25TExyLPieEO0/i6M0684rPbrFGSfpcADg0X4P/k4mPBNFlfmOfi4GgfJ4HFT9Yi1drqsGRlrmel2qLxKSsq3NuDeJefpTnXrvPfCwwWgB+yI0/7lKqEjqRakVm2CpClmQEFyoY1CN5yoCjuCDJNvqDoJVgKIk8dQ+ThCmR5Rmu+52PVaErxrDUEOPUCuLQrxLEVbV7xC6BdF5yhNNGYXfwphNKUF++HmoKnjvH/i6tTE9ArnulzcIDfK/KWRrXy4LJwAg3W15lbigDN1xKRPpsif3BGSTjyaeRPwiMtVNNBWnNHHlfjetouvJawrAr/ySTb4msGLTacsWAsoGgYZWDJBj5raFhjRj7701kgfyarNjn2S7SJFnW2BkF1uq6E+Z6c4Xu+SuVmB5bRlQAglOzmKhwwaDUzmNgzE7DvXEJPTU9gAdCqbLKLeIjY/oFrJDG87NzaMZ46ZpEaINZt6REw1u+Edz7wXy4wI4sBlQ/wjz3LJHKxHMWLoG646QmMuF3gWsqn/rpyl3GOyesxhOZccJfZCM/x4Jhju9GjVbbZebbT3aZ7WCHwinSED0MBeu9smiaBTcvpyvCiGim0nIHXBcTfhf/3msoBPbl5p0Ma82PHZbDSwf8KMHGloW+t8MNH+u1STV4CN9FQWSfg7yApiaRo8hVRqjjNYEkFwpTTrWcm3hdZld+nzJg0fQiz+TlbJDCVzlPae3toAc0NeZfAHoiUCOHJSv7aSmTEDBx6PUZAxdEnDyF3ySLljvIDCCtkHZF9ROQW01hn40YtxrJNMu8ncepWOUyFFXks0MtMqZW6VCxhJJGjvwy7AxEsBhL+Q+XRcshJsIlK9sIHtJBww== X-MS-Exchange-CrossTenant-Network-Message-Id: 019b67a7-cf51-4311-6343-08dcdcd9a231 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:44:07.0221 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jm9DyGpxw6B+3u+43NVvPZqZS3ECUkBITrsQeA/ak0BdU2yUPQ/Aw3ABU8DmnJ9PFWD0FLe5GSkCWbuKYmLb5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7425 X-OriginatorOrg: intel.com 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" No functional change. Consolidate the entire runtime pm sequences under intel_display_driver. Simplifications and optimizations around the D3cold sequences are likely still possible. But before that can be done, consolidate everything at the intel_display_driver side. Xe display power management functions are now only a wrapper checking for xe's display probe parameter. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- .../drm/i915/display/intel_display_driver.c | 66 ++++++++++++++++--- .../drm/i915/display/intel_display_driver.h | 12 ++-- drivers/gpu/drm/i915/i915_driver.c | 8 +-- drivers/gpu/drm/xe/display/xe_display.c | 56 ++-------------- 4 files changed, 74 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 62a7aa56f0da..3861fdbefaff 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -856,12 +856,45 @@ void intel_display_driver_resume(struct drm_i915_private *i915) intel_power_domains_enable(i915); } -void intel_display_driver_runtime_suspend(struct drm_i915_private *i915) +static void intel_display_to_d3cold(struct drm_i915_private *i915) { - intel_display_power_suspend(i915); + struct intel_display *display = &i915->display; + + /* We do a lot of poking in a lot of registers, make sure they work properly. */ + intel_power_domains_disable(i915); + + intel_hpd_cancel_work(i915); + + intel_opregion_suspend(display, PCI_D3cold); + + intel_dmc_suspend(display); +} + +static void intel_display_from_d3cold(struct drm_i915_private *i915) +{ + struct intel_display *display = &i915->display; + + intel_dmc_resume(display); + + if (HAS_DISPLAY(i915)) + drm_mode_config_reset(&i915->drm); + + intel_display_driver_init_hw(i915); + + intel_opregion_resume(display); + + intel_power_domains_enable(i915); +} + +void intel_display_driver_runtime_suspend(struct drm_i915_private *i915, bool d3cold_allowed) +{ + if (d3cold_allowed) + intel_display_to_d3cold(i915); + else + intel_display_power_suspend(i915); } -void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915) +static void display_runtime_suspend_notify_opregion(struct drm_i915_private *i915) { struct intel_display *display = &i915->display; @@ -887,20 +920,37 @@ void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915) */ intel_opregion_notify_adapter(display, PCI_D1); } +} + +void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915, + bool d3cold_allowed) +{ + if (d3cold_allowed) + intel_display_power_suspend_late(i915, false); + else + display_runtime_suspend_notify_opregion(i915); if (!IS_VALLEYVIEW(i915) && !IS_CHERRYVIEW(i915)) intel_hpd_poll_enable(i915); } -void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915) +void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915, + bool d3cold_allowed) { - intel_opregion_notify_adapter(&i915->display, PCI_D0); - - intel_display_power_resume(i915); + if (d3cold_allowed) { + intel_display_power_resume_early(i915); + } else { + intel_opregion_notify_adapter(&i915->display, PCI_D0); + intel_display_power_resume(i915); + } } -void intel_display_driver_runtime_resume(struct drm_i915_private *i915) +void intel_display_driver_runtime_resume(struct drm_i915_private *i915, + bool d3cold_allowed) { + if (d3cold_allowed) + intel_display_from_d3cold(i915); + /* * On VLV/CHV display interrupts are part of the display * power well, so hpd is reinitialized from there. For diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index b1441a55d72d..21aa0e551898 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -33,10 +33,14 @@ void intel_display_driver_resume(struct drm_i915_private *i915); void intel_display_driver_resume_noirq(struct drm_i915_private *i915); void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915); void intel_display_driver_resume_nogem(struct intel_display *display); -void intel_display_driver_runtime_suspend(struct drm_i915_private *i915); -void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915); -void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915); -void intel_display_driver_runtime_resume(struct drm_i915_private *i915); +void intel_display_driver_runtime_suspend(struct drm_i915_private *i915, + bool d3cold_allowed); +void intel_display_driver_runtime_suspend_late(struct drm_i915_private *i915, + bool d3cold_allowed); +void intel_display_driver_runtime_resume_early(struct drm_i915_private *i915, + bool d3cold_allowed); +void intel_display_driver_runtime_resume(struct drm_i915_private *i915, + bool d3cold_allowed); void intel_display_driver_shutdown(struct drm_i915_private *i915); void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915); void intel_display_driver_shutdown_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index b3eaa55ebacb..719b1c21b695 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1402,7 +1402,7 @@ static int intel_runtime_suspend(struct device *kdev) for_each_gt(gt, dev_priv, i) intel_uncore_suspend(gt->uncore); - intel_display_driver_runtime_suspend(dev_priv); + intel_display_driver_runtime_suspend(dev_priv, false); ret = vlv_suspend_complete(dev_priv); if (ret) { @@ -1436,7 +1436,7 @@ static int intel_runtime_suspend(struct device *kdev) if (root_pdev) pci_d3cold_disable(root_pdev); - intel_display_driver_runtime_suspend_late(dev_priv); + intel_display_driver_runtime_suspend_late(dev_priv, false); assert_forcewakes_inactive(&dev_priv->uncore); @@ -1469,7 +1469,7 @@ static int intel_runtime_resume(struct device *kdev) drm_dbg(&dev_priv->drm, "Unclaimed access during suspend, bios?\n"); - intel_display_driver_runtime_resume_early(dev_priv); + intel_display_driver_runtime_resume_early(dev_priv, false); ret = vlv_resume_prepare(dev_priv, true); @@ -1487,7 +1487,7 @@ static int intel_runtime_resume(struct device *kdev) intel_pxp_runtime_resume(dev_priv->pxp); - intel_display_driver_runtime_resume_early(dev_priv); + intel_display_driver_runtime_resume_early(dev_priv, false); enable_rpm_wakeref_asserts(rpm); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index ab85c7fb217a..9a652292d988 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -283,36 +283,6 @@ static bool suspend_to_idle(void) return false; } -static void xe_display_to_d3cold(struct xe_device *xe) -{ - struct intel_display *display = &xe->display; - - /* We do a lot of poking in a lot of registers, make sure they work properly. */ - intel_power_domains_disable(xe); - - intel_hpd_cancel_work(xe); - - intel_opregion_suspend(display, PCI_D3cold); - - intel_dmc_suspend(display); -} - -static void xe_display_from_d3cold(struct xe_device *xe) -{ - struct intel_display *display = &xe->display; - - intel_dmc_resume(display); - - if (has_display(xe)) - drm_mode_config_reset(&xe->drm); - - intel_display_driver_init_hw(xe); - - intel_opregion_resume(display); - - intel_power_domains_enable(xe); -} - void xe_display_pm_suspend(struct xe_device *xe) { if (!xe->info.probe_display) @@ -413,10 +383,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) - xe_display_to_d3cold(xe); - else - intel_display_power_suspend(xe); + intel_display_driver_runtime_suspend(xe, xe->d3cold.allowed); } void xe_display_pm_runtime_suspend_late(struct xe_device *xe) @@ -424,12 +391,7 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) - intel_display_power_suspend_late(xe, false); - else - intel_opregion_notify_adapter(&xe->display, PCI_D1); - - intel_hpd_poll_enable(xe); + intel_display_driver_runtime_suspend_late(xe, xe->d3cold.allowed); } void xe_display_pm_runtime_resume_early(struct xe_device *xe) @@ -437,12 +399,7 @@ void xe_display_pm_runtime_resume_early(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) { - intel_display_power_resume_early(xe); - } else { - intel_opregion_notify_adapter(&xe->display, PCI_D0); - intel_display_power_resume(xe); - } + intel_display_driver_runtime_resume_early(xe, xe->d3cold.allowed); } void xe_display_pm_runtime_resume(struct xe_device *xe) @@ -450,12 +407,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) - xe_display_from_d3cold(xe); - - intel_hpd_init(xe); - intel_hpd_poll_disable(xe); - skl_watermark_ipc_update(xe); + intel_display_driver_runtime_resume(xe, xe->d3cold.allowed); } static void display_device_remove(struct drm_device *dev, void *arg)