From patchwork Mon Nov 11 19:39:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871186 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 548ACD3ABF3 for ; Mon, 11 Nov 2024 19:40:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF29A10E512; Mon, 11 Nov 2024 19:40:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kg88r91U"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B35E10E512; Mon, 11 Nov 2024 19:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354006; x=1762890006; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=TKIZMHwfP8ShhoygPX3Xat7sWtJ3E5laCBtZDt8kXk4=; b=kg88r91UMyCn5mparqsYK9xpUuUTu41BwrF9pq+COlAdihgfeQIrCM8Z 2RNIB6iWUuibANieX4IGN4OCZjQtjJMfGJfTyDKhvkS4C2ddHT5fwfxSs VZdWnk/IzHoDdGpHhKDyYvTazZr/3TkBxhyeEVl2TBjttSXkYS19+6JXY S3FJr57djj54vRsE+QKJYWyg08m7TZuo/Kvogw0XMbGXjf3bmholR40wk T1L6jjlchgYabBwEtdJATx0SYJOjzqMObGCjHeRdluvW5ldeQQPW17PKK hb3x0B62dgxq8nMUD7SOmSJZzg/8EIm+oL4Yh0wI7Hbd7QSo0GEmTsEKJ w==; X-CSE-ConnectionGUID: zxzkKKS/TJiiKjS2zb6SdQ== X-CSE-MsgGUID: gXioJZD3REu6mYftUGgK/w== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="42578095" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="42578095" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:05 -0800 X-CSE-ConnectionGUID: 1/RSpgAfSzyet21t6Y0+ow== X-CSE-MsgGUID: Zmi4TlClRJGlM7/XG0IdHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="124620543" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:05 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:04 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:04 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Egu7XtXPfgH/ImdGTVupG7xUxGCyGyf5sRLvFk1JnBKkgZN8ft31tCwIRgDji4+eAGmKAZzsPIJVzJsb2JcHtEbE8UBJDpNWFziiLmSKcmioDgv40T/9qmgTIYeqbVXxUrghdFJjliGBKyj+gBsDyYLOnSeDMhw6r41DbNBAnVpGACu8PvK4nt8UJtPnk3Ivfgw4fZDTtlJMFuW7q8OpFKF+E/wvqBVRFBdRtvE/X9c0bsh3e0chAGKkHMmh8t/TbBlPGrvUxVUOO4bBPuTF03QnQQyZY6WiX+IGur54Ieanppi1OAeakVd3DADjBriqsrXxSNPs47cvDDSkhpf/+A== 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=EM+AtRF3GdpkreO2tTXRkm7pOryVewm4RXv6YCmvFe8=; b=iS3Bxu4zjpGvcreerZAvY+dxurXmj+1nkTdB1Z9jwpmpMsJ5zgffTyDJ9rdAUNJ/QqUJfzzBN5LCw5TjOKwA9TH4zpxCY7uEwuKQC+Y82ppDJP9zM3+9DmN2aO0IJF28XqaRIOXECAckTeztem1i4N7vJeEIdn+Hv3oLofgDIS1RG3BaG60qdCEVOx4v4BGJciihi1t0rBgatlXfa6NLqNNh0f6LIUS3RKhHCg+TZ5Ef1PcSFtCMZLJaM3ECnj58/sxVtYQdfPeS3eE6BntIaI9X7EHNWsZJYH0TRLZrh5tsCItgpwD7+5wYw2Kp2qPs1LKqhol3skNM4D2MR3+e7Q== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:01 +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; Mon, 11 Nov 2024 19:40:00 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jani Nikula , Jonathan Cavitt Subject: [CI 1/9] drm/i915: Remove vga and gmbus seq out of i915_restore_display Date: Mon, 11 Nov 2024 14:39:34 -0500 Message-ID: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: MW3PR06CA0006.namprd06.prod.outlook.com (2603:10b6:303:2a::11) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: 60cdd44d-4745-489b-257c-08dd0288a19d X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: dkgIt/PKOFMJ6vmWkilhYtSeIOkTfZOl6sRv0l3WpjKKR5qmx+52Rc+sYUlVI+O8Aw7HH0Rv3mHIlJjgdiH4e9NuAbIUhOANwXdTkeEkN/dHxFmmSuipmZOvoC7hWzV+7IcsthfZ2uaFf46edgq/9rVXky5NF7Ka6F4iuAwLH0wbN8huI4IPj8S2k7iEhwmmTR2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as11S4wzUq6lZcVE/KVx9xC6JI7WTuHnpSP4zXfOBG X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0Y+0/LRuRWkJtPDN0AfEDirUgXTI2nmwLbGSCV/64exH/3Yq52D/hQth1N38Jmbp0SxW5c/l1a03pX9I5tKv4UOSBi+Oe0v6YsNmhJP1/0O1WQywysYzBI+bFE/g7+b8UcFktIthf5DNRLEdsYfrdiH+hLZpD6OwJrzfAh+D6zYz8DkLKj4cMRPg0V49fcwm54MIxQZd0ni13qfQ3qK1wBpFCwWBRted1ifkQbfobbdN8RSef9zfBeR/0j3z6/nSeCTJ7hUGRJdSA5/8G2NnEJ7pJngkNPm2x1UkifOMsp6fyFhwSpb7Mq6733u3xvQarQI8H6cxngIDhmWRBaaAPMxqKZIU8DAuHfDCzyOpgFdXU5ZDEV/fzBgvrWC6kB+3tRD5et+YvDBpMg/M9mwY2miBYvf0FDm6yXlIQN4qGe8+wJWRo8mnplPP+sKRlHP6oo4zmLBRV8xK1oSNd3qEYVxyl8AQMiuG5em4yFS16WhVl5W0/EdlU5LuXzpAxg79MYnBiCSDWIlgoCBeQv4NSfFNtgNYl56yklRh6yEmElLpHmG8bFbD58vfIdNtdqXNYhlVqDaILy9ndvMV+8GJtO4OiWwWZBDSnNt0wCwuBfYx+8Teo32yg2GpCB9rNQLMUs8s0KQ3mZ9G0dhs48pAGH42oLFQn6yDWpAEvbRjKDQIzdC7mx7rMqw4wQT06otGgJ8qHwupglDntcDEq8pTVC7fucm9n+PXtc9TAXokuHCLBAbVP10eCwoqEKwiQQtZbeZOv9NKRn9ijLgszhbrDYDL40LQb1sNl5w7TVSBvs69dprUmFCqX7OTZaL4Tor70tqsfP3Z1xZXVPxwEFfO7Tv+dhxlSnDtoyNPE4P1RSkGyv4KxXHT8QAAMLvzsOVl+SBKJE169INL5AcZAQSfWgDjtruIDpx6W1vdqj/mxM19Si34Sx8a31PAUiurCRUmtkVH66TEkfqJYcpcU8Ru7TLz1Iw9Vudb+fHBTRcqwIgdUUsDNINEEx+JTOIWwpjPXW0ksPFO+nUngmjWNcbwWjXiL/EkT7u7EcOqZ1v5FNhuZ/wkSwl8mYO39OMB7fVL0O7nVFStLCvmhOW+GChJ3tjlamJOEWUTlRofyZY2OfeZ7t9gDwvSaqN4xck74JkJcz3ZWlEA39nL0KQmE0a+FfU7ue8RKYXKakdsXDbNOQxWWLmllgqbm6G0QhOL/nvKVAod0qeImAo/GeSR9bTiATDsNuHmPYvJz0v+9r12FC30RFDNht2HAVgscEjb/Xga57kVbXi71Sr2guZBg3Sh0kT5JkTT9SnZvbVSSXPQYreCFfK519QeNZ8ssdCdAf1ZHhXWYR5HPp7hTMK6hO2XS5kC0zjEw0kn9Z501Uy/+ibpPqz3vlOFtfH7tM0CEIRC6FB2jZRMJ23n7iSJ3ZhoXY+S0WsPpJOqbu4SFT3Rx4qBjS2hDnNwwkADIyMNY7gPoNRfCxCRSkUR/BII4kdFDvdzLJgLLHd3t00ov68Oz+kGldPZmWagepZK3LvyWKFy7EYIdeXjIMCP08XVrAu3I21RL5E66VSeedFRpB9hSr2Z+f4jGNwyYwzdp/Mgo+Rvao+fD+80gyP6S16g6GEJuA== X-MS-Exchange-CrossTenant-Network-Message-Id: 60cdd44d-4745-489b-257c-08dd0288a19d X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:00.8907 (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: 72AdNg/O9EDRUVKdQZBUFvSXoQADHtBIrmYqYT6Mh1A5rZ/K+zGwmTkpziXuH9qZgXoKb/+RxOSZY3fgxS21xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Restrict this function to only save and restore registers functionality. Then, that can be moved out later to under display with a proper name. Cc: Jani Nikula Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_suspend.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 269233756e58..420b54b61569 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -60,6 +60,7 @@ #include "display/intel_pch_refclk.h" #include "display/intel_pps.h" #include "display/intel_sprite_uapi.h" +#include "display/intel_vga.h" #include "display/skl_watermark.h" #include "gem/i915_gem_context.h" @@ -1171,6 +1172,11 @@ static int i915_drm_resume(struct drm_device *dev) intel_dmc_resume(display); i915_restore_display(dev_priv); + + intel_vga_redisable(display); + + intel_gmbus_reset(display); + intel_pps_unlock_regs_wa(display); intel_init_pch_refclk(dev_priv); diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index f18f1acf2158..fb67b05cd864 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -26,7 +26,6 @@ #include "display/intel_de.h" #include "display/intel_gmbus.h" -#include "display/intel_vga.h" #include "i915_drv.h" #include "i915_reg.h" @@ -118,7 +117,6 @@ void i915_save_display(struct drm_i915_private *dev_priv) void i915_restore_display(struct drm_i915_private *dev_priv) { - struct intel_display *display = &dev_priv->display; struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); if (!HAS_DISPLAY(dev_priv)) @@ -134,8 +132,4 @@ void i915_restore_display(struct drm_i915_private *dev_priv) if (GRAPHICS_VER(dev_priv) <= 4) intel_de_write(dev_priv, DSPARB(dev_priv), dev_priv->regfile.saveDSPARB); - - intel_vga_redisable(display); - - intel_gmbus_reset(display); } From patchwork Mon Nov 11 19:39:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871187 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 E12C2D3ABF5 for ; Mon, 11 Nov 2024 19:40:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AA0210E528; Mon, 11 Nov 2024 19:40:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mKNDFaO5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51A8110E528; Mon, 11 Nov 2024 19:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354008; x=1762890008; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=lMGWCyC5CktOJ2i57Zox09HzK7iLVst3o1Sj4YEXpfI=; b=mKNDFaO5i6AF0AvvSl0TS4rhNawZM0rn01/nTorLaV5pXQ1N9VyfuyCC U+8t/rx7IM+7mnPGSNlYxMnSlXvx0b/u7ggx4PS8MXWYOoIDfbQyCy8Xm b3cV+x9YEHFOx7nrwY98DC/e0XHbLGwvzDrREi7bZIxxZuVXgFIyYv9bG ZOpox+8iRzCPeSeM1D+wxVvFi8cjNfSQYfDl5p0f4/ZLeoB5znmfBEgZL Mn+pPHpuLxTzYyHUwftau/QkZN6T4QXUL4arRFYMxw0P6aRh+qibTDYwh 9Wg5amgbbbxXvJ84vrZMa9KVxQEzqApZZ4nLWfGmmjp0jkqsfz01o0poK g==; X-CSE-ConnectionGUID: PgcmNL31TTO9+MSno27EtA== X-CSE-MsgGUID: FFo5mHMuQb6EfbDYrcDpgw== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="42578096" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="42578096" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:08 -0800 X-CSE-ConnectionGUID: ME6ooYmyQU6mupred3a2gA== X-CSE-MsgGUID: BJePm1sfSde8/YPc9VU9lw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="124620545" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:07 -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; Mon, 11 Nov 2024 11:40:06 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:06 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.49) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zVmfyLW0l+zlQWQfJB//x0pfNQaU9QCMZN1E+VlCywC4dVzK2csMrsPlK4gxTLGBspcP9YbsQ7G+t+gTcQelRohQt8E07YjEnlHCmcHARM3e8Hf1QlzMbftiws1zM/qsFcV2QmseGfegZMQhN0Ua/4qhThidVteKDHzUEI5JuLB5gkPArpSFuyZ1/uTMcvz9s/81kcUcny8TFn3tOQiWJFjsV6dh2wFKych9oG+NenFykkGRNc7SYMQwnTNcHUJCk4zjFMJubBI4zYwjU3kgpSO7LoaPRGvkcjgjHHG6HbkFv6J3U+XDn+kZRx4oFDjJqdqsfrLRHpllpHHCHXu2Wg== 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=YZ+cIfdkSdVbMdciniTFBNDOF/y4TXB7ClXjjcTslss=; b=JfNjgQkZZsCWmBQBZPtFNvZjMyrvAB3WCIMMtLlzprAWXyqikNiGcZw2NzPGSxWyXH5NUVpWMQ8nNt7MB5kIj2ug78hId0S2p/+l3h11DjzCyoeJBXjeAzcKSnNzPj4d0RSu5C88yfqAcOv1FUzIpX1iCNuFyymEc09UBmQYcombKbP0t5kXq94tv2eALsB61ci7cmZRylPOw1gmMN08940UcWhsJQOR65jula78olJG7UseepCp9V3SQrXCcR56Eq6k73SnTrZnWUe8NOfwc3bYFepdXKwBGvq5HuVCNIHz+hI/GFJNaWRoYWtFr72B1N4SVmG7BzS70GIJg9Sm0g== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40: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; Mon, 11 Nov 2024 19:40:03 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jesse Barnes , Jani Nikula , "Jonathan Cavitt" Subject: [CI 2/9] drm/i915/display: Convert i915_suspend into i9xx_display_sr Date: Mon, 11 Nov 2024 14:39:35 -0500 Message-ID: <20241111193947.128871-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0114.namprd04.prod.outlook.com (2603:10b6:303:83::29) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: f75fb228-3be6-40c5-cc57-08dd0288a337 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?1+g1QOhAT5w7pYKkVZvkj724E5ZuiZo?= =?utf-8?q?ZdDTnYZTt2sHE30imwwjhNyLqee68cOozPQC1LD4BpJJMHSnpujnhpYUbt/+b9YP8?= =?utf-8?q?QaOS1HeWhZt4iE8pOZNzj/CSzke6TF+4TwiHDB3t049rkKzZJRnBdp42acY9hF4vs?= =?utf-8?q?Ht+RMImbfMDQGofj9kYlt078a+98RI+JQ7AeNA/EEgU8t4pM6q1VsgJwOrT49HVr2?= =?utf-8?q?Mv57NIXA4SMwNjEpArnoqFOj63707x1wVHpgc/md+EccE7V63FD00zoksJdE9ZQnx?= =?utf-8?q?jfOgZyxp5x1A4KpFbJKBCjY8Fof5Vqctl97lQCHKYtXrEcNAigkszEdAygttrSoNG?= =?utf-8?q?ZQSneCc8VFJU7I4Y8jUsHuIC8jg/UMDgP36WPI9vYff5u4RXx4cKd9ZwFWYEJKZ04?= =?utf-8?q?pARzRDoLODJRLsNvSoPJqSsfXflgaWHTQY7AXNCw5Opj9mwTV2+1bIj/1KyJMRTnD?= =?utf-8?q?Xm05i+arU5IQRtXZ9WsSyKPBo3MeaMxubFNCuiLvClzwPW8pjX9Q1urx730/iJVIn?= =?utf-8?q?CAxJrd+kqo7ZyIa6ihCw/czGuNsK31kFbld3aYDPvtHulgegcGTg66UYaZwo5Xyl5?= =?utf-8?q?SgPyxpTXAdB4ZjlQy3DHxq/F9aqqOPEY99CAZU/gPJG3j3iTvqL6zcbL9DUNRoeii?= =?utf-8?q?ZnJdFEHJB/t6Q8UktyY3RFnsMxzQ2xMwk4eg8XgG8h6AHaA7+gW5x46HTwSGCjMai?= =?utf-8?q?3hdzH6Qj/dSfW2YOf+LpgJyK+VS5zwYyE1PB59iK1PU9t4iby+6PO3xczDspItlLR?= =?utf-8?q?vHVJu3un0G/1Wt6fJQ/27kQQViqSvC/f58RiGjzFAOWx47AOGUH5PTPcHNXTHHLFu?= =?utf-8?q?QGItTYZ67Hbk6tfXBQ0SAPGsnvdEUGtCHB/yYnFzu2mP7TdoKX+3Zs31oo9Bo/vvT?= =?utf-8?q?B1/9pX4wtDbmhSLVH/VT4aRp8ZWF+RMvvSPClecryUfBlCPCSNUwO3qwo3kdBiBMr?= =?utf-8?q?8CmOI+HDsXlRfUVJe0nKqukf/dKKlkWxiFJD9bwmzHSk3zMe7Iu/W0PYfwV3T5Ogg?= =?utf-8?q?VSny0PxkojRoNgmLxlyBMAmeElMQp5pe6RKluCgz0qRoWO21lB7SGViMmrrlrc16G?= =?utf-8?q?hWYRRgXCIBOI7ZkuuaiOwk3P1rET/0emYtUk69+wyqirlYBcyUDQxGfxzHB3DpFDH?= =?utf-8?q?30+bWdPp0EzE1h4CkpGb6kC7AIgdJ6Chc8ThpG1fLYd9ty95K0Cn+BmlBCLDGgla8?= =?utf-8?q?MS5rAv8TYtFkZjHSFVFdD7r9NbU2lYicMLRQfcBEBYJUxbayARu1LtTUI=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iobOqWnzKHC18gqSERPEVl8OGy+x?= =?utf-8?q?ovrmR8dV8YtDTj9dldyUretAqCg+Yr1D7OsKmmKk8tnv3AypidqBYvVi4AHbNE+A0?= =?utf-8?q?kOZVtyBcJCT6iqErk5rwEPQ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dmIobH6frlDFQBwqzlTiut1m5lnf/tLwc7JLSiYRXZeMxE9?= =?utf-8?q?68msNlHUiD8mbIRMi56WWZzMYs1dfsLtb61qA5wVJCZvkq2QAo+lbHkQKOHWobh5Y?= =?utf-8?q?3Ls+cf40SyGcMQCDr2V5t4TaifpreHpiAkc1EK/8oLYQ1ie7dVBAuBFumu6zA1Gqs?= =?utf-8?q?UTO8l6dX/+9sUxe+uH/73Xicji68mcOydQthmebw/1M7yYt/M9jtTUNYYuvQfEf9i?= =?utf-8?q?a2HvVy6az/so82Va3JQMwS3bURtI0bpTViHobMg0/iE//oYoAFU626IMWNHlYQ9fW?= =?utf-8?q?W5BdGdNtCu9setJoDD1DGb7aIhdQKBhc0jmP3UGF3+qe4vHb5lIWTK6OoHgCm1Z7g?= =?utf-8?q?GeAx69HFVqWPWh+h08VMvexzh0Ei/m1Tv4jnmH2K4LMxhxsvSaFWQgt39J7GKuiJs?= =?utf-8?q?wiozxGEMJxdeTBQxioqDGyuFbiBvH0iQddGTRPnFyiajARM3AI0/dn/PqgAlivezZ?= =?utf-8?q?hQVhnjP1pUrabNUFew+GE+wSD7boi1bU56Qj1xM4Q+0bVf1c4Cwu/+iy7JRcywCag?= =?utf-8?q?ejlmr2x86dZ9EyFTA1UMeVhoRewfCtwvlg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f75fb228-3be6-40c5-cc57-08dd0288a337 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:03.5752 (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: kzuca8JcoSq7zgT4iaKHlamk29f41DUb2Gpd7OzFFHwqhNk3KIprCraCUvM0wphJVjO2n2wnAxLxloBtdTEBDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" These save & restore functions inside i915_suspend are old display functions to save and restore a bunch of display related registers. Move it under display and rename accordantly. Just don't move it entirely towards intel_display struct yet because it depends on drm_i915_private for the IS_MOBILE. While doing this conversion also update the MIT header using the new SPDX ones. v2: Fix Makefile and include (Jani) Removed vga and gmbus (Jani, Ville) Cc: Jesse Barnes Cc: Jani Nikula Reviewed-by: Jani Nikula Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/Makefile | 2 +- .../gpu/drm/i915/display/i9xx_display_sr.c | 95 ++++++++++++ .../gpu/drm/i915/display/i9xx_display_sr.h | 14 ++ drivers/gpu/drm/i915/i915_driver.c | 6 +- drivers/gpu/drm/i915/i915_suspend.c | 135 ------------------ drivers/gpu/drm/i915/i915_suspend.h | 14 -- 6 files changed, 113 insertions(+), 153 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/i9xx_display_sr.c create mode 100644 drivers/gpu/drm/i915/display/i9xx_display_sr.h delete mode 100644 drivers/gpu/drm/i915/i915_suspend.c delete mode 100644 drivers/gpu/drm/i915/i915_suspend.h diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 31710d98cad5..e465828d748f 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -30,7 +30,6 @@ i915-y += \ i915_params.o \ i915_pci.o \ i915_scatterlist.o \ - i915_suspend.o \ i915_switcheroo.o \ i915_sysfs.o \ i915_utils.o \ @@ -220,6 +219,7 @@ i915-$(CONFIG_HWMON) += \ i915-y += \ display/hsw_ips.o \ display/i9xx_plane.o \ + display/i9xx_display_sr.o \ display/i9xx_wm.o \ display/intel_alpm.o \ display/intel_atomic.o \ diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.c b/drivers/gpu/drm/i915/display/i9xx_display_sr.c new file mode 100644 index 000000000000..4dd0ce267994 --- /dev/null +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.c @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright © 2024 Intel Corporation + */ + +#include "i915_drv.h" +#include "i915_reg.h" +#include "i9xx_display_sr.h" +#include "intel_de.h" +#include "intel_gmbus.h" +#include "intel_pci_config.h" + +static void i9xx_display_save_swf(struct drm_i915_private *i915) +{ + int i; + + /* Scratch space */ + if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { + for (i = 0; i < 7; i++) { + i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } + for (i = 0; i < 3; i++) + i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + } else if (GRAPHICS_VER(i915) == 2) { + for (i = 0; i < 7; i++) + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } else if (HAS_GMCH(i915)) { + for (i = 0; i < 16; i++) { + i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); + i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + } + for (i = 0; i < 3; i++) + i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + } +} + +static void i9xx_display_restore_swf(struct drm_i915_private *i915) +{ + int i; + + /* Scratch space */ + if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { + for (i = 0; i < 7; i++) { + intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } + for (i = 0; i < 3; i++) + intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + } else if (GRAPHICS_VER(i915) == 2) { + for (i = 0; i < 7; i++) + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } else if (HAS_GMCH(i915)) { + for (i = 0; i < 16; i++) { + intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); + intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + } + for (i = 0; i < 3; i++) + intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + } +} + +void i9xx_display_sr_save(struct drm_i915_private *i915) +{ + struct pci_dev *pdev = to_pci_dev(i915->drm.dev); + + if (!HAS_DISPLAY(i915)) + return; + + /* Display arbitration control */ + if (GRAPHICS_VER(i915) <= 4) + i915->regfile.saveDSPARB = intel_de_read(i915, DSPARB(i915)); + + if (GRAPHICS_VER(i915) == 4) + pci_read_config_word(pdev, GCDGMBUS, &i915->regfile.saveGCDGMBUS); + + i9xx_display_save_swf(i915); +} + +void i9xx_display_sr_restore(struct drm_i915_private *i915) +{ + struct pci_dev *pdev = to_pci_dev(i915->drm.dev); + + if (!HAS_DISPLAY(i915)) + return; + + i9xx_display_restore_swf(i915); + + if (GRAPHICS_VER(i915) == 4) + pci_write_config_word(pdev, GCDGMBUS, i915->regfile.saveGCDGMBUS); + + /* Display arbitration */ + if (GRAPHICS_VER(i915) <= 4) + intel_de_write(i915, DSPARB(i915), i915->regfile.saveDSPARB); +} diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.h b/drivers/gpu/drm/i915/display/i9xx_display_sr.h new file mode 100644 index 000000000000..30383758f97e --- /dev/null +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2024 Intel Corporation + */ + +#ifndef __I9XX_DISPLAY_SR_H__ +#define __I9XX_DISPLAY_SR_H__ + +struct drm_i915_private; + +void i9xx_display_sr_save(struct drm_i915_private *i915); +void i9xx_display_sr_restore(struct drm_i915_private *i915); + +#endif diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 420b54b61569..7ded0f4675a0 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -45,6 +45,7 @@ #include #include +#include "display/i9xx_display_sr.h" #include "display/intel_acpi.h" #include "display/intel_bw.h" #include "display/intel_cdclk.h" @@ -94,7 +95,6 @@ #include "i915_memcpy.h" #include "i915_perf.h" #include "i915_query.h" -#include "i915_suspend.h" #include "i915_switcheroo.h" #include "i915_sysfs.h" #include "i915_utils.h" @@ -1052,7 +1052,7 @@ static int i915_drm_suspend(struct drm_device *dev) intel_dpt_suspend(dev_priv); i915_ggtt_suspend(to_gt(dev_priv)->ggtt); - i915_save_display(dev_priv); + i9xx_display_sr_save(dev_priv); opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold; intel_opregion_suspend(display, opregion_target_state); @@ -1171,7 +1171,7 @@ static int i915_drm_resume(struct drm_device *dev) intel_dmc_resume(display); - i915_restore_display(dev_priv); + i9xx_display_sr_restore(dev_priv); intel_vga_redisable(display); diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c deleted file mode 100644 index fb67b05cd864..000000000000 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * Copyright 2008 (c) Intel Corporation - * Jesse Barnes - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "display/intel_de.h" -#include "display/intel_gmbus.h" - -#include "i915_drv.h" -#include "i915_reg.h" -#include "i915_suspend.h" -#include "intel_pci_config.h" - -static void intel_save_swf(struct drm_i915_private *dev_priv) -{ - int i; - - /* Scratch space */ - if (GRAPHICS_VER(dev_priv) == 2 && IS_MOBILE(dev_priv)) { - for (i = 0; i < 7; i++) { - dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, - SWF0(dev_priv, i)); - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } - for (i = 0; i < 3; i++) - dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, - SWF3(dev_priv, i)); - } else if (GRAPHICS_VER(dev_priv) == 2) { - for (i = 0; i < 7; i++) - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } else if (HAS_GMCH(dev_priv)) { - for (i = 0; i < 16; i++) { - dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, - SWF0(dev_priv, i)); - dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, - SWF1(dev_priv, i)); - } - for (i = 0; i < 3; i++) - dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, - SWF3(dev_priv, i)); - } -} - -static void intel_restore_swf(struct drm_i915_private *dev_priv) -{ - int i; - - /* Scratch space */ - if (GRAPHICS_VER(dev_priv) == 2 && IS_MOBILE(dev_priv)) { - for (i = 0; i < 7; i++) { - intel_de_write(dev_priv, SWF0(dev_priv, i), - dev_priv->regfile.saveSWF0[i]); - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } - for (i = 0; i < 3; i++) - intel_de_write(dev_priv, SWF3(dev_priv, i), - dev_priv->regfile.saveSWF3[i]); - } else if (GRAPHICS_VER(dev_priv) == 2) { - for (i = 0; i < 7; i++) - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } else if (HAS_GMCH(dev_priv)) { - for (i = 0; i < 16; i++) { - intel_de_write(dev_priv, SWF0(dev_priv, i), - dev_priv->regfile.saveSWF0[i]); - intel_de_write(dev_priv, SWF1(dev_priv, i), - dev_priv->regfile.saveSWF1[i]); - } - for (i = 0; i < 3; i++) - intel_de_write(dev_priv, SWF3(dev_priv, i), - dev_priv->regfile.saveSWF3[i]); - } -} - -void i915_save_display(struct drm_i915_private *dev_priv) -{ - struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); - - if (!HAS_DISPLAY(dev_priv)) - return; - - /* Display arbitration control */ - if (GRAPHICS_VER(dev_priv) <= 4) - dev_priv->regfile.saveDSPARB = intel_de_read(dev_priv, - DSPARB(dev_priv)); - - if (GRAPHICS_VER(dev_priv) == 4) - pci_read_config_word(pdev, GCDGMBUS, - &dev_priv->regfile.saveGCDGMBUS); - - intel_save_swf(dev_priv); -} - -void i915_restore_display(struct drm_i915_private *dev_priv) -{ - struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); - - if (!HAS_DISPLAY(dev_priv)) - return; - - intel_restore_swf(dev_priv); - - if (GRAPHICS_VER(dev_priv) == 4) - pci_write_config_word(pdev, GCDGMBUS, - dev_priv->regfile.saveGCDGMBUS); - - /* Display arbitration */ - if (GRAPHICS_VER(dev_priv) <= 4) - intel_de_write(dev_priv, DSPARB(dev_priv), - dev_priv->regfile.saveDSPARB); -} diff --git a/drivers/gpu/drm/i915/i915_suspend.h b/drivers/gpu/drm/i915/i915_suspend.h deleted file mode 100644 index e5a611ee3d15..000000000000 --- a/drivers/gpu/drm/i915/i915_suspend.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* - * Copyright © 2019 Intel Corporation - */ - -#ifndef __I915_SUSPEND_H__ -#define __I915_SUSPEND_H__ - -struct drm_i915_private; - -void i915_save_display(struct drm_i915_private *i915); -void i915_restore_display(struct drm_i915_private *i915); - -#endif /* __I915_SUSPEND_H__ */ From patchwork Mon Nov 11 19:39:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871189 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 2129FD3ABF5 for ; Mon, 11 Nov 2024 19:40:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B53D510E533; Mon, 11 Nov 2024 19:40:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mjetqrt0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74CE310E529; Mon, 11 Nov 2024 19:40: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=1731354016; x=1762890016; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=vrGPc3oNRrz8ov4UPbm8uEBcemu8clsgp+bOz/yFCdk=; b=mjetqrt0GHxA1zxerSQqDO1i+1HhWjcjDoRgGnQuP0XNXcenMCZ3PdGp Hokigz7OMcLPGyjiaa+CnbGxcOiVv6HO4gl7lL7m+w9oM5dve8uY19Bp8 eEWHKX7GbaE0makzHmn/+omUNl3ugO5Wx4isiAfYIyU36C8DYh50Qxp8e /IEd+k1EwZko9IcqEMq/uu010gafW84PPDgLUFajBQ2SkZwKKh9UzBBU7 wPbqUkYVKcKfZ/4jH+jq7C4nkFK72CiBdVVJmN+uKShzQpIfP1OT8qZrG 6mUDfqdI0/0Njz8yKi3TwoxldlgH681EVJjgs+OFSQw8Hc8RHzj2jAR6U w==; X-CSE-ConnectionGUID: W3oX4ew4S36r+WTQlB7Miw== X-CSE-MsgGUID: lbxs9NqRQ9e9qSInmGtsNA== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="30579877" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="30579877" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:16 -0800 X-CSE-ConnectionGUID: d5o2y89jSeW2ksbFcCy3rw== X-CSE-MsgGUID: /3zh3RYuRMaNs6oKwCefgQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="92022817" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:16 -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.39; Mon, 11 Nov 2024 11:40:15 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:15 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.42) 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; Mon, 11 Nov 2024 11:40:08 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kuyAS51rH0ibdVtPIC9Hm0mbwJiyK2KFZDx4P1ak89u/x1Nmy47hRDdm2k0Pm/yAIrSoFhPnw4D70JKrEAXXT/KihmrP8CUYGvjtkaXFPWRQToeol6LnYs/9IKdYSAP0nyP5chxltJ8vcnI8c2lgkyPdj79IE4d8fWSzWW/1KS0uCw+nKKtGlImB09UvHP2HrWskt4GwYUQppb+9v8qlJx6yGhSiGrly5SXRSU26s4rxwzZfulGteBcqlSqSx8JZo/eVKPhh49Myztl3cyxSqoF7VRDhSYsMrrnLkP81JWJn3grQRtKWij4xoto/WE5I5iIVF4tZqScF7U9+iqpcSQ== 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=VYJgejEc4E+5W3WOPH2KLNey15Cyh1VfHPoOBuSJVsM=; b=jaYoWp4aoSw4/sFAvVpHOhYE9oLmn96TXwGNhS4TzgeM350ciDeV4X2sJrl3a8ULJeTNDX4lIBjW0TN2U1TzcjDCM4QOqpOwA1FL7R9smaQj+6lVSwj+5GhDdAGlWSM16eRq2KhcBZqOlYClRcjaOhAjlTdPkeHWmsus8954XmlYI4ONysSbEj3bsNdWjXx6O070c+VVgz58mbt72hAbcPfS9eWI77dJ+937+r5lUke7nu2+LwTZa8aR5aTG9FWGO+8ZPTR1mLk8r/RYti/AhBnjJpwrwTbhrJ3nqP8kG26aPerOR+of42XSNO1x7LMqTN8mGQoohrgy2LdQh4D6Eg== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:06 +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; Mon, 11 Nov 2024 19:40:06 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 3/9] drm/i915/display: Move regfile registers intel_display.restore Date: Mon, 11 Nov 2024 14:39:36 -0500 Message-ID: <20241111193947.128871-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0094.namprd04.prod.outlook.com (2603:10b6:303:83::9) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: e5fd5ddc-e9c8-4f9b-3b87-08dd0288a4e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: VGKoHI1VUQTFuuKWluYgydeax5JSDLK2McUAC7bJwdycfm7SAJ8uJTiGd9uvYvuskt4a2LkxV4VSD/xNT+GqWJd0DY+9YQVFAypbBEQKDbTtlEQLScPS1CjceVJ5teFRcKL2z2Dg5iHoa2tKcBIVDB43VbYKA6CTQGFZxeUX1w4G9dpLbX/BJahTxEfD0bZEWOgLd6/BCwOTfJssw9HVpiMyNvWnNZOm7RuUxJbUSpzfGLNzaKKe9fFJVKsFf8vkZ1GtpmayJRLw7KalJtuRI5RpA1nlleBvO3eHcczBDWyMDA8B2XF8YTBe0JpZI68ybj3nxncRAx81wn+ypcWBgxG7pGzk/b1+bTgkFyZOwdgZzw5875cHiRWJT7rI4LeUqjyvIk55B7CenwSn6+76EEde9QRxLCqYMzPmwvmP2p6Nv15JRsayfzW0DCYijj1GyRPLtFHzi1Fmt8QieKeOkanJSdTKaiR4uR4tmI62C43lu7wRTN2KhZDf7Ptiml0H6KCMDNWWDcgJWCen1uD1z1UjgyNQZxc+DrE4AmvPCZqhNsbXPiRfOMz2wsTvaHzLAC6LfNKrXVuYKYBorj9ruXQm1M5LHs1kNY+dY0fB4TRg7xcEyMU14koiP6ogZJqFLMvIBsRE6U/j095TBHi/0p2m402L/z8nQOcuUh4FJRWuDrf4mY6jJsMT+i72360F93wB9MPo92hbufKdHhifOuDjWUIu94E3poVIuUyp4J8/cMiPbUEoluPlWMHZtplMYsCHBQF3IGXJtujnsB8BsKfxfXS/UGPJDD+Nw0t/qlXuYJvIA0huVAvBPEAHAGIiJg9gaJClmIMkQdV6OMMqHGYW0Z3Dn18WNx/5rcR+wVur7+p1kpoUYypGJE8bwjq1adUiTpDQwfBKykmj5ntopvlWQxA7AvYkghoO+tjSK5vAt/17eXvPb6pbNxGOeQwsIONaCiSkvwYWqW5d6KVRdKwRxsF+WMhu1c6+tmRywXCYdkgyPwbqPPfo5J+spRzCeFELon3p2yQJMrK6RhLZ0Ii9imn/CcThqJZXnCv38uqmhmzDoHAZM6VFvAemoDbs7A3BtuMgenVuaCklQgRn762njgxq+RDzu5zxlr3JRF9rAagPAwpnr8ZsIT2NyqSZwtjK9sOZgtJnim1KTcFNvALOJUDyaMKnOoa4B5/4lej0JdDgJrsbhyIchpRnm214xM9yNJ6l79/DAL8XXQe163GGrYAW6SMZMs7PCVpPpeVNajrCpUcNVpzkq1O2RTBK64Akc+L1VGH0Sb0msfCF/MiwaVuQ72n1w5PJad8NO+YaMhI00ux7V7aulq7/N1OS X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +J5NlMdxlDNP1M5RZ7cNHWktJaBzkbEO07Q1RRsb07QYIEPS9yvnm3mcBNLSNHPtpYmhjtzMmI8vUH27AQF9YkgR1UfD1lEbRbLDU54IdxOokNRyCVGbtXMFUQZnLe8Qe8BMbwebfY/aq/647/3OTNa+1KH7KWrD+q9eAGMJ4yoN8pycLX/J0J1QChjefqBN2KnsDW84dgqSabIpYVgYiKHUdcvuwy3/GpLJ+X9d9D4YdQUmGJ4VmGYutoRgY6Vr3q5McWXngFThC3EhaTFSieoFUlxY/FPD5Hfr0IjYKvZ2gVB+tYQN7h6xN2hez9l1HJnLRCZ+/yFBU6e/yLo0FhIDX/Ykpn+81D9PXq9cL9sHjAtttyRE2nbnClUGSelW/hnD0w4ukWvLVUQyOyt/pHUeKl8j2FJg1N9uF4S6kZsVmhVosu/3WxoOGaSbi3alq3DVeOHfU8P+hpYqreQYRowxl3j6imrZbvqYBJyaC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meErRb0YasTXXdJUUPCCqQc1xn0tZ5T/TFIvu+wSRDR/p2jmFw1pMEFwfzbA== X-MS-Exchange-CrossTenant-Network-Message-Id: e5fd5ddc-e9c8-4f9b-3b87-08dd0288a4e1 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:06.3635 (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: 0JjNXwWMMA0cOi9Kn5HBRl95WIwudPGzZV9mEWY4z/PvRgZ+2f7zZuP5h46BqAmwmNEf7/jjBHCFY+6EL/HLCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The intel_display struct already has a place for save/restore stuff. Move the i915's regfile there since they are only related to display. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- .../gpu/drm/i915/display/i9xx_display_sr.c | 40 ++++++++++--------- .../gpu/drm/i915/display/intel_display_core.h | 5 +++ drivers/gpu/drm/i915/i915_drv.h | 9 ----- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/i915/display/i9xx_display_sr.c b/drivers/gpu/drm/i915/display/i9xx_display_sr.c index 4dd0ce267994..4c78b7165831 100644 --- a/drivers/gpu/drm/i915/display/i9xx_display_sr.c +++ b/drivers/gpu/drm/i915/display/i9xx_display_sr.c @@ -12,56 +12,59 @@ static void i9xx_display_save_swf(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; int i; /* Scratch space */ if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { for (i = 0; i < 7; i++) { - i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF0[i] = intel_de_read(display, SWF0(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } for (i = 0; i < 3; i++) - i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + display->restore.saveSWF3[i] = intel_de_read(display, SWF3(i915, i)); } else if (GRAPHICS_VER(i915) == 2) { for (i = 0; i < 7; i++) - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } else if (HAS_GMCH(i915)) { for (i = 0; i < 16; i++) { - i915->regfile.saveSWF0[i] = intel_de_read(i915, SWF0(i915, i)); - i915->regfile.saveSWF1[i] = intel_de_read(i915, SWF1(i915, i)); + display->restore.saveSWF0[i] = intel_de_read(display, SWF0(i915, i)); + display->restore.saveSWF1[i] = intel_de_read(display, SWF1(i915, i)); } for (i = 0; i < 3; i++) - i915->regfile.saveSWF3[i] = intel_de_read(i915, SWF3(i915, i)); + display->restore.saveSWF3[i] = intel_de_read(display, SWF3(i915, i)); } } static void i9xx_display_restore_swf(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; int i; /* Scratch space */ if (GRAPHICS_VER(i915) == 2 && IS_MOBILE(i915)) { for (i = 0; i < 7; i++) { - intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF0(i915, i), display->restore.saveSWF0[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } for (i = 0; i < 3; i++) - intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + intel_de_write(display, SWF3(i915, i), display->restore.saveSWF3[i]); } else if (GRAPHICS_VER(i915) == 2) { for (i = 0; i < 7; i++) - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } else if (HAS_GMCH(i915)) { for (i = 0; i < 16; i++) { - intel_de_write(i915, SWF0(i915, i), i915->regfile.saveSWF0[i]); - intel_de_write(i915, SWF1(i915, i), i915->regfile.saveSWF1[i]); + intel_de_write(display, SWF0(i915, i), display->restore.saveSWF0[i]); + intel_de_write(display, SWF1(i915, i), display->restore.saveSWF1[i]); } for (i = 0; i < 3; i++) - intel_de_write(i915, SWF3(i915, i), i915->regfile.saveSWF3[i]); + intel_de_write(display, SWF3(i915, i), display->restore.saveSWF3[i]); } } void i9xx_display_sr_save(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; struct pci_dev *pdev = to_pci_dev(i915->drm.dev); if (!HAS_DISPLAY(i915)) @@ -69,16 +72,17 @@ void i9xx_display_sr_save(struct drm_i915_private *i915) /* Display arbitration control */ if (GRAPHICS_VER(i915) <= 4) - i915->regfile.saveDSPARB = intel_de_read(i915, DSPARB(i915)); + display->restore.saveDSPARB = intel_de_read(display, DSPARB(i915)); if (GRAPHICS_VER(i915) == 4) - pci_read_config_word(pdev, GCDGMBUS, &i915->regfile.saveGCDGMBUS); + pci_read_config_word(pdev, GCDGMBUS, &display->restore.saveGCDGMBUS); i9xx_display_save_swf(i915); } void i9xx_display_sr_restore(struct drm_i915_private *i915) { + struct intel_display *display = &i915->display; struct pci_dev *pdev = to_pci_dev(i915->drm.dev); if (!HAS_DISPLAY(i915)) @@ -87,9 +91,9 @@ void i9xx_display_sr_restore(struct drm_i915_private *i915) i9xx_display_restore_swf(i915); if (GRAPHICS_VER(i915) == 4) - pci_write_config_word(pdev, GCDGMBUS, i915->regfile.saveGCDGMBUS); + pci_write_config_word(pdev, GCDGMBUS, display->restore.saveGCDGMBUS); /* Display arbitration */ if (GRAPHICS_VER(i915) <= 4) - intel_de_write(i915, DSPARB(i915), i915->regfile.saveDSPARB); + intel_de_write(display, DSPARB(i915), display->restore.saveDSPARB); } diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h index 45b7c6900adc..f6c1bedf1c31 100644 --- a/drivers/gpu/drm/i915/display/intel_display_core.h +++ b/drivers/gpu/drm/i915/display/intel_display_core.h @@ -505,6 +505,11 @@ struct intel_display { /* restore state for suspend/resume and display reset */ struct drm_atomic_state *modeset_state; struct drm_modeset_acquire_ctx reset_ctx; + u32 saveDSPARB; + u32 saveSWF0[16]; + u32 saveSWF1[16]; + u32 saveSWF3[3]; + u16 saveGCDGMBUS; } restore; struct { diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 920585ea1ad5..dcf6050e5550 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -101,14 +101,6 @@ struct i915_dsm { resource_size_t usable_size; }; -struct i915_suspend_saved_registers { - u32 saveDSPARB; - u32 saveSWF0[16]; - u32 saveSWF1[16]; - u32 saveSWF3[3]; - u16 saveGCDGMBUS; -}; - #define MAX_L3_SLICES 2 struct intel_l3_parity { u32 *remap_info[MAX_L3_SLICES]; @@ -299,7 +291,6 @@ struct drm_i915_private { struct i915_gpu_error gpu_error; u32 suspend_count; - struct i915_suspend_saved_registers regfile; struct vlv_s0ix_state *vlv_s0ix_state; struct dram_info { From patchwork Mon Nov 11 19:39:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871188 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 F1D69D3ABF3 for ; Mon, 11 Nov 2024 19:40:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EFE810E529; Mon, 11 Nov 2024 19:40:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mPmvk9Si"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 113CF10E529; Mon, 11 Nov 2024 19:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354018; x=1762890018; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=hTQbQ0ZrrTcqO93DrdxrOnJN0pVI3YRO5XHWodo+0Ks=; b=mPmvk9Si+8Nh9paQXzCohKmmsY5yRHw98rxgHmCyKWv/9xIduC4RenR1 3/wRwJhQcyMj0t4Ay3IY2n8tHOADbIN1l9IfW8X/e4KISa3Dmw9vNNXI4 6dT1vGWj52oMMFk+ekbp9eyNSS559SOLvr4oI4f1tZLwFRIVn0HcRCEbA S5Vj3WjtUtqYwF05VR3Y6uzPm1FCA1TZNB10VddU8m9aI6puSgLlSMJLY mjk8v2A80UjcV5ptgzbX9cuN0RGQObtV9v4+sNQcPc2uoDk1pTLuGqKdh rM+GF17cajIAsBjI7wCnnHLNtDCfXkl3iKcurOJ3Ez7qL5ysiX/zho8da w==; X-CSE-ConnectionGUID: XjoJEI+AQEmnERYJL590LA== X-CSE-MsgGUID: sN5zcPypTJCOrYzcSUrpug== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53731264" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53731264" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:18 -0800 X-CSE-ConnectionGUID: oO7SFfJ+RFyPLCYd7HodkA== X-CSE-MsgGUID: G3+aqBubT/6hj72IJ4ylLw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="87023964" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:18 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:17 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:17 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.42) 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; Mon, 11 Nov 2024 11:40:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DqQdbMrb+O6XpmaWA4C1QO4m4GB+4DBEEPA1PTtEirWjKLyQEUb7lqX5SSBjSuiSd6Ob3SXKRR+WvnjI7fRoSyd3HRGy2h/XfTIKTQj154+8VCnQ04P0zj6XHemMygbOxznFSFpXsZptj/p13sTY494GLK6lWuuO8p8u1vemCvwTduACCW5tsu1+DeoCxOYySMKyGJKuqhs3O9Km/K3KR5MrphRrV4b+3MQsZmzcZYEkoaDyMbq3nk6MWDOJtZ6dhaKN11r1MELSgfGWelTzaNDEHfNr1lohY6BthjTBuHYQG4TCUJ7IS+R4n0JRok6+25aIYWzVqTiDzZJOuQkwig== 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=jUfMoBMSmeQslTgzSQGq329SzuJ8zab15H2ZAHwDeLw=; b=mNPOvxv6TXFSqEVSk3+jy5rsChTOefXEpP4C1V4QxX0x+qjMXlEIx3maG6z7J7q8i7f9RSo4UHxmOlkzQ+xwbszLysenEp+8GLngToRdU5/JieatgdplWwZXsHbDfoR1obZ627z+iFWKzJ85L3B7A9uBKgbXHhi6SOKA+smFclGT+3whbkkulrsFdd1MdlCmhBuak13q/bZkmAmgbZz5s3u5VXrhxOP94DcZsWv6mi0z0oNkqJkE3uH6MhDJoyr4pmGGpp25xc8D5NHZo36NuPXHESyfYhy+6adfQ020x088rFNHzkbx/+m3KrWI0aCf9kqYCtK7xUc5cZGL3TGNtw== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:09 +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; Mon, 11 Nov 2024 19:40:09 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 4/9] drm/{i915, xe}/display: Move DP MST calls to display_driver Date: Mon, 11 Nov 2024 14:39:37 -0500 Message-ID: <20241111193947.128871-4-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0342.namprd03.prod.outlook.com (2603:10b6:303:dc::17) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f19be69-21ff-43a0-d8cb-08dd0288a672 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: iiXTSWmYumiai3KXjgloXJv+YRmva9OeEr0GSDFPrvFcQhezDe41eFb6M7bl3zjUEPd6NHiE0fa9pUqkV+xAYDfANxjEqZ9cTTte+7VUgcisWi/gZoJPefglz7JQnOCHAUxZ7pNwrulIeo72I9/hox62znTDlnBIvZQwjWYQCJ0/s4I+LaboqJLDkBTWwMFxO7+DjRzMeqqhW0mLhz9OoukHYHMBLOmCRw2hK+nVWlLa6dxIakd1D2roEDt6tugJVTmh7Lw03AFwP5dIwlDtdHbvU7P35QDKX8hOSK7thzNsoPH84YYcpKoQ8UOThsquGxbi98qHPul0TEPiuseEo14p5q8hMEWc8nhL0+wf9wWc5Edd0m+HrrfR5ViJ3LvCnnrtIIdCDJJc355g7HFkm7JLiAKfnklcOzmDDSvcCbMZBFHV9rNh9UvqB5ty081+ebwm5cNmkFVjEC7/7yFVRtg2LgKL/4maga5mSeUWo+QYVrTf43RSZ/DZMkvHgF5hzmPRtMTxlresgZptRlQHk38fBNMZN4z4o/mP/oTUwzPAslfYM/G0kTNbp5QYhHhBaE6gtzHjNJE7uXXNLvaI4ngGSJagftj79x/Ira8IWUdj9d4sfezaaFP0VYJG/z2fk23uS6ScgKtesUKH5EPV7flKWRyxwC97K9wcUHbJt1hooNYOwEsxZbNb5vpEeKc4zFTjNHHLzPhcdoRsHLc27jhw/L0smuJxFXU84N6ibmjbS0BYB75PTyw/pJbt4+ZhdzC+jNMHFC5Jvaz50r965Mb9S4YbJM/nqJY+c6AkaTJ/+SlJWtMGfw7zxPmZBOy5SvTxCqzaAdWdMh9VVIN/eJviWqlNEKWrZBsWBVl5IQauwjKyFTYrXLv0FuQLJco8XDlh4/0UnRSrtI5nL5Gd0B4gE1KJZQLx8TU6Rf8/GuEoAauy5tmRdFDb4giTXjq76os2irivWAeybw4ihLOJv7TPpiN9bRZCC/2d1grHCXvEeQj5ET4W1vLtI3cUGd18cwLw1poM8M3yaPXnqARzpr2AZwM7HwhMdbSGYw+TPGXn79OSa7e8PlqwdwnWrlwN2m/mPYGUxT5BVGAtsrs3DLauYB7e5VX2HI5atEimwx+YjSVdsozAtj/HGslfYxQ09nvtlAr/XqymOSBCVItth/hmVBgVaFANwsC2OVgL+XH6x4UZjOCrTHIwnfV/XT69x5Qn8WfCcD3nmfynZiqAJW0n4U+at0zqmwhUxe5If6KYgReWkU9lxn+UjntVdHnqEn5Yw8/7JPaYpN+rwW718yLflhh6XtYPXfZAudESiPVzaxhKDjeG5M7XxxjBM/tJ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Anti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yBUNIkklcD66VHi/Zn4tRCbKKGtqvwcjq01hTIxaLX48BXG6nHNw2ekWaWot5z1fygnjsh8RUM0wGHUw/BlY83EfRu902GnoxuLT+LQWozV9CEHIAzdF1yirscSMW9gabZxrheendrDNPPr5gXGVFZJqKzXgdQsxmdRjN53kO1CXFmc55rQQhhF34y9Qr7fPonT9AIuwmz8EH5jr7p2b0Qcb/wQemN6ehpXMUj8Vb97zZj5yqqpO/EDcg/u9fRScY6O2ASdk3j1k63gfLGXbuuESXgcjaHvyT7LXuLb/L5UFUD0fnzLBOjdZx+N/I4H5tdXKRTvtuYvWO/I61l9ljdshldYVeHJooNGPIc7Vuj5O6ZM7kKJngpPsXGPB4mSxL6+4Y879AYageQ/JXMkNdmzmbwm5IpFR7sA2oPWhf99UeyeEEuLqpJENUPlrYdm68iF2iVBoNyOohydeHal4DAeIlNGxN3KrRi4IoQsmx5Xlng7MpV0wdjn1vYmoQTfE2TnUiGUMqcH/3UIfVdo6iVOLewa/Yv+Jo0SHMtc0MqnVKkaoddWVCDW+h6k3bbm6+Nyg== X-MS-Exchange-CrossTenant-Network-Message-Id: 5f19be69-21ff-43a0-d8cb-08dd0288a672 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:08.9762 (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: er4s+barjpSe7akV5W7jubnIQxFnm2U7QtH6D4ZO1MUlf44y46Ii+zoJijD80odZSnO7iER1OQrTM3at2U+ljA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move dp_mst suspend/resume functions from the drivers towards intel_display_driver to continue with the unification. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++ drivers/gpu/drm/i915/i915_driver.c | 4 ---- drivers/gpu/drm/xe/display/xe_display.c | 7 ------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 56b78cf6b854..06a60be649ee 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -676,6 +676,9 @@ int intel_display_driver_suspend(struct drm_i915_private *i915) ret); else i915->display.restore.modeset_state = state; + + intel_dp_mst_suspend(i915); + return ret; } @@ -729,6 +732,9 @@ void intel_display_driver_resume(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + /* MST sideband requires HPD interrupts enabled */ + intel_dp_mst_resume(i915); + i915->display.restore.modeset_state = NULL; if (state) state->acquire_ctx = &ctx; diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 7ded0f4675a0..249586df9d50 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1038,8 +1038,6 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_driver_suspend(dev_priv); - intel_dp_mst_suspend(dev_priv); - intel_irq_suspend(dev_priv); intel_hpd_cancel_work(dev_priv); @@ -1207,8 +1205,6 @@ static int i915_drm_resume(struct drm_device *dev) intel_hpd_init(dev_priv); - /* MST sideband requires HPD interrupts enabled */ - intel_dp_mst_resume(dev_priv); intel_display_driver_resume(dev_priv); if (HAS_DISPLAY(dev_priv)) { diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index b5502f335f53..3778a7a0e52d 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -334,9 +334,6 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) xe_display_flush_cleanup_work(xe); - if (!runtime) - intel_dp_mst_suspend(xe); - intel_hpd_cancel_work(xe); if (!runtime && has_display(xe)) { @@ -452,10 +449,6 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) if (!runtime && has_display(xe)) intel_display_driver_resume_access(xe); - /* MST sideband requires HPD interrupts enabled */ - if (!runtime) - intel_dp_mst_resume(xe); - if (!runtime && has_display(xe)) { intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); From patchwork Mon Nov 11 19:39:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871190 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 4692ED3ABF8 for ; Mon, 11 Nov 2024 19:40:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D05AF10E538; Mon, 11 Nov 2024 19:40:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="EwhXo/bo"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00F0510E535; Mon, 11 Nov 2024 19:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354019; x=1762890019; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=93jnuIu7CExO1UeCaHFUTkkiwFTMXcysjDJTyXAT+PE=; b=EwhXo/boskivTtANziQYMyrruNFLXhu8mjuRZoN1k4AadPAzi5ppdTmw WeMilHvYFKadm6ujiT0XVOjt4aXhnUrLS73O4DiwjhnIsaKa4FSNO5UWN UhDgwAfgpBkOLcDMYZhzWM+4dFTOgZOMmiha62++ywopy4VrdCN2FjycC M14MMGoqss3hFD+hMGw3ZNgLBO3CW9npqKjPatGT1lSPcfYM1M5I/YqY+ xOm7twNJWFZKOrKXfreagDJslSDhTGlkVEGwdWg87yBW+QM2VShHEt44E 5B/l3gcFuJ+O74mm82+puWqxhlIsS+7/Nq/ghRbb6ulBU6umsfeN3Ice4 w==; X-CSE-ConnectionGUID: MoWJZEpISU+L9blZ+d9QOw== X-CSE-MsgGUID: 7jT25XPzRm2uyyyuV+qGLw== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="34963000" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="34963000" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:19 -0800 X-CSE-ConnectionGUID: 0cpBr6gTRCqqG8Ko4wTbHw== X-CSE-MsgGUID: of2+8T1rQeCGzUbWBJSu8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="91855636" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:18 -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.39; Mon, 11 Nov 2024 11:40:18 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:18 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.42) 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; Mon, 11 Nov 2024 11:40:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v23sHXvvOfQ7f6rFkMsWC2jAUTH60zF6eLSnNxLj1LHteNxkAked/V9Db8enDc2BNj7RBDRh3sSZfDYxCYCWIrXUhiOhKWNk+YxujEmbElm2a4VU6U/cFNW1DA3+AkFW67ptOoiTRkmfAzhv93yvopsBbnh17HJGSnAxADOr6+bEjLOcH4DW1G91nHYqRSaUhAOfA/Bt08uWBF9TE7965h5+JxPkHpLpmBRmRXC/C09xv2njV4o6N8gmjj/mDB9U+YqrKTsKfwwZzRWcameG6nbRYPHEksjKuhk1u82uyGiyoyAe6sMmoc0rBWLQ1YBxRWnT/tfHdb9t4odBfcgCnA== 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=FN9L3P/MRCVYUkNR5Wffnw4gZ3PvpgXLjJLOmaF6D+k=; b=KhN5i3uo8yHGPqqV7wujQ4JGiceqQ6Fy0/Jm0Ip0IrV0GN1S1zDPyM3IAlMqmBejWsgvNaICzZ44Fnuc9eu7iYxTLIQ9+mGKmto2Y3kmKfgdUpJSnv6s1BqLEqYjARvZV4gmiZdsIKQ1PXo5IhNuOWBHKryQEIVyrBcOyFe7nnSI2ZCJcxkBeT0mfjOU2VtYqHNKy+xAOYYRXcSUhv66rdXhCiTCHJWZwGzXDQoGxDzp0j4vBlmwbtAn94AntxTu7tAoQkz88KAKU1pmcNQneeF0GE2SeyoBSKn/umYI9bbek6gqE+JItF5ds2UvuFpOgpBiqJ5alL6i0yl2HZMQEQ== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:12 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%7]) with mapi id 15.20.8114.020; Mon, 11 Nov 2024 19:40:12 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 5/9] drm/xe/display: Delay hpd_init resume Date: Mon, 11 Nov 2024 14:39:38 -0500 Message-ID: <20241111193947.128871-5-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR16CA0013.namprd16.prod.outlook.com (2603:10b6:907::26) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: 2fdb92c8-149f-421b-58c9-08dd0288a837 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: WM5zHN1O3tG41c6krtBZFubRZL6WxUSJ8D0tKbMnlSZHLRmozWuN582Jo8sgLnUfbWFdZPAYH8xinsqePLmu3q8teDf9Ti0t5n4wkVcGj7Tg3jOKORg079IX8Q3VLG7vuW4hBu6duo0GrpOpkXJAWuQ4+LRKdHLEom6s9jBOKKechjni3zGpEVY8/NJqW4caLHvT2oFXPQCCqLRvD2cnFnwfQ0zlwmBqVUNhlRUvzgjxJ/UeZ0llQPOk1lmbiKGtjsuBK4BVz4BIOOl5cCjkcRfwuMxV51pNeamoWpbjKkamerjqGWNhaSEFEAZTpr0mwJ2OqJ1wIPXQmryGXfagdMKGwAJkgy0Rm8AvTESf7GAniuTW3HMziJbwAXlpDOq+1mXIZBNbRsqb5HhhtpmdlXZWQRt0mnrkog9noHKxlgDbwohfrQ8N3Eu0X7cJAUtVZG+aWBTfVIMNhiDS9F8BfNAqI1OaHk2TiKwj5QTZC1oRadUOZHY7iwYkDkc+4KlzaqkcilPT7PyMxtslr15MDdT3VCDu3GHi5MQzh2OR3ZmIa8tVh6R0W+HDL1/PhzRCdWUekj2+LmWYALQYCBfvsFmBr0xrNWcld/BzJStFCg8B/eGt9CSPFQZxj5CrsJufE5UcwjFoyRf45EPNwl8eJjny7a5OYnWFKO5whLh9bBs8thF+8EGoBkHmLg9VPjlsdtZMxwThyvNKMawhCBA3xGU6E4o7p687mDL4pVcKtExPJTp18li4KHM2xjdsT3h0nmR05eaHIHc/tmuGmmpp/bpvnUJIuGe09FTq3FU4wnlzKD7bB+V/lIm/gdUSUTZVJnj6lSbZvCjJ7k0hCn8dY+HPOCG2Utnpws0OE3BQYwb79TMt3Z8mLzg/5ogfIqVIOLNcHBBzsICQd/HLvKElEMX0Br8oxomZ779Nk6AJF5nVH4hc8EeXIHGnVOufLYwelM1/95YyeRUigKBBHWi6C++brf+aFpqvoeZ0oe1moMesbN9zm4AUNQj3+Mfv80Fx/MwidMJUW37mYShXnh9Pe4fOMNGZ1L4LimboPcD+4rrMC47QZWO1G9Adg262E5v3ueE4FYPPp87mzHilM688u7EqzA2N4H2T32SrkPFnrFV1xxgX5x3V5numml4+8Cup5KqFg5bwQLaViIdvZ1ybetYgtQc3uU6HU1lXHKUbi0J/l4yGuzPQG4WXRDHh6KtVyHUMHMQMTAkBK7nib//CAfLMgYlX2m03yew5cjXHsc/3awLuQnvWd3w6BXCpZCGE+eZKlSIIHVtJxqVw9xtMNxtmicBrK1lV1+eeQmkbCBGXwglUsFXcAin+8Kags/UF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jnMrV9Zs0B/4ZrnmPxhWKl4BknoSRcdMc92acektWMaPdHqexwDFD1G/xdG1C3asrNloGGSkILXQVJy+kMEbcXu3XWUgQm2W4UvlaRcXthVtDEgFtN7TiuQLfsIwDUWBJve6PTLSuoLvkPvq0BzJ+GkZljoCoVxC4mXBstk66GUHKx1yx9/zxEpAUSMY/k1HnQjgLjtwWU4+Kimhh4LY3yHWVGS8IW7fQZl1ngEEDPiWokn8P1Td/lmGGkN8N6Kp3HyWiksVqFzAgNt31IkdLw+xwfRHgUmsqJ+TQiJcciv6GygklTcBcnZwVFPrVAsRblaXv/wNCRX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Ki0uTahmKg193z71hM6RnfFlve/KwfsHtf+vDPHHTnqyzl705kBmEUHaqcD5Jwp7r1iDNUK/TXasRqGLSd7JTTexL3vTnmOMayZvkfr1OYZ/Qo67Tpj43OLYBxdwUFUjwHcsKGXoEhVAYrMx2RGDwT1jPLYCL+ZdnXgM5Sb4TmRGAMEuB+78FubASuok3ZJ1M5ZL4R2CRCrMG8bJ85a4N6aMQB8qTg== X-MS-Exchange-CrossTenant-Network-Message-Id: 2fdb92c8-149f-421b-58c9-08dd0288a837 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:12.3601 (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: ZjgUUC16r0AphLNN6LJk0Wsg89A1/WKcathETvkK/RmxRs8vrn/UikBoMiceYlD63zcpX0MAC1pfTr49a9lifg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Align with i915 and only initialize hotplugs after the display driver access has been resumed. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/display/xe_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 3778a7a0e52d..fe4d7c210744 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -444,11 +444,12 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) drm_mode_config_reset(&xe->drm); intel_display_driver_init_hw(xe); - intel_hpd_init(xe); if (!runtime && has_display(xe)) intel_display_driver_resume_access(xe); + intel_hpd_init(xe); + if (!runtime && has_display(xe)) { intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); From patchwork Mon Nov 11 19:39:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871191 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 92D08D3ABF6 for ; Mon, 11 Nov 2024 19:40:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F70B10E0D0; Mon, 11 Nov 2024 19:40:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UypCO6l5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1AB710E53A; Mon, 11 Nov 2024 19:40: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=1731354020; x=1762890020; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=tsWhzyZZi+0vsKFxoyh/0pARPj84BsdWM+xnK0YQNI8=; b=UypCO6l50OkwGOkdS1USb48QEMOySOx8KvXPqgFlj1X31+xEvrEHDTGA 1/M812cwp6JN/j3wB458Hxx0hZAAjxrDOtp4tbm0vqcD+js8xQMWAdSFB C3JLJeqFtj945K0wrbKApEwgAvxY4TY51EXMwv6ZTdEDlTV0IvrPJsw5i bQ6c0DdwXoO5y5HBBrAiekNXVKpzZBhOuKhun6crgt/mqwLN+gCCqOjPc hI69gWjWrw+R46s7i5daihiEedkUn7dhmUuUrT01VyYEg5N0e+ShX6lHH VyU6/zlPIYBPJkvTMvi0OzDijyhcrK2VJULMCLlrf3HZ/Yu1N2DmXq/1f w==; X-CSE-ConnectionGUID: rpb7DE/ITUOqjFWAc7VofA== X-CSE-MsgGUID: uDC2jzOmTTWAeT93lSx6SA== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="34963002" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="34963002" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:20 -0800 X-CSE-ConnectionGUID: fm5udiY6Rom+cTla6dwiQQ== X-CSE-MsgGUID: 9TbLN/vhSpC7F3aUR6wO8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="91855638" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:19 -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.39; Mon, 11 Nov 2024 11:40:19 -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.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:19 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:19 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e+tDCa+rL0jhRIrA4hFF1G3XIl6mp5Y54ZXB0Ec1Gf48YsKFwaQZcpySKcCo5d9BDwXPrpgxA2HIbG34dEF7jKnuI+PDZSwwThu3d8srf9S6qagLXPvBuWir5E9PKWPE8bm7rg6b7XZKJhKJcK8SMgxdfH6M+yjw6it2BTeHrhGYSUlRSFNHAni/nUalJ2BhNI5MctkMAz9LHJ82rip5ma1qwZ6GB1dOom1ducm6MBwhCs6BjuFkKVSp1oFQZeewpsG97EYov7mueDIYhzF9hxP9lOzjQ4K/pZdenbP+y9Sg7LXN5QiFA9ZkEOOLxUwIQeaIJFNGXcT9uVQWTqqNAA== 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=XE2Eq09Z36rUePjwahe3QMh25jlgHXIt7ouHXY9gJ34=; b=quA/8ILuvE98o0YEoHlFFRGgPcqPCuFeM9xZS0Eo3X0lKUVf/4a2Vn9EcSmc1FA9L7mSvBXz2fO9MKTPhgpm7Nse1AM7B3A+GY+vqhok0iugHWDSGrScTGAibDbb+kL6woOuIgBINYOnKS+KFELiwNKUn3Am+XlTstlLK51rKNRx4+JtNduUuIssq3DzIltQhy5sdz2cikxShlYWDvnR/eWEOBkP40ietVIc96yPYCfoH88D6NTJioxV3mdLcaMECyHK+m+q3wBB3O+Pxvgod+nBlcrIiL3w7dY+WOx5j8WcCr8biWo1z1i6aA5a0NAsKBdH5+9BBs2jr1+oOFdQzA== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:15 +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; Mon, 11 Nov 2024 19:40:15 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 6/9] drm/xe/display: Delay dsm handler registration Date: Mon, 11 Nov 2024 14:39:39 -0500 Message-ID: <20241111193947.128871-6-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4P222CA0008.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::13) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: ebfe840d-c0f9-49c7-172e-08dd0288aa19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL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PF9KIQuIYoTk0+58r+CXjeOfW5pn9oTwzTQ8pCQrEzWi78v+WUHYup6n0Ya+khLp0jMGdcT6G2rTWuSq2rf9E12uwlNPA0r46tbhZCqi66NkmoqCMOXHJ+TrVLtCsD3eTVQnpiuqknd4CH9XVdxQrnR9g9/yXGy33SKBUttX2B6BsWOh8iDWSydXG1e5vURuX0CDloeAHlr58WFWtEhzZdk/iDHwJq2BCKXaZa/u8EuA/wrXQEhuzD25MQwPF53k9yOD3NjR3Pnc2cY4VuoFcwMu9T0/SNa2FhqqYLgPyZqvIwEnIWO0+lOiSd X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: arp8hiVivx6RumKmfJAiymFzJJkvgqDkAlvKvrF/dL66bja5O95y5fNC7+3bS530C0rxYZDs0ErNnDyzdZGloR4vPdmXfs4SAW0IPcM2dyOh8FY9emL4uxW8Zs3dHa7I1JmkWrMYD6PD5yEzFr581/uVCq4f2x9bZ9EN5gLmp7HBdkplrgGYon7WvuScbZZiGUFu9XjwSgyrI9HTReguok8F0QA2B6lLMDLb8nDOh/nq6wcKf9Zhsduu5pL2MaGRTbw2yM/wlKL9Lk5fMfmknrT0W1n55yMCPICg955MZEqLTk6pl2Z5eQXc72y0ERb6brN9+S+Yt53x89O1jYuxUW8AhtNzdEqE7G7BFSFKuAbG8XIEYsTej9XWr8IoT99CMWkVyXiUHDl2AN9/PM/m/39lP/v+W2APXX0q/c0HOgiHXwAdYcv+XqCPESzcXK0gS4HxilIRAxEdJ3jc6mljT3MwGqLEZh4XA4qrDvn7//AUeLosqtjUTPLQgAyKEneaPcp3KvDAVQbgDCFvnnbDsst7/ESIauEIbZICIIdMXere9m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-CrossTenant-Network-Message-Id: ebfe840d-c0f9-49c7-172e-08dd0288aa19 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:15.5625 (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: OKObF+GzW6P+W+mqyuruD4r4247qZnmaNMwv6xwX0xeTurVySJjpYY/DZexSz1MKOJkhOtLI18QIomNtm6x6JQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Bring some consistency to register/unregister order at the same time it aligns with i915 sequence order. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/display/xe_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index fe4d7c210744..c37fd3ea93fb 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -219,8 +219,8 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_register_dsm_handler(); intel_power_domains_enable(xe); + intel_register_dsm_handler(); } void xe_display_unregister(struct xe_device *xe) From patchwork Mon Nov 11 19:39:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871192 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 6330FD3ABF6 for ; Mon, 11 Nov 2024 19:40:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0421410E53D; Mon, 11 Nov 2024 19:40:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KiNjUeTF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0BE2710E53D; Mon, 11 Nov 2024 19:40:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354022; x=1762890022; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=PoK9SFotnH1aeSJynZ41ox9He3UKzul8s1XMsjC0ICg=; b=KiNjUeTFn6qg4LjFKXEBVhnqAxl/vZd170eZNhJ8G5+4J0xvarmkq+2B kizqxfOWGiI3wC1y/iu9izaZqDiW3+p26fE86rUE0gXd84twYye1NRGCC vF7x7sxN7U2pCsDdz6svBpxJyKFfG20HdYqZNyDxu0JG9Z0DfalFYx/au PnUS5q3HxuGdwmQttb6IyvaE5rfoO34t4+4FvsRutkJqV2eeKOOfiD6Yf 9a0LjFMJJps9yHTepDBiAdjis3t4XTo8NnDyMobCh98DPHdlpHU1lZcjU 9CHOyECHlAbHuT/qRJl2uxyqYPisKdX2hJB34D8/rw67e1xDo+0EoBdTu A==; X-CSE-ConnectionGUID: yK1YVRG0SxCm9TA8KnU8FQ== X-CSE-MsgGUID: jzAmf7+ZTomui2LDDd2vmA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53731269" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53731269" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:22 -0800 X-CSE-ConnectionGUID: D6hyJPkSTz6WtvFEkHlKcQ== X-CSE-MsgGUID: NFxsWEAtSOq1d7QGRNLdrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="87023970" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:23 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:21 -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.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:21 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.42) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=smpQPmkce99qE9swCicqgvcQBAPuzXb0ScgshbLDXJ5chbOUj8ZAUN3r0ECDd4G8pQRwddoEBwLtr+x4QdMv07Jx8xbwlYDcWg1MIi4JzLWQ7ZujRF72Wwt2CZ2kbbQQjW8KoKEEsy3sLVIoy7pp+H/q8GizRbz+DQ0HYW3r9Tg1MevzGB1Lyr3qwA76Sw7Hg12pd52JdzbhhAr6GC+TvzBynQe1mrSRtQTPzXBnZ+OM6Cn/PBtSeFmcshyDoFmBScmqPriYAQiK/Wdl/OEBF3bvKYUszKjQjzeOkXzjuNNhP43Qqq680t3rlZRBa4/oORf/OJXs7qyYjAib7btoBg== 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=o4vHfhls5FZXclcmtuCLPwpmv4KdIN3bBhvftyFWAs4=; b=m0yTnmwHctSZQIZYdI3iuzmn+By54dS10OgHx1jGaw3KIYopVWYsG3lwMV5R/oJCjRuQDde9PBqn81Ftzmh0caFfsIjjZTSgN0SZkpMZru/34nGfKiXQ8gVueWMcIZY0z4HMa57BS7Zsz4+wZUUyxKb+dKFMCUnfH16GV1PkWV7KNOqrCSVROHtCppNKfRGkkhFYDBnORpghFRFdtvU1EuNANyR4+CiW/xJlwT9TZOft2+1yO0D6aquPmvhh7BBwFD/0OfC2zTIXos62goB2eLl4gTJc5W8QfT1mElaFTxTfxrzk6SF1yQW/tIe7HoS+U8LduFOx0eqnoVbhcCUzWQ== 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 LV3PR11MB8506.namprd11.prod.outlook.com (2603:10b6:408:1bb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Mon, 11 Nov 2024 19:40:18 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%7]) with mapi id 15.20.8114.020; Mon, 11 Nov 2024 19:40:18 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 7/9] drm/{i915, xe}: Move power_domains suspend/resume to display_power Date: Mon, 11 Nov 2024 14:39:40 -0500 Message-ID: <20241111193947.128871-7-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0329.namprd04.prod.outlook.com (2603:10b6:303:82::34) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|LV3PR11MB8506:EE_ X-MS-Office365-Filtering-Correlation-Id: 15ef54a2-f337-4bbd-4c3e-08dd0288ac24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: jT3rK36KxHE+P2C4RCsoQsMGxMmTVCZWQTKbzw/kAvDqFBqsqCRg54m8AtmUZv/zFuWt3OzsHTCZ3Na8caucreSsoQ8ge4wJFD7jI3n1RqQqN8iP6PzmpbJv9Y86YrNr0NeYs2MlP+eJRu34akz9C0zWG5DybZyflQqND7RLWAJbpI3iHT4x3WlDCYomxU/J3Nz/Y2kzp+M41D7kZCR2TG78rjxsoXkiWL/V8qYmaRS8o/vl3QX09qQ09/NCaSmfoADG/2Z2AD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H8vu5iAswWPjqTt6p X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uSr9zoFkJZf1s9vMs1+xPBTwHAsS5/ICX3JcNVHgeATuNr84eXUhYWQvAMr80+HpZOh7CrVkTaxqtuG8nL/yaXzYlsnp41mGa7USDQyCnP+ccNrVQ8zoF4T2WRbrkkOfUkCYrJmzBSXT7Blp7Iq7XsEGpAd74DXO57USTXVO7+hH+TsJSsNNksQ0uYTh/QmJJFbHFNl/vt82H5qll4Pk0gVnNbbaH84HjKlRvClRnqryTYlz2VJKUSL4f0Lr0Fof87RgRDMSBS+Dvm6gz2J5q7FeYEp8QrUe2059XFIbrdYpWZUquNQM1CPwmv0PsJdLUKob7MvS1bDd/bOnt9lmeYwMjw5vkeoKOYwOf0xb3IWdF4lV9db/XM8pztk12ux+68vxiVrq3QqCz15/dRavGRl30bqinUC5BO4nq+dZj9fp8VH12XeKfe2/W2FITYtTDfzF3FQi1PpalFit5WVgP9j/IKgbXQaU9wyDABd7laKr6yyTxGgGQOclV8SVBQ01KZMUQzMHElrHTpreD4+HprGlyLAHAbnYp9ywRHL061KRtO5LTB2/Ug26KQ247IZ6Yh7RvvAElHXIErhsWexijVPrNOZ8ez5VbC/KeO46RDbUbPPWCyumrfGVRRonkWaBBm2UgkYlwevvfT7Pqc+5V0CqCxj7u1eTTvoQ60GGbGEt44i4lLTo+6KJulDxgaXO62wkItLkc5y4edmRWBk532Y6DdN/QrgVWPxYdGExW6aCFkBN/fCyhR4j7evus9NaTozFCn7wnuPbZoQynGN2e9Cjhj75NFD+98M/ijh0s7gFGLX+scYAfZXhBBOkuyC6QXJYqD+5pabfPANiG0lZpK1pktRRhk3GKpWVq6mjSTr8cAxDffhepXwiTAx/8u6ggwwIam0MoUP/K8AIWLaRj5Y0HbCGD9uCBX78YGzTp+ZfFYTDoEA0HDTpZ6S0DEGMzWLVW4F878uhcM8PsD5V9qLpvw7M9yuxXrdZZlmeS7MITPP7lldPVsxfnkYULqiTq6M2TEf0Ipoy+vtkPy/ZmxLsMRRRyDJY7TG+KTjRmBuq4UzfwIJg1wNCfsS4ELtS9Y/d0tAJp7ljcEZ8sb9uWoJ8opu+pt8udZSPvvk7PAiMh4QX3d2F/OeAKDGlY/4mKjFbLC7FEUfPERIvKu/OuLs5wb+Zj0E+5mBWNDpzOEu+/VAtYrqf9K3PaNV5fyR5UyrUq5ArRKte3tXnpFKM3MmSWT3nJqqwS4Fe+JwuuooPjSKqPZQO5DcnigI5smkYODP/xChWBIUNebvxaNo1y6FO3XXVxECJkf1zL3MyhRyr+NJVwOFPKTfgvKik6Yacd8fbXqnGhLk/V92V4Iea6HlpwNULTomL/qB4EONxtYUt/61KUNixWyi9Y4DFxn0WnhpZlIqT55YRoOgEW5eR1BZ4Lz+b4MnPMFWD/0vI4kh/i+6jXQXGWi82MKf8sUVM4PiFFGjQfuhNn5eGJ3iaw/L0SsB6glVOK0n4cSE+4FsLaw7jx16kv9tcPjkyKc7ppnaWFUPeoC2TKKmz6elhX8cBoWFSGsNothPvGKbuSWNAmVW2wKan6nIJN/eYRAXvO4OstK4o6fnSWWrQKale8w== X-MS-Exchange-CrossTenant-Network-Message-Id: 15ef54a2-f337-4bbd-4c3e-08dd0288ac24 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:18.5951 (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: aEUNXy9Yks0JfUt1Zo6509tNi1qTE2kSIGjQ9OT1yvAEfoLxuu3mdOvzvhHTsxxOQhbrc6msdgNFcsEEJ5A2rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8506 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move intel_power_domains_{suspend,resume} to inside intel_display_power_{suspend_late, resume_early}. With this also change the VLV suspend failure to call the intel_display_power_resume_early. In the end, the only function executed there for VLV is the intel_power_domains_resume. Besides make the code more consistency give the call that was immediately before: intel_display_power_suspend_late. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_display_power.c | 6 +++++- drivers/gpu/drm/i915/display/intel_display_power.h | 2 +- drivers/gpu/drm/i915/i915_driver.c | 8 ++------ drivers/gpu/drm/xe/display/xe_display.c | 7 ++----- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 2766fd9208b0..59dee2dc0552 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -2232,10 +2232,12 @@ static void intel_power_domains_verify_state(struct drm_i915_private *i915) #endif -void intel_display_power_suspend_late(struct drm_i915_private *i915) +void intel_display_power_suspend_late(struct drm_i915_private *i915, bool s2idle) { struct intel_display *display = &i915->display; + intel_power_domains_suspend(i915, s2idle); + if (DISPLAY_VER(i915) >= 11 || IS_GEMINILAKE(i915) || IS_BROXTON(i915)) { bxt_enable_dc9(display); @@ -2263,6 +2265,8 @@ void intel_display_power_resume_early(struct drm_i915_private *i915) /* Tweaked Wa_14010685332:cnp,icp,jsp,mcc,tgp,adp */ if (INTEL_PCH_TYPE(i915) >= PCH_CNP && INTEL_PCH_TYPE(i915) < PCH_DG1) intel_de_rmw(i915, SOUTH_CHICKEN1, SBCLK_RUN_REFCLK_DIS, 0); + + intel_power_domains_resume(i915); } void intel_display_power_suspend(struct drm_i915_private *i915) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h index 3f8f84df4733..688f3b60b5c5 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.h +++ b/drivers/gpu/drm/i915/display/intel_display_power.h @@ -176,7 +176,7 @@ void intel_power_domains_suspend(struct drm_i915_private *dev_priv, bool s2idle) void intel_power_domains_resume(struct drm_i915_private *dev_priv); void intel_power_domains_sanitize_state(struct drm_i915_private *dev_priv); -void intel_display_power_suspend_late(struct drm_i915_private *i915); +void intel_display_power_suspend_late(struct drm_i915_private *i915, bool s2idle); void intel_display_power_resume_early(struct drm_i915_private *i915); void intel_display_power_suspend(struct drm_i915_private *i915); void intel_display_power_resume(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 249586df9d50..dee9c6b9d6e9 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1084,14 +1084,12 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation) for_each_gt(gt, dev_priv, i) intel_uncore_suspend(gt->uncore); - intel_power_domains_suspend(dev_priv, s2idle); - - intel_display_power_suspend_late(dev_priv); + intel_display_power_suspend_late(dev_priv, s2idle); ret = vlv_suspend_complete(dev_priv); if (ret) { drm_err(&dev_priv->drm, "Suspend complete failed: %d\n", ret); - intel_power_domains_resume(dev_priv); + intel_display_power_resume_early(dev_priv); goto out; } @@ -1290,8 +1288,6 @@ static int i915_drm_resume_early(struct drm_device *dev) intel_display_power_resume_early(dev_priv); - intel_power_domains_resume(dev_priv); - enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); return ret; diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index c37fd3ea93fb..737f04f45cd4 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -400,12 +400,11 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) void xe_display_pm_suspend_late(struct xe_device *xe) { bool s2idle = suspend_to_idle(); + if (!xe->info.probe_display) return; - intel_power_domains_suspend(xe, s2idle); - - intel_display_power_suspend_late(xe); + intel_display_power_suspend_late(xe, s2idle); } void xe_display_pm_shutdown_late(struct xe_device *xe) @@ -427,8 +426,6 @@ void xe_display_pm_resume_early(struct xe_device *xe) return; intel_display_power_resume_early(xe); - - intel_power_domains_resume(xe); } static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) From patchwork Mon Nov 11 19:39:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871193 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 1E1B2D3ABF4 for ; Mon, 11 Nov 2024 19:40:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2D4D10E530; Mon, 11 Nov 2024 19:40:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ge1iNGO9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6953F10E530; Mon, 11 Nov 2024 19:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354033; x=1762890033; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=g+qzPjrgpHtsUUvYv9BtMh5EpeZ4YHhCEVMSMVuXkxc=; b=ge1iNGO90iMAkneezh4iMx6/araDqrklnFxVsAXVD2oEVhuC41uURu+8 jnkg86CLPO9I4TBOgk87CDsErAjh/TmsMBq1OBxaVSrhsKL3YVoj/enQ9 YhXDaov+NnsDqXFE8ukmlKWgx9NUFbOPVCMQH1PtkqBM+gJTHsu1ArtWr pg4HklaaCyCh5dXJkVmHL0Owje22bcRHpMUGW9k99dPN2mkJ3tIHU0ZlN xTULA2hQsjxeWPiMgBZr1PO7D0GUbZuKE89IA368ZWxQJNTeZbij5NsDJ sQsvePfybUnJZu65a59bHJhB/vUI5WnVLnGWe7WjVxa4+Wgnu5qu/jqz5 Q==; X-CSE-ConnectionGUID: WNWuinCiQ1CIa9KX1PLACg== X-CSE-MsgGUID: EoV5Db4TTeC1bho5g3JMnA== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="34963018" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="34963018" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:32 -0800 X-CSE-ConnectionGUID: RmOQ7zyvTXe6u/39suf1dA== X-CSE-MsgGUID: UgFcLsUNTj+m+Dp2GVvHqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="91855665" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:32 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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; Mon, 11 Nov 2024 11:40:31 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 11:40:31 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.47) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fj31INA9/qKKR/jBQAIiiF45n1rcvXi6hijj/dUBM3Q3wlbNJVJ8HRxrlI7Zulg2E0LDVWVUqL5Nr9GlT3Bn56eMzrrqLeyEMytVI8h47Z5rULHrI7ZxwVRsnnVxYvw//NRKniUxasRnyPKMg1D3yVENY0mko4/ZpYMROTbcBxYRDmA7l5Ej8mlm3TSEje+ZUfPLOxrZ4ymv+PU/sOhjXX0h7yrMJR6Q6Hj4bM55s6JheHw0aNmFvsa843dnHVS03VxWbhu9I3en7hpc8VzF8OW6qVo2WArCOoBy+h6bKsIdE6+KG8wYzPecDtjGbi9JgdMBylkJIUCfnJQpOA2WFQ== 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=4soEb/1lFNjfdSoMozJK53gHhlHn5TFzjcK8cGLgAwo=; b=w1zfla3mAeIl9AV3xwJcc0YG7WSd28mCIW+rAm3aE6w21nscB4jwHCab8/Dv/6WikeKfoWbO8jffJnWfMocJ/nFzXDODzhaAjCl/DuM6mwExDqKMBBrN/ue4PThMS/5PVSFt4tEIMfIZHyQpiOu2QV75b44tyBWaD3drsDffyHyamDZH729doF4SYPM9yr700Ps7ZMQ/L0CZZgY8CA9RLAukU25g/LPYetTfV1fL7G1Ulu4rP2C2uSIYqZKp4jh2Th4YUewoLoEpUb0dgi7EolrIZSazO5g3W3BrGOv5Bn/kFZ3AI44bcb5k++itLaoQ3W7jRKJ2Tcfa88dAgnGLaw== 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 LV3PR11MB8506.namprd11.prod.outlook.com (2603:10b6:408:1bb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Mon, 11 Nov 2024 19:40:22 +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; Mon, 11 Nov 2024 19:40:21 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 8/9] drm/{i915, xe}: Move remaining intel_power_domains to intel_display Date: Mon, 11 Nov 2024 14:39:41 -0500 Message-ID: <20241111193947.128871-8-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0285.namprd03.prod.outlook.com (2603:10b6:303:b5::20) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|LV3PR11MB8506:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b540747-4416-48d3-2bfa-08dd0288ae0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: dibrMTDhcR5L5S9UR1V8MNO168k4pnsPbckdHa2xF88SU9VLxyPa1dYSFgzAjnieHx08xjtzEE5kfgMyJ9B/TPEWbmY3NZr0fT6JGzdLyWZ/6DyWRLRalWWdlDrJR6oWb/rPkTY0lKXKlD2xEOZOSf2baDHrSi65O3XCAr3RbR4r8fkNqlspTnLTMOjdvsoalap3ylSirTO6PvNPZ2Yv4WJOb1I+A+1NaG0sHJiOEfNM7npl/s1yZRGshhT3ifsXUUZJFeoUsDok+AmXahpyOe6MgSHLC7jFvlH2EVWDkqrCCBOeo0Vy8ZHBHICpxCryDPnsLCAQUoocEDzSX5KEy5IvLX9UcHw933zAm871RnMYcFcxw+0OFUpnjSuasmqFZSnmJtKaFtz/HWJDcAyOi3PL87ypOqt5DpFLo4rUbUu53pbHe+tdxKlcZyHwaVOQI/KzutiHMLlR8TOhey97tLreatGlaxr96ZfP1PP7pFOaV7D2aXBHiVHaW3lvxIvodzIHcsDDzq7zEmag5MKbkUzS1rzfHOkoOv7VjuhUE6IgpVyip9s+dbmhVmZ7Q+x/p6DwA+Kogq1c0xtw5iwQ80005z2X+/m2UJFPEM5NID7xM6fd0NOzmUZzMjlG08ULBNev67MRhkIcO8mycQcMdiuf/5PWNUyRL0FCESfMpUH5mlixTBjsS9mrZNR/MSolBrdV6RwvhHRbCBZwOuR9CkdnFTkgdHfjnq6u3IUCcR3Z5clJAjUyxEYVuHhT4kUsSgiJMBV4KcXfdyt8vx1TBAdc0n8cYdEBHnU1OD6pvLEFnOIiTZQzajs4U30ztP9ugKf4AIImNH8v0PNLv/q4yJUwmyqcupZiEVrG9P42Sb8BDaQFRH8JIEZMc8OsAuXMO2LNbtL+52ow2OGkbEquJ9o2HjFRBz5Rupt6P7R1lDhBANRmsCfidx7URuyEwldSTAeKnaveAzimqLky9eXnimds/mmFFC1lp4kWKcv3d63dipfQ68eaQK5favS5sHTaLEflR8Ziqs3TnOCqWErCX+LRwHpaoGSGILL9fhIAhfsjMpXQ2mgGhZMtUFN6N/VQH/1XR0LIEshNHOgWDHmqe//AxEdNQtSBxsuqfqpTY/5vkED4IsjNHqKraP165TLUVHGxY9v/uFzBzARN5N+J+PTZTXHFd6kRVu/AsC0p4y66K/D4Ny9yd6V0+kk0POekfsc7kjDcUOQs/rLN1419qsX9rJ5Wr+o9cD0Q2yrrx7q1i69uaX1ssRY/8qqziRu06OiYLdC07WelAjn7+wYu6QQvScq4sIbSuGewqddnaZUgNPbiPIq+mrq8MSZdkg8r X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5y4NBquYhdF/yIc9WpFb/h2DjYn0+nCk6gGoVOxS5V8bevMLU+soeiLk7olicBSWA+YQd27GA+TxhRZAJmAQrwd9qtpfkYXOLPNvROgDg0/i3xDZjsY+ktrrwQVYJAMNYwJzSzo1ldbPUod0h4P+pAdtlv0unhgYEFoSH9lOuwSPXWlgns3HzGUjm5vRNnC7DOxUu952qOgrWbg4QytmedsNgew/NOMsei/oxBlMDMECrntDHcU7k1ZprDIBbeZUZOrdRJFh9aCZwrxGmi+zR0Y0XqUDGzkAO8kRStUClFhd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YZaB+NLyQRS60dSC7EHfu6eOWTQbMS0UYtxXT5P5NiOwh8U9q1LAQzdnZrQ49c6X4TR8eucNg2Cea3CKuE67EuUjcoGJWKXhlfE7EB3dIskBeeb5FukH6/YBQtKP1hM7qclP1vwx7ibZ5Izk36jWBrZJ6FA2QtfGcg5mThBeGljxQV3uoIWm9TSj2q6fxBL6tAj8VzZNekGYq19tXOr24yKug1A1Re+lunMz3Y5BlVoP1AoPyNvOGXfsEyDPxwQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 4b540747-4416-48d3-2bfa-08dd0288ae0c X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:21.9193 (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: zmsq71Otrj6hUMB1Lcx8y0R56QOyClk8hchcwtwmMnZwu53bwtZc6fccFkHOvMDS25j72IesQSN9Te3g34rFxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8506 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Consolidate the intel_power_domains calls under intel_display_driver. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_display_driver.c | 9 +++++++++ drivers/gpu/drm/i915/display/intel_display_driver.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 4 +--- drivers/gpu/drm/xe/display/xe_display.c | 4 +--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 06a60be649ee..3b8b544d6da3 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -561,6 +561,13 @@ void intel_display_driver_register(struct drm_i915_private *i915) intel_display_device_info_print(DISPLAY_INFO(i915), DISPLAY_RUNTIME_INFO(i915), &p); + + intel_power_domains_enable(i915); +} + +void intel_display_driver_cleanup(struct drm_i915_private *i915) +{ + intel_power_domains_cleanup(i915); } /* part #1: call before irq uninstall */ @@ -638,6 +645,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + intel_power_domains_disable(i915); + drm_client_dev_unregister(&i915->drm); /* diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h index 42cc4af6d3fd..d1408aa124ef 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.h +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h @@ -20,6 +20,7 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915); int intel_display_driver_probe_nogem(struct drm_i915_private *i915); int intel_display_driver_probe(struct drm_i915_private *i915); void intel_display_driver_register(struct drm_i915_private *i915); +void intel_display_driver_cleanup(struct drm_i915_private *i915); void intel_display_driver_remove(struct drm_i915_private *i915); void intel_display_driver_remove_noirq(struct drm_i915_private *i915); void intel_display_driver_remove_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index dee9c6b9d6e9..946c1b81809b 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -287,7 +287,7 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv) static void i915_driver_late_release(struct drm_i915_private *dev_priv) { intel_irq_fini(dev_priv); - intel_power_domains_cleanup(dev_priv); + intel_display_driver_cleanup(dev_priv); i915_gem_cleanup_early(dev_priv); intel_gt_driver_late_release_all(dev_priv); intel_region_ttm_device_fini(dev_priv); @@ -634,7 +634,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) intel_display_driver_register(dev_priv); - intel_power_domains_enable(dev_priv); intel_runtime_pm_enable(&dev_priv->runtime_pm); intel_register_dsm_handler(); @@ -657,7 +656,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv) intel_unregister_dsm_handler(); intel_runtime_pm_disable(&dev_priv->runtime_pm); - intel_power_domains_disable(dev_priv); intel_display_driver_unregister(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 737f04f45cd4..28e9c8648e76 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -107,7 +107,7 @@ static void xe_display_fini_nommio(struct drm_device *dev, void *dummy) if (!xe->info.probe_display) return; - intel_power_domains_cleanup(xe); + intel_display_driver_cleanup(xe); } int xe_display_init_nommio(struct xe_device *xe) @@ -219,7 +219,6 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_power_domains_enable(xe); intel_register_dsm_handler(); } @@ -229,7 +228,6 @@ void xe_display_unregister(struct xe_device *xe) return; intel_unregister_dsm_handler(); - intel_power_domains_disable(xe); intel_display_driver_unregister(xe); } From patchwork Mon Nov 11 19:39:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13871194 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 3ABDCD3ABF4 for ; Mon, 11 Nov 2024 19:40:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3A9410E536; Mon, 11 Nov 2024 19:40:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="H5yDEPfw"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC8EC10E534; Mon, 11 Nov 2024 19:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731354047; x=1762890047; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=VlT8yKcuAZINV1g5c/9regMCWLBzRpWt7hEUxj+DM24=; b=H5yDEPfwWAvZd+gCHCdssaATFuLYgNCpz2I0rR7h1e75A3TUsdI79S/C xVKFk93qYHQ9at6TpPgjUZFL7LpnRyc4J8XSpw5FwkkjLE3wWtIPBnbKz 1fNFy84Ho2KgT8V0Qc2L7iTtZ4ZtjeJp0VODJYRXkJSHf3w6Peh5iMjGi aRMcCWzjCqdpB5WvZJtRr6r/BLLHrmsN42rTjZGrEhvx4AmzmtI74d4HB cZhGqAOdAJ51SEWIbWchs9vojNQWfm180H5t9t++u+E4U9uI/MH8ghEkn k9xhqoI8rOcDA0+mhdSMEu4z5GC0LLVDEkJ+vj/NneOC+eLHr7MIkTFaq g==; X-CSE-ConnectionGUID: rrjlTIKsQDeqp3BucAJh8w== X-CSE-MsgGUID: Pn4B7p/dTduSSDdaKQoBCA== X-IronPort-AV: E=McAfee;i="6700,10204,11253"; a="42578119" X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="42578119" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 11:40:47 -0800 X-CSE-ConnectionGUID: 42Uises/Ra2GP+JKCkiWHg== X-CSE-MsgGUID: lL0R7K/KR5SQRqJUQKAJhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,146,1728975600"; d="scan'208";a="124620735" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 11:40:47 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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; Mon, 11 Nov 2024 11:40:46 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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 via Frontend Transport; Mon, 11 Nov 2024 11:40:46 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.47) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 11:40:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gnmVQxJ59rzQuzbx0RNxcUhGWnAFW1POJGF6OBcXYmbpo4UdqNexXYpiXLCjGERYHjaxVa/BD/1seMZqxiXDY45bqJBhI4NKve8R+g8bmh4izaqAGiWpSTBXviiY7ID1l8ohU+K3B/f4aaT//iLkYxvdHPJY77JcOz5JrPzj4o2wAXc6z3sn8pVTgdWhUNYGOYxZdgKSoe827jHpTSyqR5FlMGPXb0SqqgymUEzC5Q1VbWBkxnAnr/F3s1D8aRNtp+XXSGS8e1J2TIdYloiusGZnF0qCP9GPIfDCPCniWYSNUUJH0NU8YNt3Sz5o6dMRrTRYOfI2i/1DypiRqywHwA== 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=WsxOMbYs05NlEJyX9h2i90wN96xgy8tYYM3egtOGHoM=; b=ALBTvTMLLMULmceRZvPxgiJHsVvChilcQkq/bSNw0LTxTPnRCOLJP9VqGjq5GtBhPyShSSO1XjT6UQRXKHrfZehnVikOm5WW6mMa21OlPuudaypR2LckXLaWM5YCVUzlSsAIZdenvPpJH0OJqPiL9OGy0ooGaKSrwyGqoWXZvSqTrPwbr28ADMxpAK17vvlv8dOjsH6wb1KbOGaOLw07lzbYIVX+gFXBB/yDwiwbVMzwOTGxHMbtlKNyATm2kzdoXcpgGYNmbTAAxiy3zThn+Ukn6W5khdW80KlDqiW4nRtFiBf/rt2G5y2DN4dhNOyl6ieHn2oQmayBwCTQ8/qYqQ== 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 SJ1PR11MB6228.namprd11.prod.outlook.com (2603:10b6:a03:459::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 19:40:25 +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; Mon, 11 Nov 2024 19:40:24 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 9/9] drm/{i915, xe}/display: Move dsm registration under intel_driver Date: Mon, 11 Nov 2024 14:39:42 -0500 Message-ID: <20241111193947.128871-9-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111193947.128871-1-rodrigo.vivi@intel.com> References: <20241111193947.128871-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR05CA0016.namprd05.prod.outlook.com (2603:10b6:303:2b::21) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SJ1PR11MB6228:EE_ X-MS-Office365-Filtering-Correlation-Id: a5a0f187-e1b8-4dde-ebe9-08dd0288afcb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: GP3gKY0rNJsjjKT1VKD6LoS3YZGk3V0mPcnZ+nEJcZbfGs1QI/kfY/VjNx0jdcza56WOp0cj9kiPbXsDDrysABoL8zinTHAC6xgEuNKgSjHr2MtpAWVAMiPPdjrpuvu6Iv9Xeg6mL7T6BUUibWVvo2445wbBXPOfK6ORjZ2IOydtYeWAd1lYSmGxmthBZC/3rZu71rfA60+Pwtwc/OzUaf7KANT/0HIkRoeh/TRl8541Mgu7W1N4BwY32Yz3+OVAcm0TkaNPKlQUAgI7Jf+CmEL60TwhNtQwC7bVhXOoWPesEMR2wuCaTR/ryz8ZeJxCxIHqbzTAV+hZizCYAKxV/0LRbPrdD8jEUFwgksbwxWM+HhowWdRytTi3TI2NbhU2pHLtItgDY6uGxMAzpF4Cma5VFi7WJfV9LncUMd4uYaiiNNFYwFXwJg0E8x8bxpuL5yXNsHfHLlcFaHIVdpZD2JmbbyY8Arbnbk3Ykv4xaUDOzvA/zJKuA99PIZ+jCLKq3kyi26zGuHNA0lfJOMQ5kmMPG3dkRumXBRttKkdnxiW2hzvYaMRxMAHsw4G4iPR5L6sVXb56rErrtYgn8MWYc+G/wkD00CLHBmlfZ2GZYT1SGEMImMQB2HGSd63QPOgD1wSJ4Ec6ri9w/H0GwRGh7bxjNrMNIYklBQKhl9m+2Q6TvoNqkiVoyxmQ8ENT5QDS0AnR4zf/wcVYbHjIXlCFu2oBeAuNc6MbQLC5MjXY/HHINtDlwzslMqR1If/4iLhambiX9ahef/OwXSMSfpdblD4BwkVz4JsksZQwrr9lFtolA4dMiWqIelBx/rIHaEyKZ0+mB8FRCYbwqfFgMV0QRMMZ50zM2QS1E9v7WWq3B1LED1Z9nIkSysHIDfvbGJmPAPg2vCs4GKa8ZrnaDLH7F7EQ6lmtTHttRdPUmXo2IvHc91yMb7o+DvGVyql93/Jd6llV61swaD4rfUDRWOYwfV5Z6id/5KoAru508xM51S4lizznoXyAQCKsZ5ckKz+Zkm9v/nKZkGQ7ryI/wIrMWh+MJFfulLAmU+xC+iQ+ogfK1ndDc8otWCdEkDpRfVbPlaAytP5bpqEsO0ZC1Dm8kerW3fO6GaIiUSi0mK8fk5BTmME9OTi6MxuYcYavM2jmQ+6oD/FrsD5qTH5N69T6OYmNKEgYgNzl78yPFEKiJKLgSZHFbLq9rZTkyWh4trLGNqPy5yueIcJwh7gQRUdwh222B3iyXQf6ppAqMbFZ21hYTUC0lZdxqTnYHN0fNrcwkyASEkriP/vglbqgXvyutBvc5v2AiIPccH7E+tfnm81/cHwyODAQVkaXw2P/yacd X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2854.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 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xkFIPBkqjwJphogR64IPuyXpbI0vKu+z1V5ESm/69Th2FIpsmsOvS0MNjCewGQFeVZAG3GmTY/Zzcv/XT8iyIUM1Y+BHQlvQf16vomjlK2jokt8DeU+l4DkNQ6smfYhTocZ7Zs7tNJOWqfMFdBZhCGNZy6hVvnhA4qlAbJ+8DiWm2MRqj35oluYCxW+CG66hyw9C/aGk8cbDE3VnZ4woy7oSf+hSzKhFGfAXMbxLYzH1vNr+MjZHQrSask5faa+PRN5u0YH2uSM1k854G8n/ZazLs8trX2qBIt0chZQefBEoziDMnrhVToyY3JhflMzgGebv9F8jH+OWGyXnYjqM/Fql3T3irmTvU4+sC4jsdMtYC/PcT7253jXOYUjMQ0mBVW+i96Bg2EC2nV7ofyCypwyoPQdiMvO5xgfsWTmrzV6nJz23a47dUoQK3MfGN3z5o7n6QeDI0OPCPMJTzV29QWiah9C6Cicfuxck3ADzZV5i+tdC4PRTh99hKp/a41+cXBBiqmeEiROllOC3LsE7yWWcIlVnQKJwPhf6klctKylMkL2Q5txaeMak3hA== X-MS-Exchange-CrossTenant-Network-Message-Id: a5a0f187-e1b8-4dde-ebe9-08dd0288afcb X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 19:40:24.7425 (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: uRGPQ05nQuQBz+/lPM2kUx2HdV+2ekkw2FnbsNQQHfdm2QRUZTIneN4QEptYoE3XEMxordAwIStfdTPrByHsvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6228 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move dsm register/unregister calls from the drivers to under intel_display_driver register/unregister. Reviewed-by: Jonathan Cavitt Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/display/intel_display_driver.c | 4 ++++ drivers/gpu/drm/i915/i915_driver.c | 5 ----- drivers/gpu/drm/xe/display/xe_display.c | 3 --- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 3b8b544d6da3..194dc9d5ad4f 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -563,6 +563,8 @@ void intel_display_driver_register(struct drm_i915_private *i915) DISPLAY_RUNTIME_INFO(i915), &p); intel_power_domains_enable(i915); + + intel_register_dsm_handler(); } void intel_display_driver_cleanup(struct drm_i915_private *i915) @@ -645,6 +647,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; + intel_unregister_dsm_handler(); + intel_power_domains_disable(i915); drm_client_dev_unregister(&i915->drm); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 946c1b81809b..a60bca5580c5 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -46,7 +46,6 @@ #include #include "display/i9xx_display_sr.h" -#include "display/intel_acpi.h" #include "display/intel_bw.h" #include "display/intel_cdclk.h" #include "display/intel_crtc.h" @@ -636,8 +635,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) intel_runtime_pm_enable(&dev_priv->runtime_pm); - intel_register_dsm_handler(); - if (i915_switcheroo_register(dev_priv)) drm_err(&dev_priv->drm, "Failed to register vga switcheroo!\n"); } @@ -653,8 +650,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv) i915_switcheroo_unregister(dev_priv); - intel_unregister_dsm_handler(); - intel_runtime_pm_disable(&dev_priv->runtime_pm); intel_display_driver_unregister(dev_priv); diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 28e9c8648e76..2525eaf9a9a5 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -14,7 +14,6 @@ #include #include "soc/intel_dram.h" -#include "intel_acpi.h" #include "intel_audio.h" #include "intel_bw.h" #include "intel_display.h" @@ -219,7 +218,6 @@ void xe_display_register(struct xe_device *xe) return; intel_display_driver_register(xe); - intel_register_dsm_handler(); } void xe_display_unregister(struct xe_device *xe) @@ -227,7 +225,6 @@ void xe_display_unregister(struct xe_device *xe) if (!xe->info.probe_display) return; - intel_unregister_dsm_handler(); intel_display_driver_unregister(xe); }