From patchwork Thu Nov 14 20:22: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: 13875836 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 D85A9E6781F for ; Fri, 15 Nov 2024 02:53:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76D7D10E389; Fri, 15 Nov 2024 02:53:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jSWMc3wa"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id C15B310E2C4; Fri, 15 Nov 2024 02:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731639212; x=1763175212; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6p5z7mBfSXwDxO+xTa20zMJjZvEhbNssFnqmVcocnaA=; b=jSWMc3waVgb1cTfH/1Q5fvC6nkE3XY9ng7WDv2S9HIbklwOGMum/xfWr 6psGgiZ67ZoZaDuJxTOPfBLRCgL3Fb9MGff/896K6t/KIgwjxwUdfsEnf UroW97HY98MtJ7Uio3DevK/+lBhqA3wUKtLRLlTzoAjoFK96Vxc4RZ8SN emKIlcDt5JDE+JEvMgh12rfrf+rRVSDGiNf/AIXHT3HO4FOFRE4Y7SLbI lL9JI+7OIqEgfL2Su8psZNN+dbMZnJ2esBmhxEb70faiMG7A0C0tIqp33 MwtDtX+EZiwRSiuRpnkF8B9UJMBazd81Qmi1FSA353aW2duV1IbERSgvv Q==; X-CSE-ConnectionGUID: UOK2B4IEQyu4bNRpGj1qVw== X-CSE-MsgGUID: 2eyRFc10TO2cAGqv2w0bVA== X-IronPort-AV: E=McAfee;i="6700,10204,11256"; a="31773436" X-IronPort-AV: E=Sophos;i="6.12,155,1728975600"; d="scan'208";a="31773436" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2024 12:23:27 -0800 X-CSE-ConnectionGUID: kgshjgD2QFCFE53dg87DTA== X-CSE-MsgGUID: N449JEYHSiCLx6WgoQjvfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,154,1728975600"; d="scan'208";a="89091292" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Nov 2024 12:23:28 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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; Thu, 14 Nov 2024 12:23:26 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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; Thu, 14 Nov 2024 12:23:26 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.48) 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; Thu, 14 Nov 2024 12:23:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v7Ys3ZOVzt7EYc2WS8elKL0tBxx2amqlfDcABEj1+nIZ4IJ/Zw+KmLs8HGaah7awwqWNenUq97YFMuJehErEARx3Q9o5eGJC62iZ1qYUcFaErR207rmGaMJIPE6vY4tqYfJcdBvnA+dzb6wrsgy5oVuAFWOZ2PFjTtdc5VOi1GeYHgz+BN6Z6m72kBz5OIrHQf36a7+FvvwckukK1BY/Z4EuL3m1gC1xiaB3/lN2/LuwFtkZpyRIRR7eiw2SIsFTTa8St25h6t2Wk9FVqCxvpuyCsGf1msInuvoUrGAjYMgxW59jn6BfNxT65nVoOX/AdcJkjezRSiFMP0BwyM3u/g== 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=YxE2/+YC/OjN38uXDIL3T4DFB//TAhI5AVGCdQKc7JY=; b=VErMiRWQwNZMGjn7DXztsyrG4icPzV+9wlnttfnphv3oIKrmpS1pmOk4/yj2QHbNqS9SiEgExoT30HEedxlUNvOCkgeKdrcRCZgPJy0lpSdta+cHEZ74qwN7OQrgxb7GiuJGIq2WcwCiAqKxPPj2xDCPxxncJDtdn8ctcU6eS+Aw6k6HoXgHK6RJYC1bwa2XpzM8pbRAclhCVy51ZnpNFLrwaE7WPrzS9HHc620W/pWWJhOpl+M4EnCfUIeodqgasFCIRMiUs29qrm90Kg7uBams9Q0hO7I3WyfaQgIufzpV/H9DET0k/QsIiacWQVf1oZNvBz2ujsdd8bXW5mejaQ== 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 MW5PR11MB5859.namprd11.prod.outlook.com (2603:10b6:303:19e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Thu, 14 Nov 2024 20:23: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%7]) with mapi id 15.20.8114.020; Thu, 14 Nov 2024 20:23:03 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [PATCH 3/3] drm/xe: Use i915-display shutdown sequence directly Date: Thu, 14 Nov 2024 15:22:52 -0500 Message-ID: <20241114202252.239652-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241114202252.239652-1-rodrigo.vivi@intel.com> References: <20241114202252.239652-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4P223CA0023.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::28) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|MW5PR11MB5859:EE_ X-MS-Office365-Filtering-Correlation-Id: 5463d087-59fc-46ce-2819-08dd04ea2371 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: oRAkO5cjbKtJdoQEAi9uStK2MDVvMQcYUgFCHLcdm0nh5Vs3mPy5kuLDWSnDjd4aRXqKULdcNkt5X80Jm5ncn5SHLdVbnQr1d06zL5i9KaQndNC7ZkneHtB7RErEcXO/3f9q5GDNB/d4ZpGpCap3iz8kmU17BQJk5NFQl9rcFOKztXAzsJ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XrW9qG3fPyIWyMCp4oSv+I9EaeMDsMfWLD1ydTvQXdptT12ILFJsLaJT0fER8X7PiCadV2DLLwF17v 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: soLm7HaPxlJemZkGK4zeuDFDGvn4thKEBAgZBi/EitSiQVzLmBESZjGARrOX/+fk0trYvnOdjUjzMZLZDcAYV4D0PJue6jOQt2RhliTHLhbGBAn+aVinS6VgdDTOcKTsBVsXbO1HyOYwOgZbjcexDLf7bzaiyOFM3L7DL8HzHCgNRG7dEdlv4XedULTWJLgRBntSPLEINFcaXOaHZp45P9c12XMr9olQ2CFv8OpSDBTz/mqvRwzSasA6C+Y4spfTYfSwkd5l0aaQxp9NUwel9+WH3Lag8xXIRfrx+dlMjwl6Yh2n34UaWPKXMe7AwsQ3tcAiqpEseuPX4dfDz4XuyX9ow3BPzydEsb4GfemfTDSFKwm3dzi/CQDukgHHiCiVA4CxLhCFqQpoPRYgn4OKUbif/kyENvjb8awx95HX/4/YMU5Z7AudWz5TOUf8tMYYO8qCpxyETn3Y7bvZjOEoJTZtHocPYfjCIipbrJDc+YnDm5ed0CnoofDNobFflGZ0OkCg2kKP9sG7GHkOMDeUqW8TNuy0dHi3SgzJylDg/XKJCre69037DbYvOuOJPD4HbRawKKcCbUqltR3DtkXtf0bZqpdggIP3aBbDE0+VTg+f9g3+9Ccrd9qzzZ39lsGywDBIoSGEPcRVK7wjV49nQgKQWzBEFVCPZtw5I2NZKYZg4Oiq9gDEZFt0OcBE0QMZJh9zCnVozWGB6zXzqP20ZcRfvebcjJR28E97damXM3tuWJ2uc3WSyCSt4il4Ezhdag7puOwA36J4vHH/AP6s6nRewNiz2eClwuPclnvS2I4HZkSGUgSX6R85W5k+q95oluvqETi+OUdW3TxkpmdEoiL7LUrEghDUv8zOOKzU/ELvqovAUtyAHOEYyJYLMKgFSxz/aem85iEWWAtcPlTssTswohxP+IkgZGnRNjFlp5CcpLXUEEw5Lt2+U2MaFJu7FBOcF/iv4fXd9+itXwhxWDX40CKRN55IC4VwzcKHpw6a0mAUlJJxRL0oV8Yoyku5HXdcFPmDnxlMtAZPjvbrooNvH8hJCSjoL90N0xOtz1q/cHg9kBuniH7sx/miax3wO+kM61PiJ8ViMwmKJmAz4D9GLhjX59bd4UaUGLI95dZh70KB84WdfxdBKt3dEKX8jwOWFB00JvhBR2d/iifhlc5azVYbB5+rhqwXuuQMDmkYnag4G0fymizwDrm+dl5W+G7pmZZAryRE5IQaPdw89hRCCUZfrUb3LdOSqQpdb03Y7Y1y0lk4HxQA/m+63tOP9oBLPEOAYzl1fQF4RkYr9Cku4EMU+VJjmj+/m1vlHnweLrq4Szc3FP9YprtVsDu7FD78A526f7WNKnSIUnoY22OdZilIhGam3427MEQV9qTVrSzEFzLpcEpFt3WLnzjqZcSTv3XtKc656lBm6gAnG8tbR5Pe8uN6UHXTGnpeBjWTOuMTr4J2Hb8z92gHdKxk4ZrY2Zs+9NjLd6W7XCWqlBRPRUMSnmPu+7mcRtl3uGIWPVmXhiOBWPxIX2r+NFLW3IysTJYVfxEeZqu9/m4W0YuPh7G8++5m6/qDLMBKJtw1ORvJRG5HiVDv/zKzoBhoh/uRH1XERJWY6Uy9mshA1g== X-MS-Exchange-CrossTenant-Network-Message-Id: 5463d087-59fc-46ce-2819-08dd04ea2371 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 20:23:03.4140 (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: TG+x1E6b1senreQte4DoNa0ak2sGijCPX1pk54ZKymsyg9GIRN3SDMOOrXytUkPtFLSA/2FKvOLMNlD7KUGpUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5859 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. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- 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 4759c3cf5915..29676652bc54 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 @@ -357,32 +356,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) @@ -408,19 +401,6 @@ void xe_display_pm_suspend_late(struct xe_device *xe) intel_display_power_suspend_late(xe, s2idle); } -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 0e2dd691bdae..f4ae8e11ac53 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -819,10 +819,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);