From patchwork Fri Jan 17 22:09:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13944017 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 DAE99C02183 for ; Fri, 17 Jan 2025 22:10:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ADB810E3DF; Fri, 17 Jan 2025 22:10:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="iLI7U/US"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59A0D10E25B; Fri, 17 Jan 2025 22:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737151818; x=1768687818; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=4lSgeMCKYKtEU2/gftMnJIyrxZy7SCZKwhI56BaKSck=; b=iLI7U/USbma2iYGKbGjLI3qYU/j3+vLy9hSDpoVV9FvTZesFylNTMYet 6DyEIod1RAI+CKn0d2U7cJd/k2GlWtE9M4uloGf7XLTnhl12VV6PfKS+p zg+qftLmH7UysobBqEx3gXV6vBOsjZyaWJXYkwGV53hKIjBg+LeJwFUkn LJqMHDsZcnXp9O2TVX8k/4YKfcX/ci6pTjNSCN72ZILV5KfZRI39yBMnc Ftdzh3UROGtDKanJDqYkNtsITusSTFBWlbahHyN4MoSyz/cgRH6PjKg+5 KpRc3ZcIVzAX1NTqEOA7HXVI+zeWpuDWr+JcSzNVmdb5t1ZcuvLTGghiY A==; X-CSE-ConnectionGUID: oBJwoSaYS1mC4iEvYRpzWA== X-CSE-MsgGUID: XUh6rZNJR0GpDYZ80DON9g== X-IronPort-AV: E=McAfee;i="6700,10204,11318"; a="37622790" X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="37622790" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2025 14:10:18 -0800 X-CSE-ConnectionGUID: hS4CcsbnQLKQNVHJu5mI4g== X-CSE-MsgGUID: +HgWM/MfRVOug1ejOUWn4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="105731270" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Jan 2025 14:10:17 -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; Fri, 17 Jan 2025 14:10:16 -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; Fri, 17 Jan 2025 14:10:16 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.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.44; Fri, 17 Jan 2025 14:10:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fD9sZh6h0GDCmK9G3e9Yu8EuL1ZsJA8ncWZYFeGSYX0halHw8IPiEEp67GYQPGZNgBtlgM2GjT9OPZp6+nLe9y9OKYJM6KZIR0+2BDJ7wprEaLUdICaiLAkXmrVxmjGHBfk2oy/H9EKD1TGtFhWS9nzo5s53+KeYs8wqVRa0Ih137O/N7hRXqoCNAl/3+TWFgaQZ8BHOnKw5UB3e1uSmg73wHwxjV2QYap01DvV1MPKhMJbaL203GYG62pcK/DE1wLTf5dzlXs78breFtcBGMiEEuYpoBI3SRAZh+ioDeEp58JMX5qDEPxD1F7vskD1lfwV/HREvJhlHlG6iSvI+XQ== 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=QvhoETrkqdbUsI/+SajGq+U+Zny7UL/EKoy+KlYD+sk=; b=ox/pjyEacK5KvkHfUDWi9JOh6c9qRWuzMr/rCiOuk/f33KL2rmRWo2wgGwoo6tTSgyUWHcu+n8dfWBLQe1obP6bFZufBAiLk235eAhv0Il56RjhnAR2HaXiqaEM/IdhZ3FTht8yAT+oMd8z8ftD2t3cSSMIBWpfhUfNRTrPxx2Y9wCusas84E3OySdKqV6Ugk3MvNuAHScimzrE8S5qsau1pb3S4ydZyJmq+Wp+ijJ4ZSjN0BcrCcDPPflhp/sY9KCpomfuEWGEFLB19psZJ74i0abfqBfCDSo7TthvKfg84prwxzTMULCGRkrncLyZvGVqAb8hPZmu6ai5hTiGZrA== 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 SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) by LV3PR11MB8532.namprd11.prod.outlook.com (2603:10b6:408:1ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.16; Fri, 17 Jan 2025 22:09:47 +0000 Received: from SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72]) by SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72%5]) with mapi id 15.20.8356.010; Fri, 17 Jan 2025 22:09:47 +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: Fri, 17 Jan 2025 17:09:41 -0500 Message-ID: <20250117220943.506991-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 X-ClientProxiedBy: MW4PR04CA0271.namprd04.prod.outlook.com (2603:10b6:303:89::6) To SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB8282:EE_|LV3PR11MB8532:EE_ X-MS-Office365-Filtering-Correlation-Id: 28283fcb-ae2b-4a9a-c898-08dd3743a7a1 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: /+5HgHmJ5jxf3o+TaiZv/MsyqKZ/RiJTvqounUwsmCZ0okHOT3yURm7J/pEGPBg/Qh0mTaAzbY46T1jOVyrHbpsQ42jgv1XFkWgOwX+A1y05x1ZFCGlsK0qC6h+v/VMbUuQdgtmgYOXBqkBNSXaWLhkcO3CH+nhrLTokK2sOc/YRoGBBBRlzVMY+GW4wGIHVWqxSu3af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lrDhTmm79/Y8ADWsKaNtrGpsbVbWZeUNCFIzeAfz2tE696MqMURUP+Tje1rrUOLXIeaTuRRSMt3OAqj8Q/A6sRsFqWcJw6I/GjplWXM9e/J2LVnksU1ksIE2sUnIM9uc5ZNJK X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB8282.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LRgspFgNMZ7sCJsCXUZeR0Sames+kJBIYitO81fTylM8rLT2M54sx7LhKa9mN/raOKUSoU4ByjpYuo/MjhksULp5Mw3gBIffM6iL2fgmvEEPKEEbp/UFPoWPu5xBgZ/K2Xj5DBUTgFyPUWCyn3R0J4wOCPercc15HRDIyAy9vW5rzPPRhxvOvCiPt1JZOFn9285RMzYw3bA9fyi3VCaAjBpvA3NcIe80QTOSGmg+Qypg8LDNtYYrfSeO4Dt2w/lGbEGIfbx0QwAabW8axPmiw28Cg0IT2zFVpO1KwfY+5Y+pB1Mci0ci+Ti0lmC5Qf5iAFA0duTxHzg/Vwutd01H0y0fzQSDxOcczZ0dRGj3wRBgU8VGUDbVVc0RbFvYK8mVmbPjX2Uc6C9ocIH+yhQd8Hl44o+aTx8EFhMk7rw06pfIlbIDWXHQX7YJH+kGtnvj8PeAx4NN43rZDEB1G9I3vuYey5SMT1/v+NyBHH0kmLbxMlRmqj3GHL//kKT7DPF9tK7ZDbnQLaQG2CPGIbIVe6TfQbLysC+YejwCxEzDjgOXdRs5xEWx+Cm/psaDjmrhFd5+JgVBARHj9xSBIp0/zmjwp/7pXDbU0+WVWhmDO9PRQ37ubpndWP8hkhzaPi26kOu4i953cpoQ0V1f8EJ33lKn1wJ/Bx1MTy9m89C4iyk8vCxmXefRxUX/D1NOHrlIHx5IR6AYjnMXjCS4CQomIVnAGv4WbAnUKoHoGl2yB6Cof2Wu5PlvGsZ7FO+Ll1NzyxtR9Zd3ZZiLXzG710hyob+weTN6FOFXEMiPyZqY0htEZj57wDRvOTt3XB3H7fHYbNmHcR5N2ijpw8YcXnCSicDE25kQmPAe9IpEzbEpCRfkwNHZdKIcXn4Z5XHBJYSk+xLTdXTSCy8obw5wVj7siIjCbT/CetGJM3W9c97VZv8zk89IXfqhLpW8CZi4jlTTluFiaMAaAJ9eHSr6geo+8DezNKgZKv5tzEjoJ5Kbm6xNbukUljJpzOrJwS+wSJY1fe0GXstNmxa5AAMULhQrYwxw72YGPxOnXLnRb+gRsLT+L58yQlPJa8tFU058ZKCJg4I+eE+qgoKUBzt5vChX1tVP5igzTuWq9ox8qPeN9hIx3yj+LcIadCI6xUUckR89nxg8iP35uFVhmfPDPHUegK3IeHz3pNa8g0W7MMYlI4OyzQ4bUPXQKnQcItPOlKXqd9eTMKKLEGwBzTlIuUJu4yE22DIN0AqArniZtaHc9eIirOfxh91jp8th//O7aNOa2CKpW8jrlMdimGTvKIk0OoTDlTpmFOpaTGay21N17EKAVF+3K+fIk+q3ldAlPy96GDcbvBl0bRdt/YFMxC4xhQJgvDpGYfbfuP0cVTZYAqsD6rcMEFfIL/PJbMLEzl1fcl6cbIdjf7vENSaQQxwpf6dLy6fiIcIAnAu5EAcFFsOV/W93ER4iVP6YqiHc7pbeS1ZWDoTm7FGhjI3v8nEfwzEYtnChw1vd7OHXNl5+o6Zj5dCXflaRPu4Y/2fTVSQ+APNrBXVLBj6y/BXpemrNXQtpFF3gd0Tr8hVM+onIl/6tF7bHuEAYNgOHrO4933DY3ikSSg5pH/M31hRitEQvkw== X-MS-Exchange-CrossTenant-Network-Message-Id: 28283fcb-ae2b-4a9a-c898-08dd3743a7a1 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB8282.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2025 22:09:47.3983 (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: 2RbLSPrWAiGLavrHVMoyWQDvOq/ooBobODfP/X8Ug5dfV0QhuLNQ+OqIP6o81N0B/Op2PS4eKObg9y8JBeVezA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8532 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 Cc: Imre Deak Reviewed-by: Jonathan Cavitt #v1 Signed-off-by: Rodrigo Vivi --- .../drm/i915/display/intel_display_driver.c | 40 +++++++++++++++++++ .../drm/i915/display/intel_display_driver.h | 3 ++ drivers/gpu/drm/i915/i915_driver.c | 27 ++----------- 3 files changed, 47 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..718b8b92276f 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,42 @@ 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) +{ + intel_hpd_cancel_work(display); + + 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 Fri Jan 17 22:09:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13944018 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 DA7A0C02188 for ; Fri, 17 Jan 2025 22:10:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7845610EB7E; Fri, 17 Jan 2025 22:10:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MBuBI+OK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E37F10EB7E; Fri, 17 Jan 2025 22:10: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=1737151819; x=1768687819; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6taVNAiODYm6hin2U8bpfDNrm7BlrEkq+T8O6QeG6ho=; b=MBuBI+OKqNRq98i9umwKG5CU5lwfAr5swILgF2q3jRD+X7cV+211W6xv NFEaHSkcehtZJAW+IAyRkzig6vZHbojlNNvu49iIYvnYaWR7pq+hKRk0W a/KpeoiTTJCRhI1S5ao2F4IrF1Az0NCXA7xXWgzVj1+Xdw+blkLgXuVWb KZFLYLFetFrTWdYYn5AKzXrnTqU5YhqTKUlQRdavYTuSBcLF3kYglAtIV zh/NPsGaDU5cpDXl0xaq/cSdUP7s84wfRCmBYymkVutpd0mExRzMPE2f+ vILd4hSTM7Kf+qeGOfPgi6BjmOsJtueRVbYeWRWsg4sjzrz7o7+apKCZQ g==; X-CSE-ConnectionGUID: vtYpEwcqRiaagZG8BI6i7w== X-CSE-MsgGUID: WWxE+l2eSmWtXIUDsYKXig== X-IronPort-AV: E=McAfee;i="6700,10204,11318"; a="48264604" X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="48264604" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2025 14:10:18 -0800 X-CSE-ConnectionGUID: KaEmXUDGRbWNTTFMWDT2JA== X-CSE-MsgGUID: sc6th0cPSRSwk7TKaoLw7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="110921398" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Jan 2025 14:10:18 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Fri, 17 Jan 2025 14:10:17 -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; Fri, 17 Jan 2025 14:10:17 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.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.44; Fri, 17 Jan 2025 14:10:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N/bsrC9xg6Dl+btrSz4ZsM5IXrL+tPWrKJHzMpd8D9H7S+GeHgT5uF19uEceKX3UdaQOtZoU0PTnF5QFArkScQ1Q8O744JMQ9I3lgkPJkHhUAjCzzbaXzhzQOfuSHFBfCI9bT9eYkTIaCK/NvpGo16/hp2B2i0mKL55PzbnlNhcMab5F6P/qpnshR/29oJGoRbY4IHxp/Yh/D6OJUYdUf1raqobcel0gvcehqztS5mXufxVqspzjjVNTHl/HNczxVB6UgjwjhrVkyViaxrwZpzQ2ca86JSEaDrPj91BCSr44YCFWAxxaCsOIO04cfwWsChmVGWqhOO0UmAp9XqgjVw== 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=l4u/ShmmZoMt/+u/bkQrGTJ5AbBdREen2TS2GKpwntnrbQ4F0MaNWYWgQHxSeWr+SSGAZ8/4nPVOKWPryl7HkLgJcR66qkum4CzMHrHpOBuD/Os3Nq08B68EcZvcnGmgiOSxAnO0t/Tjo+8Y+aPm8WG+BhcQpXyAj32hB76yDTk0CDwiPaCp9bhF2l8gh7CzVBI1lGh9QeWkb7vGvZ9m7M1W/3tV3fqinfc+HHFs35Ye8XgQUowKmRBRVxdZk76gBvqwN+iw3eFuAHfRf+p7K1PdKWo7wf22ef5cJQuY0iK2fVsTkUpMK/TfI7Dld2JiUcPIKbmHcHhtKzyHKjQIdQ== 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 SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) by LV3PR11MB8532.namprd11.prod.outlook.com (2603:10b6:408:1ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.16; Fri, 17 Jan 2025 22:09:50 +0000 Received: from SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72]) by SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72%5]) with mapi id 15.20.8356.010; Fri, 17 Jan 2025 22:09:50 +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: Fri, 17 Jan 2025 17:09:42 -0500 Message-ID: <20250117220943.506991-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250117220943.506991-1-rodrigo.vivi@intel.com> References: <20250117220943.506991-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0286.namprd04.prod.outlook.com (2603:10b6:303:89::21) To SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB8282:EE_|LV3PR11MB8532:EE_ X-MS-Office365-Filtering-Correlation-Id: a0440f37-99ec-4885-54bf-08dd3743a97c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: E4VWPQGskIiXK2eWvBDrVAtjXJJi2/1zKlSt0vE/Vm57BEC7wK0KFRq6S/hnF5uaVXW0siswOaLj14hcIEEhADglEJWS45OqFNS3A5gDBJk0NxtTDR745qlZaibcCbXtS3NweDG0gMNbNsieF8yQyEo3m4H1NnEY+O3eZHYMrXXteb3cI0/aUq17PCNaINIyp9Ic6g0Cxh4i6glUoWx+afYw4UDjSPLAmcwGlS4bfEvRalSGLThknUyVUGM/1crk6ksKILa49UnhYVG+QfhEvp+7x8P0/lg5x6EEWO3lC145F299o9eYtf4oFpNLKhmNZ1vsGm1PUlpti5wQdqhr8j0DXfSp6KgvAHOcMaBrRCgzIPW0/YiCn3BCvVQTTH+rilcTCGMO7d95WhiSb1A+W0B67bYaNt21LlbDtZTI0n6/0eMkjuo2so6sSgzPPos87ptMVv2g8Z4Elc1zJXVLq3vAhV4uevAudNpQxoHmMrPBXjMXCHqiLiOvcXnmkdFMXvuTtN2Xc1CCtrc8OEw969Ru2DEF547n2sDTAGemEtQhMjEwhnnUX7JOTKsyCrov+07tdP+LLUY1woAKEoWL/GmS+rqXF1V25mBVDB1IrwW5VRJ+KhOlhnpyMStpuDAwvcwgMuQHGWKQLa1EgK8E9T1Edlxh4ndKI77oJZpZMxCxhUU+3jTX0N2XRhkcNXVaEn3E4x6Uh4QU9ZukDrNT2MFJ44/B07w62AQWAMGG2FVI7zAfhDYcGQCEQSetXfXAotFtN5bRp1FiMxiRX6DNV47o3WmtjqKEPJSJH4J7hVNsHgWKWaxeRomtu79/QOROGyrND6kIBe8EmA6FrMj/plmPHqBtaB6pn3vp17Aj/yeO2lnCsKZfqafOWDvbhO0DZsjdax57UIrCltfJGZfjDUpJAfYDg2oyje+4DiYOiPKtYIdeYvawAm4jdz5bSgAkMfCPtCbB4v+yh6ioevfoa2LNZydzeCDBYA9Wg/dfhZFYnJtQ5kdF75yvhI0jkIhFdYA13KKZmxvUYOY/kwDFbB9ge9PSscin+4NN/0tDFlr5UooKufPG3TfKI/jjaXtE7pQNP1yhihQz+36Ky+VnLLLZ66glkWjOAVsnOnGA8s0njd5suAQO0HsHGTRl1iFtIpEOlPcUllUV02dWCI6l6+1wn2nhIKvl603WcuO4QKWkmJwNRYWj2WTg5jj4vuEUXmTKm+i1FfLBb2UvYasgfIMdYc58j8A2UYJwmtjk9N6G4PgEJJwghVipU8I69z6Bl75Xk21TlcKe5MUYsfYB4QIUo2Y2FBQrE/m9QTijpsdypWJMmwt3chGArKVHjefjEO8ClJz4SvWv8OOvAvSrDKC7x8p65e+6KOwsScbxyw+BI9VQqZVx/Y4jYAcALwI8 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB8282.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r35Ass6ke00DumOV2dCcDU+H4znJHmywwis84YCNEMqJP8YHoQ4vJSmhG70w04XTM4NbBBtIeT4xA4rymUtPElA48Yvf5v9YNk0ZajSQUKVq3wrswX87Umz2+3Or+CBcfjx5omv4oUGnCbxFu6vPmJCTD23AwqL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u9hKXcOUPtf7Hg5c1XnaXAMIFMKhbrkxbb7yv/LQBSON/A+gZKx4pLt/08VKsH5jsMMeDy6Pk9QdiRS+lX1KHsazY9vnMa5u/1zC+GqEr6yd77hQiyhtIg0b2LFTC2rPKD+POm1Nqm6cLRj/6DVxGl/5r5NC/ofKjH1MpclW9wnP5JqTj9QOCemhlFfh2t1Vdnnb/qM0DH8aVPfvjbPstosIco9ftVK4XpIV47BBmVW9l3J0X9xE5hLWlI5dQHaoxgBt5ctdSo5BPFhaaDvx4roef7apL1FNdZkUEU8zbIkzYyCBGsyj+ytn5707I1WKOi85ryCX4p2A7DfO9yn9dCygFGbAM9JaiL0vcmqyduHXLPzKiuUGPCUxUOqg0aD81ut9KrJFf90Q== X-MS-Exchange-CrossTenant-Network-Message-Id: a0440f37-99ec-4885-54bf-08dd3743a97c X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB8282.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2025 22:09:50.4095 (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: FTo2zdiH22HhaKWYhp5r1Xl5e3ti3C56mmx0IJM8Vm0dVqZEM4QhAAySGUoszJrLrKsTEP2Ru+XO9PfGo41uww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8532 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 Fri Jan 17 22:09:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13944019 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 8ED4BC02183 for ; Fri, 17 Jan 2025 22:10:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3774410E3B9; Fri, 17 Jan 2025 22:10:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="N6C+WvQ9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4722910EB85; Fri, 17 Jan 2025 22:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737151825; x=1768687825; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=dpD16nEZJM2YUm7k1NeyQPYblmOb92A1x6NqFjG/7x8=; b=N6C+WvQ9tI3rSPdc6QHoaeBr9qvk7+APzzcuycQVenej3la/cfdZsx0s Q6j7W+XV3NK/UGcbtZogSDUzCWJJCa6b8o2cZWIrJIK9gKhEVI5gMSXbf OTeA2ZvInyJ6T7/aSZYOCx/tBhvWWzY70xx2uvFO5tnT7hqyqKoiJupT0 olB8ReoCE3EIBbX1BuDfoH9CtSo3z5wUnVgQ7QykWPrwQMjORg9eVRKnx /RC61Dz5Iv/8MscTNde/TZol65ZUnd9CvMMVoFYon842G0mYMdy6IP7ow FF57UlRtqXWdx9TX/soNb4MakbM3nXx3TVz9eScb42Moc9tX9Fq2NDMsF A==; X-CSE-ConnectionGUID: u2OjedVJRCy6WkpO3GnuIw== X-CSE-MsgGUID: XpbpGwO/Sw+/EKi9v9k1Vw== X-IronPort-AV: E=McAfee;i="6700,10204,11318"; a="48264622" X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="48264622" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2025 14:10:25 -0800 X-CSE-ConnectionGUID: bG/WsEE6SgKPw3c2ZGhLYw== X-CSE-MsgGUID: zkfQqemoR6qC1alYgC0YDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,213,1732608000"; d="scan'208";a="110921469" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Jan 2025 14:10:25 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Fri, 17 Jan 2025 14:10:18 -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; Fri, 17 Jan 2025 14:10:18 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.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.44; Fri, 17 Jan 2025 14:10:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=npNqSax3MIjMCgcoRtINFThGJhJHRWp47RMN577mfI4SE26cwq9QHtaqJ0YrIaVyOJTrE6RcaayVFQva+SZjwq6R0PrBQ/ebJDSarEC7oCBJ+xJcib1oZYWtB67grND7JnFUSIGq9eFU09tB+Ylhe29n3FoSe/iD4Hvsy/j87nvn6n76cq8RkoDVjGW0LOhaTALe06wMemeQHcpQs16wRk2+F2icEVit2WPFLnZFt/kIiCtwzjJ3qmlDL1hurr2tIEP0Qmua+zke7yN5zDX4ytTEpilR0Ueb+Ud1DnxDu1fjhb9IuhAcuWn5UX4hsg3XljD9IXVrwFixX17oEy0Tlw== 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=NuTdE61nsg8ZnaJHCgYP2PpNP9xyu+plASpGOkJNKwo=; b=c5EOBI5lmsVLHNypZtJfOSh+tgFi9PuyFlwjXTmWVnuHitzsPFs/8mszHbFPM2lSaowSV/aMDJgwau9z+ribrMLPSMuB0mGtL0+kXCf7qpLVtWez5Q/lbx9A9c+0CcFRFXUk51QdmamdRt5EyuIZKLy7S4Ot0VPBZuzT5n+fMsxVtlY0ZM43nUk3mpJNwZvJlF4cGJgWxKwvUWbGrr5mw6WID2Zq0j/EweBkrpdbnAdv/f+7Ky4MmEyLmhu1HzC2fkmB0FxUJRyF/AsO1ruhODNBq5UN9Ks/0TuoC56irsp1jBcFcWfJ5CveSWwbRaR1aH+wVLGxHQEyrbJKtAKnqw== 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 SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) by LV3PR11MB8532.namprd11.prod.outlook.com (2603:10b6:408:1ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.16; Fri, 17 Jan 2025 22:09:53 +0000 Received: from SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72]) by SN7PR11MB8282.namprd11.prod.outlook.com ([fe80::f9d9:8daa:178b:3e72%5]) with mapi id 15.20.8356.010; Fri, 17 Jan 2025 22:09:53 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [PATCH 3/3] drm/xe: Use i915-display shutdown sequence directly Date: Fri, 17 Jan 2025 17:09:43 -0500 Message-ID: <20250117220943.506991-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250117220943.506991-1-rodrigo.vivi@intel.com> References: <20250117220943.506991-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR02CA0011.namprd02.prod.outlook.com (2603:10b6:303:16d::28) To SN7PR11MB8282.namprd11.prod.outlook.com (2603:10b6:806:269::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB8282:EE_|LV3PR11MB8532:EE_ X-MS-Office365-Filtering-Correlation-Id: 6eadf9c0-8f4e-412e-84f1-08dd3743ab44 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: 67+Ogt7dR6FVQ0NA1G+vRQFD9WMFtyWqxTV3M8QQsTYToZqetqcMxAPW6BCxPQ4RxO4+Ks4yvA751lpF3UsO2XmZ6mTDIvEAtYGcTQFrDMn++zpqXmDatRgWSPRL5eu3ciK3fCyyV5OUT3gY36jrjk68lw0eWd9hq8qCfmyniY0RtjsbIp61DC8/oGp79VGUg6/4BncHVZljhNF5NLYF3tRh0pMxdi/nHtHMkEylXNqlt77Jc8cdAxpIJWiaCt1fQm+qAyHJyGM/IWatuyu42rqUgGHMj5rv48je9h80yrjiPBalfUttpVTimiu84q+H8iiPLJVrxs7JF/X8xMdJqpdtQEn1HuJx42WESxWIEronQkLpubjmBlB205fhobiejZeQMrA94izjRPC2rp1F+YnVSClOtVl2a4KEjIaSf/iF5MDVIE7MTzXkVNQZ/Ljtypj61Kz7BHqj0Shuv/qzH7MOD/DQ56Zd6lFABURBAAm5jqoDav2lRrTmScahyX3pUH6mpwAVmp8lsJEr5hE6YvPLLtCOZw+GUn8OndrxkTtEQ4aG7GdEI+3sKJ6DMofQ+u01W1dmFlPcLoeWI4a882JvSbtG9L3gPaEKVQ4imtlvZz6BwT6euazfvwmvgjGzGLSji82F6CEm2ExBvxNQLWHrB1B2fXotII34nqJpyVPP/nMhCjH05qY1y2U/qZbqKDNSP0BnP+MDL7hj4UuCAAs19kY5YtMbwL3lLtogABmyAzIGfz/F7bzFmxgRwqZQ1R0KpXc9BxpLqZ9Z6uVv9yOFssb5CqqTf1Afd9usIb8//Wcnn7UoEgUnQBKN4S5IsfDsUjtTQshrQUsS+hX7rLhZmi6JCi/V8ZgKKMPlLFbMEbRLUc9mqVfiXaqZsnX6NhUkbq3FU9ZPGKOIU2jLGDWMROQ6DwRAACtYqsrF7KHxULdPgiUr3OpPJHGGVLEPJEurYOMMJJ6qrgGJmvH8CIO31wd1c+TfPuXboDzxaTo1a7ONpuHByVbKHFe+hGr1yRGznl4QLePrFGkoqiSJx2fiAJUshi+NI5dwoawk32/gyEJyEuIL5u+zdjvTtklC0wbOEBYkhrX44P7q09H98KGcyyniDxZhXL2nY3PwEJ5uOWVFYgYsrtibwiYJ39X+g3+JDpdBNvqSEf0Uabdom49DCmXKvd3EjRR0DAH65e0j5EGeaJaxmobZaZa9mnp1Q1zHGh+G4a4Q/cTbhrS/texJGJhCMeeeW8j4mkrn+PxtmJkU1SyNPIl/Rg5nQS6dGk36/FOj8yGChaIcBUSI/gk9ou2E1QJXNeCrSPCa8CCbTPysYM8ao8vNCGteln6NbCl6kj0xGFjUNqyn85fAhE5zea4RjTjEewWnHlAbUoza2KfIFVzROsCUff9OLafg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:vi; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB8282.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZE7IvzXeK4csM5QMoksyzDI/qnNPdN4ARPiKZ4cnnRH9GACj82K2M5/JtB77ppqaSWQZQkT/k4erEiif/HRlTeM8VkuG00RMX5qxIa9ZXtW/8uHPoiq71Bk+i20FTiPk+Fz9f30s3ej1lEfn3r6EPwGKMyPyncq1aBSnYKwS12suelVCXx3lEuwRlSYnlTeNkoWVkvzGW69sMzeAVYK2hjdNISvCFAXgmdhD4rcyU3+j5shblntvkXYMgaexPJlLtmGp7SNDm3Z7taCRca8h5GG6jXM46InS61MW2wed7OyG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Lb7Laaf0f5dVSgjiUpug3IHsbJaSa3hCSw4OigcgZCXS1xs8sS41driOnTi6qCvMEVd7xeMAyjvuB8VmaQKCRzeW2q9T4K6mK2Hne/+zOUppg3hQm6NspItTWv2HvxIifGWF3fADzI8nMXb7Iv41NxUldVNvwlP+jJmGPtxCsgL3MlXwwm3/pVYCJlePtCBTMojNqKjb/q1Z2AABkCskQYaClD7i0H4+EmBGaHa6AftAEg== X-MS-Exchange-CrossTenant-Network-Message-Id: 6eadf9c0-8f4e-412e-84f1-08dd3743ab44 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB8282.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2025 22:09:53.3992 (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: 7U4LfUSxe0lNmyFk0JP2yzVMVryixpBTpu8g5hOw0PASSYWTR/R05yzxIzT2DH+brTZYeJNo7qv8v97WCKzYJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8532 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 0966d9697caf..53cac055a2a9 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -934,10 +934,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);