From patchwork Wed Jan 22 10:40:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13947145 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 E8DDFC02181 for ; Wed, 22 Jan 2025 10:41:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B87210E6B3; Wed, 22 Jan 2025 10:41:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gpY5gsx2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C82910E6B2; Wed, 22 Jan 2025 10:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737542463; x=1769078463; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=Xawiwuvq2b5yj52SboPw/BwdEXUOXGJj0rIKLjgTM+E=; b=gpY5gsx2n0P5ZW1yavQ/Lr5/17uhoK+NKv3l6+OYLppiovpGkoRHfYD9 5yQkwqM4euWkyV/Ybyo3UYpHWFv8eaUqB5m4PV3HinXTGq0eHWKmXI4ZO CEje1iNXNc2S0dvUcbGeKeEnJku4pKBRMHGOSAcfALZNZzjEIRoKrln39 glQNAt4LQnyjyRMX85kfQ+fH7Zf4rBOcSA8eKgUOlPcylBb6YD0FnKNPz Fv1BjWsjjjCVQnxh1Anhalovc0McopZda0uskZCHD5H0JSmTLPLuepSk8 57inuz6dJNSZYYqzoXaRwKOm4I+M86V5O7JcIAmOPm8em0QjYePpzqeUS g==; X-CSE-ConnectionGUID: MwgeUX7xTNOr3sYLBFymRg== X-CSE-MsgGUID: wuPpEI6lS9S5bd1uiqn50w== X-IronPort-AV: E=McAfee;i="6700,10204,11322"; a="41665607" X-IronPort-AV: E=Sophos;i="6.13,225,1732608000"; d="scan'208";a="41665607" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2025 02:41:02 -0800 X-CSE-ConnectionGUID: NGMaAGhaQs68cRprdJy4kw== X-CSE-MsgGUID: kNAHaagbSeq9bMc49fv+6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="106969742" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Jan 2025 02:41:02 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.44; Wed, 22 Jan 2025 02:41:01 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.44 via Frontend Transport; Wed, 22 Jan 2025 02:41:01 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.44; Wed, 22 Jan 2025 02:41:00 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xu6RWSh4DY+RF/KMuYfQjQEzNpeWG5Ct50xgPtEgG2jiDOg5/6IrKVtSscfozaXj1yrgUMAzddkeC+T+dL1UWIiF/fMFj8mJ1cLjxrpfAzQz7vsVw1dA2XY6SZNAgN2E1v0vhZaQWw2ah2biNsVHO+TeTuLIYrvcsusnedYDtddJNCrJ6LeXd5cbzPUZOZYppU3Q7oqwRo6aU7u9XiIz+efPPuKA2ZeZu9HzziiXLY6lZ54X5CiUo8WHekW10QLXYZtV41QKyt0z0caWwpV1t6u5YRtmA/gxGu9Pcrf5QuDhB97/3oc6tn8memfVXLX2xFQYM1Xc0v3eGsKvpbYTng== 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=4lazWRPouSf7h57T+rlwl8nGji1xFcOv5kwHDEisxpk=; b=r4He0qHBfxf5STP9d//jGrNC6Na0EBP1Z2hElK9QTklgG7fPTz9gECnB6KUQEb7pUlbLyZTE2VqsKQ3252SHbKWkADrJN0c6ALS+WA0tuzME/ViU7/iptznE+SOep5pJdbx1LNKUQExWAs3BGHuquWkak8O/2283MD06LWVAydUs+h3/DpmHXl8H3eUtnvSKpQfz5z4F6TS+zKG+Kd2DUnAZhRo/Bzq3P3OsN3ACCpppIHq32m2ymQ+WNegWunUMDDEQ6obt1rsezwZT6GFJ6tJCjLfUwEnWOdtcjrM/lR1agbjtCfypHzLnNkmeVJktdXkeKV0qIksfTMlfErdMcg== 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 PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) by CYXPR11MB8663.namprd11.prod.outlook.com (2603:10b6:930:da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Wed, 22 Jan 2025 10:40:53 +0000 Received: from PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc]) by PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc%6]) with mapi id 15.20.8356.020; Wed, 22 Jan 2025 10:40:53 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Imre Deak , Jonathan Cavitt Subject: [PATCH 1/3] drm/i915/display: Move shutdown sequences under display driver Date: Wed, 22 Jan 2025 05:40:47 -0500 Message-ID: <20250122104049.388340-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 X-ClientProxiedBy: MW4PR04CA0060.namprd04.prod.outlook.com (2603:10b6:303:6a::35) To PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7SPRMB0046:EE_|CYXPR11MB8663:EE_ X-MS-Office365-Filtering-Correlation-Id: 39f88b86-60a2-494c-ec52-08dd3ad13ec0 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: gE9u6w5Vm8VSJ1zqNuTKdEv+x7GwaganzeKAFxP0mvab9yERfYhyxQce9xATG8ekAwB/C/jEZrXf0EvzZmiJH7JpXc8Kd7tCAEtMCeir0UswVHBcpUYuFhRSrUymXzQxsdVGGZB8MdnL32/XPzeRkLscIt1yu7cPFZO9ZJkaaNE02axIcBpJziBPuqQpsJpnpnGHtzvQMTdlh8cWJ0E9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QOPIm2XPXzmeiD+TcjAGdGVZW2a6aXxPlvnVskkQayaBDWDtxNAyK8sUjmdchUFFkA6UVRyKMcu5c/v6mn19kKl9Fr2Rpg+unPSOkxuLdcmXvSItdacn6b3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7SPRMB0046.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: l7FkRU7NKwiXnQhYrK1a4uKipbdZTt+UY1rB1JQ3uFhhkovcmR2azO4LKe/cGokZWWDnL+Aokd0VLSf6fyaiE/FwfI6PgkKWLj64wcMrjM4wtq5FNatWHqs704Cy2Tqlit3Lrqj9za53uYzTAw/UEBF7EHSuFT1rUhoYls2J1bgrLV/vx67xyjMlP1UxEczIuYDQvxdOUOS++DIxFoDqI98d6cUkrakDB7bd/2i+D7ukF35kl5uhOc7BvV7auIYY7dCLwTsSfN84+RkmfPUvL7ulKVDD4jmmCxbQS+80UYUoGzofQYJxMv31H2ZJ0c+vdcOodMXPrcBz3+h0b9KetzCBXqVuuxembV1PMy38W+4SUF4MspTOaKCHwKyxeXt3mO5jl6auj254GDZTD/AwKqYnm0JRV98zTQkaA6/RKLuyuZ7fZCH++inNBybWg0VAQ6prlVJJOdnb9czX2sI+T5vZ1idRoX/Q9yhxLWA+HJz3IgNI1Pv00TE4XviN6L8YeRpxQj0Da1lXc7yMfai/sZbm1kK0+Ny6H9T1azn5ZESf/pSjnlkgg40ww6xmbRIrE1ySYnmHI2R4RAe3w44/oj8SLZbKdiFxRCdm3W9Fhk7pT1HlMHSP4hDiHBZS2XJFoV0ycN2lWsprEDB9S4ZKn+3qy3xxBphTNSJ3TNk2K1VQI+OILZYkY5C2wqSESOTekIY7invib76rbRNuUkalb+wZvLV90sij3E0Q66XKYT3RRgOx6ezEEtWCR/TqYAMIEk0C20Xenm0o42ID+4ggkbtAeZrfWJ/1zjZJMEN5w3zrZsIZ43i2v+AoDe19HnHIv7+cAA6OewkPaxpJYBPpuZgHWpMNFr5EtgA0o1NDBVSFTK9DuT4gFF2UobEssOzTHcPwSOWcoa8xNF9v3uhpy7S0WPZ4SBYhugqsZ4HxBTHKb8qi9QrXCXOV0Ig3UhwtjWQpjwHij+C/+NNJthBJfCZzsTZ/0Bqwn8YlHSOAKi9txp4c/gFRGOI6FjdcAxltSphcY9XyRUxaBbBmt9MWUofvGus22Lf+MmPRKWOdQlBRzEkOE+u09iyXvt/fSR6MN94dR3Joodct9LSny3fGrGDom31DRYk2Fkean3/NmuFgsrz+tyd5kadXH9I0dP48Tbh/+s4J8u9INfV/6v9By34okZm6Azu3NWOOKFERyhhvf01VBuGWQlJsGdaMuG5sA4O6ytw3jgTLBasu9chb3e+qxQDirRP5FywkcMGcbGAhRuM+S/H8xzzaWTcEFg+/YjAAnpoTSY+UXiCx8MKwni6OJryK2SKshLJJYFS/9hPjLTDibt6UHdLgnHFKrDuPiRly4I36Wx3puyVunE3t0Ibuw9AS8xj8cK8O5hAnNXgwzNNkPBGV8FFGUsSLgqWUx6cB9jiBnFsNo3dCzEjBA3f3tOaalrue9SQrgTQHqIeA/RVGqxiNVWHpxgOw7x0Ubm3ficbmO5JY7VnwzX3OEBcxakcw+Kn6waiHjihrxqR0g70zjgV7TLw7eT/5FY0iNx//6J0WPP16pWhUIbP68BvAZoxhDUeFzD6TRz6EsaqkYOtj/BuG3FL86Tp3zfu4EX6vqlf3l1tSYoIh5VEzaw== X-MS-Exchange-CrossTenant-Network-Message-Id: 39f88b86-60a2-494c-ec52-08dd3ad13ec0 X-MS-Exchange-CrossTenant-AuthSource: PH7SPRMB0046.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 10:40:53.3852 (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: Jh6jFfNfDs9BoYz/sjns6tzZeu6NPlm13lAQieVuLb+aiLG0Doj4gmPqVplLwjc2aVRkzrPjNGeMBp79VTGAqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8663 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. v2: - Add missing _nogem caller (Imre) - Fix comment style (Jonathan) v3: rebase v4: amend build fix Cc: Imre Deak Reviewed-by: Jonathan Cavitt #v1 Signed-off-by: Rodrigo Vivi --- .../drm/i915/display/intel_display_driver.c | 42 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 3 ++ drivers/gpu/drm/i915/i915_driver.c | 27 ++---------- 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 73ea0e906014..122174cb5c0f 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" @@ -769,3 +770,44 @@ void intel_display_driver_resume(struct intel_display *display) if (state) drm_atomic_state_put(state); } + +void intel_display_driver_shutdown(struct intel_display *display) +{ + intel_power_domains_disable(display); + + intel_fbdev_set_suspend(display->drm, FBINFO_STATE_SUSPENDED, true); + if (HAS_DISPLAY(display)) { + drm_kms_helper_poll_disable(display->drm); + intel_display_driver_disable_user_access(display); + + drm_atomic_helper_shutdown(display->drm); + } + + intel_dp_mst_suspend(display); +} + +void intel_display_driver_shutdown_noirq(struct intel_display *display) +{ + struct drm_i915_private *i915 = to_i915(display->drm); + + intel_hpd_cancel_work(i915); + + if (HAS_DISPLAY(display)) + intel_display_driver_suspend_access(display); + + intel_encoder_suspend_all(display); + intel_encoder_shutdown_all(display); + + intel_dmc_suspend(display); +} + +void intel_display_driver_shutdown_nogem(struct intel_display *display) +{ + /* + * 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(display); +} diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 2966ff91b219..f155a43e2377 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 intel_display *display); void intel_display_driver_unregister(struct intel_display *display); int intel_display_driver_suspend(struct intel_display *display); void intel_display_driver_resume(struct intel_display *display); +void intel_display_driver_shutdown(struct intel_display *display); +void intel_display_driver_shutdown_noirq(struct intel_display *display); +void intel_display_driver_shutdown_nogem(struct intel_display *display); /* interface for intel_display_reset.c */ int __intel_display_driver_resume(struct intel_display *display, diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index c2ae37d6b94d..cb7453393a21 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -971,43 +971,24 @@ 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(display); - - 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(display); - - drm_atomic_helper_shutdown(&i915->drm); - } - intel_dp_mst_suspend(display); + intel_display_driver_shutdown(display); intel_irq_suspend(i915); - intel_hpd_cancel_work(i915); - if (HAS_DISPLAY(i915)) - intel_display_driver_suspend_access(display); - - intel_encoder_suspend_all(&i915->display); - intel_encoder_shutdown_all(&i915->display); - - intel_dmc_suspend(&i915->display); + intel_display_driver_shutdown_noirq(display); 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: * - 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(display); + intel_display_driver_shutdown_nogem(display); + enable_rpm_wakeref_asserts(&i915->runtime_pm); intel_runtime_pm_driver_last_release(&i915->runtime_pm); From patchwork Wed Jan 22 10:40:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13947146 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 3EE31C0218D for ; Wed, 22 Jan 2025 10:41:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5E8810E6B7; Wed, 22 Jan 2025 10:41:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CFkUMvIs"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8C0810E6B4; Wed, 22 Jan 2025 10:41: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=1737542464; x=1769078464; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6taVNAiODYm6hin2U8bpfDNrm7BlrEkq+T8O6QeG6ho=; b=CFkUMvIs1f5+Mb28s79TTz+ETICQetVKR6d/WxaCbnNqpo3rzIhWNbl7 vdJ1inpJ1Nk//RQ4ytxLDJ/nFBypWksHvnJNHudTYSz20TJdSDqvDGY7w qZwxgpQNNMfkP/dtawvSDEgkPkb3BsfYhEgH7t+ynwURS/SQs2xfgutIC gbq4Q8dqocR6IfeNBTjh5kxpuVOlir9c1MeXyWIynERHT2ldmNw3jTxvD 6n4aQ1f0F8gdnihBg1cYV31T8/mrEOxnWTjb/V3caoG85k4B16yycpq03 WnN79G3uznLfBRy3+xd2AXI9douIWsEf4MovPXCOt/Z8syavnGBi9CxtV A==; X-CSE-ConnectionGUID: lLrs4XKwSWKY3PpwPFtjMw== X-CSE-MsgGUID: g428DlMOReKgpRZp00TzBg== X-IronPort-AV: E=McAfee;i="6700,10204,11322"; a="41665611" X-IronPort-AV: E=Sophos;i="6.13,225,1732608000"; d="scan'208";a="41665611" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2025 02:41:04 -0800 X-CSE-ConnectionGUID: 8yvpfk5aTnSyLcbwJPwYQQ== X-CSE-MsgGUID: rL3IbGWESQKDWer5FKuz9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="106969748" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Jan 2025 02:41:03 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.44; Wed, 22 Jan 2025 02:41:03 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.44 via Frontend Transport; Wed, 22 Jan 2025 02:41:03 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.44; Wed, 22 Jan 2025 02:41:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UpNw0291lSqOM6dXll+lKXNL7VqfnF+lreAnRuAAYDs3l5eUu0vpkYq21hKHOBxJVOYGZ1aDnsmEA3OPFrnvFIqD0CYL+PA4WPX8atuqqEnfNYfqRD7F6KRBq9eB5rxH5fvtvf936xgxO6+vPYaIB/YWlP+lZ2h29hLPkrhPUtroOWw84WaCE5OqNOmRL05kDNDQ0K/6vnx+uPiPpQJGtl5FJfxgFC6INsXUiRzuZDg3Uyu+HplPzZzrrda3qK22RYiBkZAmTQrpXK9H5CJYrD6icL8DTDKsw3wso3GuvxWiqzHbYBJUd9+xdYlxaRTv8pAufAfdky3+0hiVRFoM3g== 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=qSrvV3Ael2jglMyhlhqRd5HktjF9IpJWzDLrO8TJ8iQ=; b=SJCkkonZyXmk8BUo2RsW7fGxa+Y3KEHKuua4y/r6w3ofvLz5CX6yJauB6Sktoz9QSzmBM4GKJEwupnJCSLz1vXf/6VhuZA90YtCWhBZSoOx+QoRdVZLZBscXZ+MaDi0y5re64gfDynTERcLvhN5g50E/pHYqkaYplmcxiqhAz8CmkbWF1W8pf1ZcmH/il1SD6gfGcSl+Fuvvvhb1+TzNohcxgai51TP8/lSKMVJWyeWqyjaqcUinkId2FIM96GQh5pBkwyszrB3Pa7uDvswRadp0irBNBF3kjn2GqaKYVZUqZAOinVRIhabGuxvoXQ4yWUT+lwxYGcPmwTtD0wXB5g== 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 PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) by CYXPR11MB8663.namprd11.prod.outlook.com (2603:10b6:930:da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Wed, 22 Jan 2025 10:40:56 +0000 Received: from PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc]) by PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc%6]) with mapi id 15.20.8356.020; Wed, 22 Jan 2025 10:40:56 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Maarten Lankhort , Jonathan Cavitt Subject: [PATCH 2/3] drm/xe: At shutdown disable commit helpers instead of flushing Date: Wed, 22 Jan 2025 05:40:48 -0500 Message-ID: <20250122104049.388340-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250122104049.388340-1-rodrigo.vivi@intel.com> References: <20250122104049.388340-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR06CA0030.namprd06.prod.outlook.com (2603:10b6:303:2a::35) To PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7SPRMB0046:EE_|CYXPR11MB8663:EE_ X-MS-Office365-Filtering-Correlation-Id: dc1ab8a6-7e2c-48ec-6b3a-08dd3ad1406d 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: ia6wXMG4qNALhJK9mTibsRYut7xfdboQvLZ+UKt86jcoRFBhcuh5IqAwpQMY6du7NeB/nrg/iPjLoJBLl3YiwvqFmlVmwHIdnxub9YUCsUYVIkVcPPOFwCHDWyA83WyFf3T20C2dSMMP1VxzPmKSlIoV6V0DXFVjuIS8XSmC7BDzOuxqA8Q172TOzIc1b5UyVDyaDn4iGJsah5kmVi+6J0QsHae2X9XgdFCxrYZemTz9aSsZBfAttGrMvMWocTp0gtkLjBAq4NJ5VNoV4zxXqbmH2zx181MM/zpfswngLKG524F7I8JXSY13LmTfwGKI3pnLKFumrTkAtw8O9Sb07gl4yV94CNGROQuWWO25UN565okSuP/8CU2p2cAMbxtQxMwq3bDkpJNKjUIOjhlzszqGe7qsnroJ3uPrnd0V9HLY3A7RxOHw9GIBXImG+V9jnpA9822xFRwLtp1nJX4mrHgStr3C0pQSVYtZo8+3hqMPKiLtsEEPoJV4QAsc9Zn8sgGum/Zgy4Hv/uV/+y6qYF5e3dN6+IRhCtp19GMlY9S5nGRMu3UvmavUznM7FrQZYyCi/PZ2rXs9aPyPEy8DPXbxAGYwHQ9jcXt121Fvov962GyQKCPpjxpIxym/5QTXSm7pwlybcMh454QYqgcoHdBRXm1lw7/VW3KoJHwTHHBZXzqLS+ysn7Rgo5RiXI+YK7mtZx84EBvHEAmN+rcBFWQGdPcm9X6HsoWMxoel2mxGyGwgk1syMJtcsv2WytRU3ZTvndnYMXWJIulsOCpvBXWSmQj7xCfcJFruIG7THndEtPmwRPPkyyCc1vSgod9ofDuB6VVu2XSmg8/So4R+BIY0DwZjP+xvoEFCp5Sh4AOKVnn1wb73K5wNKRysNhetLXhnE93COoSSuxjKeI6OJ2m7dmT3zosd+bOcouNAC5IlpmtBR2peb5MK6FJAFETGM/TySx1ulASxKVD3NJd0KlJle3EiSgEskWAqsKJk9gjmMNxta6Z7vjXaG9FrvQW/dHzQKtplV3BHF7tU+l1mdH80Ff7NsFlL++3ZxuM8YW6DxvSiYKQqQrHYnu2FwKOHZJ3Ba6pUtJiDrx3P8gYqbDuOr36E/dpPu2rd5s2iEn9IXfonBQhSOMvIYWeOdaMuXcDLsIElkVevWMFaibpjHbJOAIJ/3Ey0yXTPlO420rr4UIzDA0dz4aZo6zm9Pnpc0TTCilyVBGnv8GpweKI5aJsgDnA3caokDaP7bo95jX8PAVd5DYxfuKa0m7A37TGPstnxfhsmAssnaAPgZCKqYunCmBWeXpJ77TdBaCvxLrDlhmhEEhQgVCrWK/ReikcaGjd2/g0QtDfPHtydTXxDVQ9I6U5Uoxz1r1yuMNzU24UQ85dBFpDeQaa5ZiLX+kLo X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7SPRMB0046.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: SreFtsiM1NawycdR0Q1bDpmpXTWzJTzhEep/9lOWmXMkq1+Qpk0SwVhF6bNVBdgzSBEef7kgkN5C0Wj/33q4NvHbEjp7zSiMk2Bli1mHqq693JlISLJ55eV+BfGT5ZS26bA92jRt5mBl2fHKSWbtdRp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/VMTUvYxnxYlwzFdTF9DFkr19GTaqaaXwDxyaaA2iPeVJpjjkKL99MNyfuxy47D1Zpwq4K3RtW1ajUROyZ7b25WrA2rocXkKrJKVxw6hyMp6YubYd68rUg86MWJ9PaZpNhMkPJzDZk3x5q7gAU3b4VJeC5+Z9buIvnvUvRg3iGGO3bDhwyApMyeUTwEA/l97NlfpvoMZi6fRyx3/EMN+O0RUMN+Z4fFkR9/X5Jw5VttG0pQ11WIEDT2Aua9YJyq9pfYAXAibM9rs7YjPdNmBhbIo60jdIGqDb7nI8Gdrr46Wi1q2ZlwsEebeS/hOb4A9ndEB0Wsw4pEnVBVyHFpksMIIIjpJo86wSsPrPrO3Q6ttAABqKJZMfw+NO18mqougpGNY3meA== X-MS-Exchange-CrossTenant-Network-Message-Id: dc1ab8a6-7e2c-48ec-6b3a-08dd3ad1406d X-MS-Exchange-CrossTenant-AuthSource: PH7SPRMB0046.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 10:40:56.0815 (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: EceH4y4q3r3PQzz5/fi8uGvjfS8HF6OUJ9k9KySbfJ+PuOqdT/nH4BYJnW5vWCx7eXHMn8d61Dh5JTNEGFL8hg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8663 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 Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- 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 96ba9595bf2a..4f60d7bd7742 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 @@ -378,10 +379,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(display); - intel_display_driver_suspend(display); + + drm_atomic_helper_shutdown(display->drm); } - xe_display_flush_cleanup_work(xe); intel_dp_mst_suspend(display); intel_hpd_cancel_work(xe); From patchwork Wed Jan 22 10:40:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13947147 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 7C460C02181 for ; Wed, 22 Jan 2025 10:41:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21D2810E6B8; Wed, 22 Jan 2025 10:41:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IjqcMHIm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04E9910E6B8; Wed, 22 Jan 2025 10:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737542466; x=1769078466; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=zLL1Xp9ynLTjxER4c4jtKVQhns5mvqXaZV3wMD5TjmI=; b=IjqcMHImY3esnFpxLLYxrXSQsdobDgKoAUVuoPtUukHR7ByM2IsOUNZv JJyBCU9G7xdX0wem28ehR63Gu5fGFbGYOv85cafjnp/ZA5ubHfqBc1PBO 20tMS8seFn3KUxVL4l6GlbZmRyCEZCDADVo6e6eejiHcoNibFOOv/YSFP bBunCNt2SWwj574S+K2tk5JbdVdc+4v9C3kAV8XjavU9LU51UkHdqIXbT RnmTRE9ZBfh0dB6Cprq41pg8hJtnPG2BY/7YU5Z0ylgQ1VCB35rwky5B6 Zv77N4XQykDpcIVFzrCiNmjy5C8zALTwjbNMEtGeLW4SXxslX/K9eJQpP w==; X-CSE-ConnectionGUID: VhifbBmJTI+cvsgTde2FCA== X-CSE-MsgGUID: mOpv7BTVRdquT791/3s05Q== X-IronPort-AV: E=McAfee;i="6700,10204,11322"; a="41665622" X-IronPort-AV: E=Sophos;i="6.13,225,1732608000"; d="scan'208";a="41665622" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2025 02:41:06 -0800 X-CSE-ConnectionGUID: tyI7s6cqQJSnz3achr4gig== X-CSE-MsgGUID: M8WCHy2fTHCHxLVd5DOPxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="106969759" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Jan 2025 02:41:05 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.44; Wed, 22 Jan 2025 02:41:05 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.44 via Frontend Transport; Wed, 22 Jan 2025 02:41:05 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.44; Wed, 22 Jan 2025 02:41:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NljdOBOM1NiAV8cbhMib16quIHzP2S6mpz36B1FhWjbJYXMCvxmFHD520Qf3ZFGq3QV1YjsBB2bzM+HTfPRoL9gTDuKm1lOgFOkyfIVyrRrYThp+fGiiXGjANqKbZg9nUDPqMJjMSls3eca9EGLuPjjEpmgDPmipNclfvJxYcS07ovire0hwTOzbYM/rh6nR7CNjK4rFetsUvrNf/HPwqXK0cxTNQhIhD4yAsahJB0NyVYAB+LyoQfWJAyRSzBi+IssSUS7y5N2Y2/Cf1uFGyQOhrjhs8bEQrMVL8IEYxNgWCnymexWkS4VgLwcqm940ylWiI+OYUyCQg2T1wK3AaQ== 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=5zp+9RYfbZgaDRagAW4uZwaxRskf5CAYnNqiK0nLrIY=; b=nOJB6uv+DOew49ZnPcAKeLsfZgBSi5vSgHBBk2Bx4AhSuHeGUDvKNdynLQ+f9hvpHm2FtGqaPaf4XpuHplDjShasQYuQcE71jzGCF8QIkpVQc4ymCIhfNmYTOp0umfMjHOkdsY6dqSNiS2B79d0/j2VE/LGcXlq3YQlo1Tb1Yexfdi3p0aM6A6gc3vt9hMKr1fb7dMCpFMZjAxV33EYn3wEYm4x2tsuUqtvtX6eAYNfltH7oIBVRBeGfQEKXh4C8zGUIiBUOupJq0H/wkDpSTqb2A5VHhTQEj4Kit0w4gX8W+93vJhvmU6vYCGRDeY3x2pOVdlpIUmlE8u4cpwoOfQ== 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 PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) by CYXPR11MB8663.namprd11.prod.outlook.com (2603:10b6:930:da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Wed, 22 Jan 2025 10:40:59 +0000 Received: from PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc]) by PH7SPRMB0046.namprd11.prod.outlook.com ([fe80::5088:3f5b:9a15:61dc%6]) with mapi id 15.20.8356.020; Wed, 22 Jan 2025 10:40:58 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [PATCH 3/3] drm/xe: Use i915-display shutdown sequence directly Date: Wed, 22 Jan 2025 05:40:49 -0500 Message-ID: <20250122104049.388340-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250122104049.388340-1-rodrigo.vivi@intel.com> References: <20250122104049.388340-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0090.namprd03.prod.outlook.com (2603:10b6:303:b6::35) To PH7SPRMB0046.namprd11.prod.outlook.com (2603:10b6:510:1f6::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7SPRMB0046:EE_|CYXPR11MB8663:EE_ X-MS-Office365-Filtering-Correlation-Id: d3f20c39-2cb5-4e0c-9b05-08dd3ad1420d 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: 9u0lBAVIQctWx1Ni311iYwlFGgdE7jVumXWAEnT1aFdxr+GeWm1RjC/P5Y+/CjEO12RxhKQwbN5BAUmsfKYRq+8P/2eYfpAKJjTUJEJcuDETSFVaef5Ze0HEa0NNc2wqDLAoSI6xLypxnlr6nQcG3YETtGdlAAIfMtU4XpeivQBzwHcVvnXCfXPPH9eTMFOIcvg0BZEZX2kZulzvq6bNmlojnobeUaYk3p7KeoeB2h/0KGgzNjg3fNW8W+vrHqEMo4hzI8AZ2p4cqdgzRmC0LLOAwRTqw66upb0hdiAk2neawq16wXnEK9dr7avu7mTQC98jWMWEdcpdk2m51SepEnTj9Q2/X+klll2X8J8AFpswLXEv4L5PxA3uJCUe2C3DX6MRBcg/ljT0t8DewfaNYc1EHv8fxnfKo0dxYzR4IjYtQdF1tMAJQyzIxuRrfldiZNlFv+62WvapfTdHlVAStaWDIbJM1RoSX1v3wxRI789whS/cpyKerFIP9VWPV5NtC1sZkImcij9PVHKIFtXSKqRjANtZFHaahcxhWIOnTtlMKhafhp5B8QAG672fF/3w4JCB/zHktIlhL7gBgiX3Lpe0wTWOhOuRMzBoys41i1tecl/weN5qWugMEnsqfjVDcMqZW8XpNgZ+f54cYCtN7839a4sCAc+m7PTiFf5J0s4Yux5TnjtyswiZOi6C4Ah0YMiVbEdVIRB1linGv3qRcrtpJl7sfrQYZedZzkCi96tcLG25XOJIHZ2ypxRStjSG0zQw9PLTBWQ/NgaoqYSGsiPtCvCYGpbc1CF/H2ra+yLuz7hvocZRjgmb5QEGKGYOADgnLb4cv0qSXhpRD4qfkN/E53crhDEePV+ZM2ZXL/3pGA7RGgpwgGRCjcj/KkZTxiBBYAYeIkjTIEODFFXwDCM2QhhcHaIYWS9G8lxH+50rBjmYwIPvH5GDfoX19q/1Xbw2cV/fNiyjC+egyaGsyuQoNDRQIIjBl60lngRll087WFCkfg7GrgZdH3Cf7IRl1bTqOq0Jt1XYCimZ2KqcglMAnDnMviAXAMjYdVIEFKf1ObXSkqYRDDbckHgKo81vwwN3EhrEpCDu3N6Dt4E5nnO3YTN1IR7W29wxJlnxd4ugEpG/eckFW71VLt7WWUuPCZpUgIFdZQIKnhCRe4eCVaU5b82wGhCpi2N8V2DdAOjiMLA7RdEWFiW6SnHvdXoMqEea3BP8+zg76UdvOFjHZ19oU+2t3IP2cpznQAo9PRNh+uSv9oHL8qK9rpgiJHKIl3iiVohOEwRagBzIu8MLXU3Tu/InHsQ2015XDKPkzVrs3YAzsv/S2KxLkIAxZXax1kH6dEuPvB5Z/h0fEIKGlonH8HdB8qpnXm75w6nHO0Lt/R2eF3yGl0AriWshqULw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:vi; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7SPRMB0046.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: vn6U0uqZ7UWiNLOGuQ2M/Js1OZussLindWPzkwwm3ncM+aDrjzJ9HP9wROsnSIPDra0DBVTCFXR045d0F9ejiiz5+JlJOuoPDJWt6oTpwbE0mXYkOr5ENMKcsZP4q/eBbd3zP9b0Y3Oowt6N6mJ0ie+JAjctPETBLdgOlGTEnDA8JN7vE8Nzoq1PTHAUJuA9lKYHIFb5Rpw4lvY9eTy1eB2mkdS0I1fawDJo8sYjpweEhe32cTMBWSwzwBdK9aDMvySSDi4P8wlqpG4v0GW9eMC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nMHK/N3ea32KfQSiqOL+Bui7YTEd+/s4N5m3BVY6mlD958vRObRM/V/Ss4cyKAJ3kGek4JcBzneEVCYbiVDAw4hnr8ebu2LhHJTvhZoJxg1XMbcofGDxRkvWa0OZOOl+hXVhJL0nM3ysafanslT/TpQAq+izV070ps3GiegrFzbD2HAy4+mAP/0eLkzf7j6BggDTMfpAUgI0dioqmNTd6iTfPvCqCcgL4RVjOE6ggEeeBN3aILEK03q/x3LMik3w== X-MS-Exchange-CrossTenant-Network-Message-Id: d3f20c39-2cb5-4e0c-9b05-08dd3ad1420d X-MS-Exchange-CrossTenant-AuthSource: PH7SPRMB0046.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2025 10:40:58.8897 (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: FI9ANnUgllbkASV9oZcDlKwoaGEaH56BJ+DtCsUlBmzvo4KaA+cTDJA+/FrgXQZY6Bs2jPeJxYiP+Vq2kO3w3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8663 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. v2: include the stubs for !CONFIG_DRM_XE_DISPLAY (Kunit) Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/display/xe_display.c | 48 +++++++------------------ drivers/gpu/drm/xe/display/xe_display.h | 10 +++--- drivers/gpu/drm/xe/xe_device.c | 4 ++- 3 files changed, 22 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 4f60d7bd7742..e1ce9eb3332d 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 @@ -369,32 +368,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(display); - 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(display); - - drm_atomic_helper_shutdown(display->drm); - } - - intel_dp_mst_suspend(display); - intel_hpd_cancel_work(xe); + intel_display_driver_shutdown(&xe->display); +} - if (has_display(xe)) - intel_display_driver_suspend_access(display); +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->display); +} - 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->display); } void xe_display_pm_runtime_suspend(struct xe_device *xe) @@ -439,21 +432,6 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe) intel_dmc_wl_flush_release_work(display); } -void xe_display_pm_shutdown_late(struct xe_device *xe) -{ - struct intel_display *display = &xe->display; - - 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(display); -} - void xe_display_pm_resume_early(struct xe_device *xe) { struct intel_display *display = &xe->display; diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h index 233f81a26c25..a15ec29b862b 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); @@ -69,9 +70,10 @@ static inline void xe_display_irq_reset(struct xe_device *xe) {} static inline void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt) {} static inline void xe_display_pm_suspend(struct xe_device *xe) {} -static inline void xe_display_pm_shutdown(struct xe_device *xe) {} static inline void xe_display_pm_suspend_late(struct xe_device *xe) {} -static inline void xe_display_pm_shutdown_late(struct xe_device *xe) {} +static inline void xe_display_pm_shutdown(struct xe_device *xe) {} +static inline void xe_display_pm_shutdown_noirq(struct xe_device *xe) {} +static inline void xe_display_pm_shutdown_noaccel(struct xe_device *xe) {} static inline void xe_display_pm_resume_early(struct xe_device *xe) {} static inline void xe_display_pm_resume(struct xe_device *xe) {} static inline 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 bd6191e1ed3e..b4b8c6582a20 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -940,10 +940,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);