From patchwork Tue Nov 19 18:44:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13880456 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 79CCAD6C288 for ; Tue, 19 Nov 2024 18:44:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFEE710E698; Tue, 19 Nov 2024 18:44:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="nmxsmXRp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id D1FCC10E367; Tue, 19 Nov 2024 18:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732041877; x=1763577877; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=M8n/TPOuSs5IUl07eFb8IAIuCf3xME9EDoQ6kyOgJ4o=; b=nmxsmXRpJqKA+uORkWtx/aYntr89RUbOWecsQXmvRiQvO9Ep3QsUMjUZ APud8mBrJ1XlCvdmuWJ8lPtE7q9M0Gih3n0PJfJclqo9pRigz/cfnSEUb smob1QBRNCEt2WGiOwi4vfYPIf1MVM3io3zsl8PNz2XsSFh2C7ZC40Uod Dr4FBcjVo4xYwhtBDJgqmc6Dyvzvmx//wRk3XZKqBZ9+9WR/l42hw+kJ1 fLlkmPlqCV1/ioAooZrkV/S7k1AA3fH6qKluOVIqvoF/U/bHraQ79jnEp V7wK89gZebkTlQeqRzWB7EMF6eVnmF//AU33OGSjUAxgAV9tm5qzSU7P2 w==; X-CSE-ConnectionGUID: jNc6vZeWTUixWbweysHlig== X-CSE-MsgGUID: AFnEEQGzTkq6v90XigW/OA== X-IronPort-AV: E=McAfee;i="6700,10204,11261"; a="54562738" X-IronPort-AV: E=Sophos;i="6.12,166,1728975600"; d="scan'208";a="54562738" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2024 10:44:37 -0800 X-CSE-ConnectionGUID: JqQEV2X3SVWM+3oDe8Iosw== X-CSE-MsgGUID: h3avuo9rR3S24Z4Vy+zS9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,166,1728975600"; d="scan'208";a="94583484" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Nov 2024 10:44:36 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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, 19 Nov 2024 10:44:36 -0800 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, 19 Nov 2024 10:44:36 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) 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, 19 Nov 2024 10:44:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZgOXSupyAWWpahfWg+UBSesqelBw+SYJOFVQZol+QEWFKwEQGDdJPAcmMj8IZWyYeuopUywn0YihUSlvhP9i46wgZeilR4Tgpepdb9hfChHDlhsCyLgQyRlouI29mafUv+zHk3EaWqLhmyEWzzPgEQYNwYQyhFh3oGHsdC7Ij7yHj+AtCHXaEIifZgfMp8g+y9bhTzLz6i2vhXCyFppq/Sr4JC0YEEC+MEaw0sB7SVkSwDEkADCEZdjpVHumkxzxUZHbSqpkICZehhgEOkTDw3IK5+oNUhxrysHJaSZtCnsP74n1pR6oEGnseMwETJQLlw2FIFa+hhBc3+cq26FKJw== 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=Xz15gIfvPtpjwMUfwulnMZv95u9qr00quq8Xd7aKE70=; b=jOXg32zIkvzb07ioAv5YuMPD79jLBh86Z9gVpR0IuZLMYyzAwAoDtMe/Tbjqz+1h2HaGQ2KIFmE0+l/La1RckNBMMGB863RvRKo8FsIf2lU0mW3SnhmMsqTqQpbOqsJzoR/XJpDY19PRbFnPuo1cL4Cm45oIuutSIRC4cQTHranVXHI4ldK5UDKdvswzacSHcNo2HOURVSAlYw0Nsa32d3j0eUtOyX5lCqfia9RfISdOwFG8Q1XhMMBroGbFTYMdCyfSfFR+eXA6fgppl6OFawGcnhjoW3oVcs4s79/8h9u8/Mq50fKMctY55ugct5E0zZGOHqB9uyIKMXRk0VeoUA== 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 SJ2PR11MB7645.namprd11.prod.outlook.com (2603:10b6:a03:4c6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.15; Tue, 19 Nov 2024 18:44: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%7]) with mapi id 15.20.8158.021; Tue, 19 Nov 2024 18:44:33 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 3/3] drm/xe: Use i915-display shutdown sequence directly Date: Tue, 19 Nov 2024 13:44:14 -0500 Message-ID: <20241119184414.336105-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241119184414.336105-1-rodrigo.vivi@intel.com> References: <20241119184414.336105-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4P222CA0005.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::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_|SJ2PR11MB7645:EE_ X-MS-Office365-Filtering-Correlation-Id: a4944e71-87b0-4fd9-04a7-08dd08ca35b0 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: eVR44g8jmyhEpewYdigYQ74q+jQyQUS0rglZD4A14L5yuCu4fhlxA43tlndbSVPy/N2r1lPQrVe3KMGFHHguYpTe3eVnANMLMhxbeRt9Ke1OkTHnESDxUyscsOFF9KOIlAtn5gRg2XGNle/dIhQ+CSQVl05Hpaawbn8ue6nLe01cYw5NhXhtSLU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rDhdpw0hT8CXEIqPMAnHHtbJ2qIEuDbqeQfb3RL/i++57iRtgVeP3/XVdFKPToxOmtE27zDnKMrKCP1pyDaznAkiCL1R11E2 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)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ipK+OIFpIurzmirS65OIoH0BY30GKePwmqyl94Ku+As2DAWYZODPCHbWlEuT1fFfOzOlNnAd8e3g4mISEx5KDCufi6c/fKsR0pe6gRXLa+QH7xb5HbsUD7VIQdAUHdyMIG+6JxV/iFLi0JcD+yy76CMTTR8fQ1bU3696zu39nsMsU4U+nCZu/MhFAGXMfz3v0vb9Gu6Tm4ub1UZ5ClwNyLf9wLUI9WrfHoY9g78/9GBjcZUXVP44a8BiIeWUUIOOz13UC0QrQCl6EAz2Jop3QdD9P29sogeF1somTdfA1R+YUJl6VzDpR6eWYqow7D8rYoGH+E2/3Nw2g0GJKTY4TWh2MUMESuKJqvh+tg/DcSlitrd9bxtuG9V8gaPNN0SSlOBkmQ8yLMirGjwemoNDOHYbQa3NQAEBtlUzEefKHgjThDl7euXvHke3iA/khM/ogRGrna/Y9DomR7yKxO4Zf/34MbraPuvsVlDrGCFKt0PV/SNFH/RfFD7857c+rgu5T0nG6Ye28EtManZb/AwTRoDiwYJkHT9OLMXi+1RW9jZwJfn9aht+JtZE1F3B/RkOncOp5xBzyWNVo1UTmdQfvbFYz825QUrQZZpmhmFdsT438FD2DjqUcqEh5VYEnk6mdGDwmGH018Rz4Tu46Xc7XIqIETwLtwIYeFGhssrDxwezaiw7fGoYgXuJucL8jIny5e5BCGiwjtIEJoNUJimIZgfDnKu/QjpJF04+ZlVNajWEfbYqwDUsFuvkJHi5mSsRQu+VuurelylgPt7YHEofLsVYHV/Xo6HoBejpDCqu2IdWKbfI+iQd4URSJDvbV1QNsfM1BTPsKSTbaXI1Nxvgsr9EiA+3AFr/vyOCav5+MSAr6Bq6eLnXFagyC7J54W2RBoTR0AtFmvpC/Xo5PUGf8p0nxKlI8aHy0B2K5rOZDAqamj2n4u3yPyi0mX79pNT/QMI70al/0iHScgB/IkGL4aXOqOSc+ziUQzdsfdFHJpe+bkJ7Zfl76mAhG0hVEX23Av3JFX89Uu+esu7H6fR7dXQ7odZZqi6RtvkDehhI7Crb3KUNmKcNzHcNyR65iyBAB9cQpMPWvcc+7nQxAIVb8ytqKVRaDEJW67PFHcXN70mQP9bxpQ9RYC8MUElVLNmzMz39bSWoWCXBB1tpJT8WqRrR0GR4BwsyynP6lWVwAvUULoHDOSHDYUmrPwTkpNCh6uT7iRr7HIaQ1JK8/IXnLXt2wNt/fCrWlNXd+GMEY04deo41j/NVoHEuKDAwpNStdKmGLxydVUMLFsvySe9OqLpvMYIioXraGQZw60gg9QI7pbdbfWsl1dF320shKS1e2mB05l7dobuRu122krnHl/86n3TIiO+oL95mTTE5XWVnmcwjOMISwXIqekk7HnbEJ0Wxe0EAqrb8XBXMCLdVk0MMSeG707IkiRXgUDtqxJ6IrHaizgzMp5gv3cpFcUipA9ZMbyx6qUHS4pK2ysdzyIZCrhXeIgzQAjqTgL8msfjGkAHw3lkbvRqFRwCcJrr5RWeYatgdlNrm97PEuWdDCtlaR8Ue5d6sqaY2w36pW1ii2jI1wpoQqla9p11AN5SDYB4e99+Opyg48sViRtwBzg== X-MS-Exchange-CrossTenant-Network-Message-Id: a4944e71-87b0-4fd9-04a7-08dd08ca35b0 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 18:44:33.6972 (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: k91JdqBA9p1+127Ry5VY8fmfhzA7jkkkKC2wb1Az9rRV9e7zMpU+P8JHA3sTLVEcxj3rJnhINNEcr37Y16rO4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7645 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 | 46 +++++++------------------ drivers/gpu/drm/xe/display/xe_display.h | 10 +++--- drivers/gpu/drm/xe/xe_device.c | 4 ++- 3 files changed, 22 insertions(+), 38 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..f139a88da3a5 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); @@ -68,9 +69,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 930bb2750e2e..674cfc34a992 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -821,10 +821,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);