From patchwork Wed Nov 13 22:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874367 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 F3FC4D637D0 for ; Wed, 13 Nov 2024 22:50:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7945D10E046; Wed, 13 Nov 2024 22:50:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CzUAzATZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0260F10E046; Wed, 13 Nov 2024 22:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731538226; x=1763074226; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=TKIZMHwfP8ShhoygPX3Xat7sWtJ3E5laCBtZDt8kXk4=; b=CzUAzATZL+7PWegvi95FazZs7ePDwvSmwF6HUer2AND9GH/nTmACjtrN deEWOOauEVdcUavOmGItY3lTbdoY3VzUPk24eAZnZpNyDt+gJDbepiLQG 40VwKv/CNGoR/UbRIl2gl1UypRhzzgN+/LjqNhkTU51bkGzEqJ18fbUr/ Au04j39hh5wwdzgfKXHEAzE77IenGaAGnqJqkQ04eCenJi/VfcTdtwss8 WSFGVA4kVXly5JOMgivz1CnzMqvKXfLQuf1W9EvkR6+2Pp++58Jzkic/v BhSO22Ft2mNcE2gBOtduHdCkeWlb5hyLhjFLGaa/XFq/g0FQSHa9oxZyf Q==; X-CSE-ConnectionGUID: pyH/xLhkScWomkT0Ehxt/w== X-CSE-MsgGUID: EP3P/G5jRs+tUEgMg2paBQ== X-IronPort-AV: E=McAfee;i="6700,10204,11255"; a="31694849" X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="31694849" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:26 -0800 X-CSE-ConnectionGUID: HaEYYoJVQdKURXJ0TIXQxw== X-CSE-MsgGUID: QTHF2P6qQwWlbVqSq4PA+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="88429012" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:26 -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; Wed, 13 Nov 2024 14:50:25 -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; Wed, 13 Nov 2024 14:50:25 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) 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; Wed, 13 Nov 2024 14:50:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gfVelXyDpO1IGU9LAxhfkHlwuW67f05YCDlgh+43xfkk6nzp9LU4kkgH3oGkApo2JJOQpXa6T2XxuWRA9rnGGrdn8zBB/wbz19oeWL5jUGHhs+QVzpchbFibUTtQZqsNYqPz5XmSFoSe3yIr1fxXQ2Dry0XI+heLvHg3Y945r8e9l1vuKJJEVozbRgDUFhRSFh9WJ+gSVYGcaiQNUYRqQyEaQEmuOWA8gs7sp/72LabnELGZmUf1KJ4HRh14mjpO//crozBghsr96m/jtzC8o1fbw6PpF4z954CvoMwgxwMoHPscMjM+1i8/EkXYXt8/1xbQorL4idjb98OF0I67tw== 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=XjYeg6Wd5ZaCIQfKTJlqKCET6cn7DNagCjdymL60v4sXUYZ7iqOLWrPUjHzBd8GiSTbqaoiLYgdjBxFXCmsAPpZz9K5noiAYJ3n5b+feG2mrUOtJ5d77GHq/6anl5+fjOgduD6wo6bmzAu3HcgQ6rENRRm7Q4gIAdmeqW3UNmVCYWPatZs5wUM69/i1rMDy6WPpP7I3j+SdjunrsI5sYM+y2ToVpoD9AeJ/+3iXTkfO5J0JdIOg2FfMMOesReG0+k84naUMThnxyhQ9pl8AEQ0cU/yufoO20Zd3MoxvrdeA0ChrXwi68IwnGxr5ThkRDqH32jeIcdlOoQkVG5q82xg== 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 PH0PR11MB5030.namprd11.prod.outlook.com (2603:10b6:510:41::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50: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; Wed, 13 Nov 2024 22:50:22 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jani Nikula , Jonathan Cavitt Subject: [CI 1/7] drm/i915: Remove vga and gmbus seq out of i915_restore_display Date: Wed, 13 Nov 2024 17:50:10 -0500 Message-ID: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: MW2PR16CA0033.namprd16.prod.outlook.com (2603:10b6:907::46) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH0PR11MB5030:EE_ X-MS-Office365-Filtering-Correlation-Id: d3a3f763-043b-4a87-f99a-08dd04358e04 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: yT1PyRE6KNQjlxVtoIzUReeLd2XNbsOPicSU7MES8ySuZs0qR/N0g41budBZq3UYcRssokUoLM+3tS4Hxiao+4aG6QIoY2P5j+YnNaHwE01TG07yY8exivs5mdV8SI0hjZT4AHhPuENKuAEk2yoUgbhUPEH5OL7IaAIT4XhNvzKYkSenxqfmFdXaMUkpRMMHGSrtezKEL3Tmt/cmuRk1ZY/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Clql6BKX+6hUSDUkGFdRTFn9aYgWjmn8Pai1AmmSYttAK 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: GcC64+IIbFCMO0tM+s6U5ErMq384Ia9VAFiqGYCutOOuPD4GJqfWDzz1cD+FA7z5giYz7XC9Ex+8I5tUkdhOwgotf0U4FLeN+BuyxQpD6T8HfXkaSJWkT4+SeV8JmrdRSvD1rTX1LqGDFTZTAY3BEg1GVAEbXZNNm0O5kans37YzvbFxQc+hHtTZHlo/vAf60U898MRCrPufauely0c6VXkoAMrIPvoxabrWjx70zn85H7dVc4+xVaBwI8JZicCv8l6K6bUxJetN6N75cX7DVpJLCgUrfnuhaJNtJdkZyhgu4NiseAzvyrqhJ9omxKpFxwM6YdcboY7zS70qmU5ZUSGRrOdpFkGZR7B4DaIIC/Aoii+3vs/gUUdkPSIQmvtK1wXC/AQfLaHTe4H5TiJpQAcnDlhE46YXzvy7rfSADtyevWYp2dA0RrBpU9rLDPDo2GGm1wMLvNupe4k1fJk4/VP+hAmsKcaJm9s7CmP95CnVCVxMh+Tnoje1O06H5YZtQXy0dXmCBMbD3akT58uKTpNdmJG1e7G7oJwM2IkP41II1do5XTegTVds94iP9JomoPcS7K+OvKbk7xJHUFTWJ+emvF/MmA6DFdGq4BlRTfXKb/clzDGWtfFn/77LUk4+pAOww2GHBtS8AkTVQ2d7q6iRuqKfd+nmvi1/IoX29UxJBcoseRtF5fTxuaPZy9OQ86ofHiXZiMeZjIs11E3co08L8Z4bk0pfxJEr9vmH2FNhtQ3s3DZKIAe3v61AlIAe569fzvTfsb7y3+hwxA7Zs+Zl10mMWuFR+8sBX7JeZgSzbZw2VFlMfD4vsyhbpO1rErHoNgaXswB8QFgdEqNTTDw0eZhs4Tc7PSJn9T/aa0xpOwFzbkGJpfg5FOMLdRtC9pqxg6+K0FM/giaNe0MNDBLGeGgXS3tudu3vfmzr/1eqE5oU1eEvKSYRxhpsFzyK7111IMPEsfkLgSU/RMPVkpwHkBaEGRI+k4xsozCK+ouLUbTw5oBWvlnTNx4aK0FsQmF9q2xHM97bg1ziMeT2wmE+48/HGHSGGs4FIo76yM9xkRqu01GpdqXYvA7g1+n235eAeaXTbnYNqO+tWwpYfIYLcF0TKUDggt/iv4xcURvBqF9oI7fVHx7r4tPIKRul5A8v0Z+uHbQxz5Vqx5CW/4cE6r0a/wnJY8JVg6OtJSxT0Fu78G5hRNNruaBktQQpG6Yn1RDXNBwSjekATxseoTbI65neRKSsRjhIOE3Tpr2o7BKZ2D0PvcEY5QFf8/BlBHAsCR/wndnwUALybUdNnJFV+QLyhTh1zO5xeiWZOTPt2JK0JzVmsMpU5NkchlRkU5MUYf4BgcQDTfOn6kORLpRC8hquiSeAvJma85TfeK1WZOyWfiwHyjkzxyBlo8z+KrK2nshuR0OOEuol8gI8pufMA53DdTM+TtaKkr+RI/g/pzFX5DF089OxODnXYcUzlpD7aBYhhBs2SZcZ0JXowAM2yJkVnJVP54c4cmi9kB2BrVhexmnyB/IoKHosWiDj00YWYDafqfxPrAJYhr5AsjuLdqMQjNPUhzTJFs0QbtzBj1Iy95B2O4IZN8zfGunN+sKQG5x+OwhSm5aMDOe9wA== X-MS-Exchange-CrossTenant-Network-Message-Id: d3a3f763-043b-4a87-f99a-08dd04358e04 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:22.2619 (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: 1D0T+mnJblTQMP05ZbYtDKkE4EHTHdmKB4Xoy+qmH28u1A3GfCNsJ4T1Y8HQ6Aykp+bpi748M3iDtuXkuG38Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5030 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 Wed Nov 13 22:50:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874368 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 0F47ED637D0 for ; Wed, 13 Nov 2024 22:50:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 921BF10E75B; Wed, 13 Nov 2024 22:50:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NXPYD3aI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48F4F10E742; Wed, 13 Nov 2024 22:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731538234; x=1763074234; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=lMGWCyC5CktOJ2i57Zox09HzK7iLVst3o1Sj4YEXpfI=; b=NXPYD3aIjYmLlNzh0/a78dQKzETaB+4fgRg4yNOAsE8OmW5SlBc7/zBy j02Dcrjpz/SZFCVEd9j3FQZlR82AmM9fZjUDcfrkdtEL//JgRw6gpKstJ sEl55bkgyqv9hcb5KqYFYarUYTpMS4ZPHpW7S35sz6n0m6doY/JItpNnB OnNtklIHqEt/0FzBReKYpMVcR3SPJP4VxgTFVFMwe25m790zZzkfu1ndY ucu89YoGndIF1mv7ciK7ZKZShSypCKM34/Gkx/7FEv+kTWUmPf8Cuk51Y JQspWeGGmesSUaY0czl1+PhbQnlFzMEQF5nbLejyvTFwL/lt/s99dpX8E A==; X-CSE-ConnectionGUID: H7FE4pmXTEWJYuDI8dDy6g== X-CSE-MsgGUID: Vh1SK+i7QAiWIjBhG4Z+xg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53997863" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53997863" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:34 -0800 X-CSE-ConnectionGUID: YV5dpEaPQxqX+/zOD0XsHQ== X-CSE-MsgGUID: DykWnnV/SdS9e3XVxRQn9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="93071985" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:34 -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; Wed, 13 Nov 2024 14:50:33 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Wed, 13 Nov 2024 14:50:33 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 13 Nov 2024 14:50:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HRvEHkLzn2AbLkGs1gisnRpe4EzFRgovf2jG3JhnSNcpVjs35LpgfdFMJkE4BTrSLN5o/ORECa/nVlSs8LOj6N35iC+ve1cbYnCVEcpytJ1/WNElxTC6OQZGlfBm6GgCwL3zkUulIxlc66s8mnYfEJYj59hnASE58t4fXTheZ6ZP/MemrNMcyd34h7xnOb+WI1aOsnsImz+zxh8PsPHN7Va9NhxcMapkb/KAK5J967HNN2IXFrp5iTKEDZZQCT/xSDXNIVQIO7N+bbojfDUTkw7+Q/VqUt2jIlwvUs9tzs8u7MWt2mz78g+7196Iog89aRG2sdUTibFo6PvQdTt6tg== 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=wilRUMVKFfrzutSLe5WTHGvTleE8huqPiOioXYpn5bnyh4Hh4ltHWp0EzxGAa/l1RMDovclDiX3Z/3utCjMCbS3fbua983fp7jcVeZqLEOWyujV3FmR5KeV7nv4+ewPIdvMdwO4sd+E0T97PYEnmq7tHKkTtbxUp5I8jjsZTX7Du7P9YQnqLhqp88yLlVRb3/aph8k5uH/WGU5hlHvCgYhHgJFB/3leDj6Cq/LU4chB0F/SQ02LDxDYpt2tUfIh2rBCcI2UAqGv5eDkR9g493g6XWCsQ4eQx5hgnoQ3MEMk+kYJqRbvGVhfNByZPEcUr+YGj1zNwnZr1FIZkTGeS4Q== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50: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; Wed, 13 Nov 2024 22:50:25 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jesse Barnes , Jani Nikula , "Jonathan Cavitt" Subject: [CI 2/7] drm/i915/display: Convert i915_suspend into i9xx_display_sr Date: Wed, 13 Nov 2024 17:50:11 -0500 Message-ID: <20241113225016.208673-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR16CA0008.namprd16.prod.outlook.com (2603:10b6:907::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_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: e159ebdf-be0d-41d5-f160-08dd04358fd0 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|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?MzJSN+HF8KT9ZlmB+wGMn9Q+HUFP4qp?= =?utf-8?q?cqem/jrBg6jZRvJHHk0pN2Q35qE/J7dHFDq/CatoTRQVys09gqcpaeTGOU+hZTpgd?= =?utf-8?q?tUK/0k5+VTYHkyFuGRkRSoaxT841RTC4Ituqcv3lwidoaNgccZ4fEV32GPrH5+sE0?= =?utf-8?q?Ki1VcC6wCxwuVpq4Na3TaDDMX0fTg4Ax9knSmGMSOSJHmJS1f5K41ehJYRo/QE/Ov?= =?utf-8?q?KRTGyBOqDm9OG93d8RvDKCS4nX5PE5HGAuAsqf2oOYiqM0Ca6C0raV3HFunnmPv0i?= =?utf-8?q?Ni13g9h2rMiseB/XI3CZhB0vB8F/rdxFzJJ6I2NmMnXVPW0vklrP4bAu9RnqVkjmW?= =?utf-8?q?JeZz/STn7N6LYVMhP/l1WUCMq2fnLI3OztESzhBOlEU9fayrpxnsa1hc/Z0MFWN/Z?= =?utf-8?q?dlOnhpPgUGkhmVWzX3Fk99Gi3goEijFZiAVGF6fatZTMjrc/z748kTrUiV9smaClZ?= =?utf-8?q?d/tm2OKmLcz9jS95smpL6DT5KoHXD/7pXhIM2VZ33wYB+t6T7aSzK9VJRxY2h1P8v?= =?utf-8?q?MXeQ+TodPqGmJjZ4ZTO8GomBOk7MQwBppWcbl0d9Xo5BNvE+uHM8jIw2Avm65weTZ?= =?utf-8?q?2B9zCtkH+h6jvTXFddhdEjxuiSJkCpnbnR6u9Iu+kGZMoVmze3Yad9O/a52WHK/F0?= =?utf-8?q?0ml/d1r8gqmRT0bZJ8h8vb2dTuyUZzeJzfJeYaSzAhK2T9CZikapOGhJGn4NNcONk?= =?utf-8?q?GAQwNbImi5Tm8p44BFwBf7GARZY0DQ+L0AcD9ozKhRskmsUrUX0t6YCVtnMXCUGid?= =?utf-8?q?SGtI8LPdHUK/5LSm7T5sr8Z49So8WbxCRwrhcInbwXdWVyJuP/A4mEvnHYMObyOrP?= =?utf-8?q?Xfv5hto5n1gMYJ9cWnqOYP/CM1uTDlTWgS2+YVny27TqChk+HRzYB+Jmu5bMmTg5r?= =?utf-8?q?VHlMY44TXC7ihHOBHVBcRBGzQLhztAN8Xk61NECxuUW66zFLxf6afurf1EDzRZ35p?= =?utf-8?q?ib869XxWj87u8bfJ9/8PwKyH3V0MTksDkaJnUS7dxMHJElRpjn1vW0shs2v9WSrG+?= =?utf-8?q?m+pHEKKvqVdre+itRmQtq4AOAokkxS587+MdcpxBGwVX6H+UUNzMfruhC7Yyj8EHr?= =?utf-8?q?9IXrOKzMKtjNy2islmxDj/jbAWAPz2kJ9zRBW+zkQJELJxXNYbWHQ/EKb8JepmAJo?= =?utf-8?q?xdJFc70pLInKdm7M/LCLMXT6Q2tM5Lfi66iqdTfThxm6tyw+TTGNu/nA9EW0WZIPf?= =?utf-8?q?zJZyIyZ6Juic4zjS8XllMhk4S8jhn4IOzQCg/OLu6sDafpqybCwkTyOos=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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LRgDzfhZalmy+Adm0hIJeyelAkyt?= =?utf-8?q?U6lCosOxcIkm6Vna61Xo24pJlNkV8jsSXgubTv524qqDrrUU1VJ2YAQ2GuNR36m4U?= =?utf-8?q?x5VWd/qLzLpiwLoBgMEMaixnJW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FlEhDmZ3lGcEuZjqpBg/Kuj8wyteR?= =?utf-8?q?4/WjgNchP1Ly2kezqcohX0V638wUMWLdfbcpUE+rzClcS1/0a3SZll2N5sERpBrKD?= =?utf-8?q?ajlXHyi0oqifO0MDKM0yd3qdE4Km+C3NXTXFc9FX1BmI4Jxv8AoSy1s7lANeOTc8z?= =?utf-8?q?rhaLLjlRRRsFXfbXZGTiH6qmjgzLPu8DPmVnPu1tGMyFKzGYOMZj+/1aw68C3gJy5?= =?utf-8?q?DpIQiE7l2cJHdq6J5GMMNAltZexF/ttHsa4f6gwDirHwBk+79FFZJNszjT04n52xW?= =?utf-8?q?s3liZ0yrtfTeRAEFIcVZB4chxmggawjcKvK3h9GnPMX8sNiAzTEzzY4Rtd2m4OnBi?= =?utf-8?q?7tJoHYbGmt3MJ7QUTwQQI0m4tYbwzdU8xGD7gZ64xu1w7j6mIBJgD5KaCbSXbWbYE?= =?utf-8?q?bdRn8/PHa8wOFAuQasA2KUf5TYVZSaLQdJ+2DFPAg0H2yhOCq62B/4eLneXgMCuj2?= =?utf-8?q?HkuAnUM3LzSrhzTAcmtWKFgo2gnWZjPIIRzCOw3st49hpNUlGrOGFLsr6sOOH6i8/?= =?utf-8?q?3y73hgXPiuZkN4AZWGaK8nXCS5Xwk1sqQQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e159ebdf-be0d-41d5-f160-08dd04358fd0 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:25.1043 (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: Hrt5MIgqZJ6DOhTgPzdHId2RgRnvDwb2c3TYJg54UzNQWoGw2g/xjM9htZk9POSDEtUR9uvDGr37CjSLdp9ZnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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 Wed Nov 13 22:50:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874372 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 68102D637D0 for ; Wed, 13 Nov 2024 22:51:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1832B10E742; Wed, 13 Nov 2024 22:51:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YIZI24ad"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EA9310E29B; Wed, 13 Nov 2024 22:51: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=1731538265; x=1763074265; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=vrGPc3oNRrz8ov4UPbm8uEBcemu8clsgp+bOz/yFCdk=; b=YIZI24ad8zm1v/+ZybAkpNqscZO2EJ9wteNYzUvX8mqVUVBu/t5Pz/JA f/fByyd7KwzICr5IlPRY7BtLsvqrioYyjP/FHxW1CHtWkKauJ9tSvFTvU d/o68GSVNHkbr/fed4O4KxtnqqQ6Izss2tJlBYXa9E4RDW7nfI/KXY5AJ us81DEgKaqgKdoRGESxKqPvbp20YmrsQ0ozu+GlqDir+O9acZjQ7plqap +8RAz+L+W6Ob9IkvbsmO33ZY+UWRfYSyp/cr8vkSJwXV5egcgzNo6jM8N LiSWu14K4Gc7K41qHxpbRPC7tebxXXHZ35PNAg7dtvwXmf75T7wpslijn Q==; X-CSE-ConnectionGUID: 8L5uf0ezRBSJYOT/ClgGqw== X-CSE-MsgGUID: liusHiYGQS2Ojcbozu5ZMw== X-IronPort-AV: E=McAfee;i="6700,10204,11255"; a="30842496" X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="30842496" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:58 -0800 X-CSE-ConnectionGUID: Xchwn+7BSIuLTPj9MuEObg== X-CSE-MsgGUID: ksA9lz3lRZK8g7xrRt/oeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="87769946" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:49 -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; Wed, 13 Nov 2024 14:50:34 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Wed, 13 Nov 2024 14:50:34 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 13 Nov 2024 14:50:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pbYziPzwJ11q3kegMchMPNdIUcnlx0o84gNJVBhDQiTcwFwK2AjZM4f8oYL++GP+lwNagfAVNuqqP7Rh7WKdpUyy8QOzKsR1CbN4OKyjH/YG2FCjraj9JOblT4WO4B3rKj4sG0IUQ0I8rHXDTr45YoUjNDJA/JUGt5mVd0BrtjvHJmUrWiq3A3wTV5fFVAakLeGLSd5RMSN2BZrXavOoGYDUQk0Q2zwhdIy2tMom/PZUJJ5AhOgXQKo0nai+acQ3t3//4K82F8mbnja8LVOccY6htyRtvJ3bPbYlEhnj/FJ6SbqaZv5suz8VR0RnTL+NK8v6/ZGzd3oF6JudbNtSrg== 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=uL+ri3xTPLo9JAqwqWWAkMyx9xWYWNXTda/z0UaWd7RPvfLfWgzYon8WsEAjUiCiFwP/T8y+eGxJxUT9TE9FLA3kTqGPdUzAH0vvvb5RTeFO97Pae7Cwt9FOfeeEJKZl7/Y4VCzRsVDOFFRQoVrla8TBgmhm8VBayIpACx/tArMyJIRzFqPUNIYUCdQd9/Pi1H0GFYz/ccaxhMOeptdjVaB90uwd6RMUkBnHBAz0n0RlNy9oE0mg5Wr/nmA3DVO70sa89p19VJzENaxsaayhbKTFcMkMade8WOB5QsHutObjnJ1WoKnGVzaPooV290HaNbhQv0xdywM0y5dle9oSNw== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50:28 +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; Wed, 13 Nov 2024 22:50:28 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 3/7] drm/i915/display: Move regfile registers intel_display.restore Date: Wed, 13 Nov 2024 17:50:12 -0500 Message-ID: <20241113225016.208673-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR2101CA0029.namprd21.prod.outlook.com (2603:10b6:302:1::42) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: b95d4749-128b-423c-1703-08dd04359198 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: iDjCELvcZ7JcPKkQQnLQ4RoageGRHiJkwL6XU/9SVWeyLE62QUHP5Q0v06SanuwAsY3HC3/BG/KnkQPNLhD/gqLQebByUMoVcm+8HpvFP8cnW/tPTzJLnerqXmr+Nsdp7nvcP6gtx6P4w7BZRBmU2BPHQi0DruVcwBv3l4smM+gZiZAOGxa3n+ifl7Klm+GpOAWvDAVk3Bf37+9u0iVvjQ+t2w0ZFW7TS3bm4ps/wOuCmY8yYhXxefFihqlqV754NDJ6rtZ2koOtTyw9ouJqbYm3rxdeIDp26+L4ISlRKe/s85jSvmXZJprntLbqgh2eACzfyZTMSwh1KPbq1fDfFkLO9T1JSjc+fEZUQO82RqPr5DKjMFtk/8J7NzMtzlw/YaNmJ3hu9x9GElYt6IyuwA5CdQAUkPjgamN7fng8sg4/b6TBxP2b/h7BjnqW4jst17SFn1SGdowMSZZr0ALMDTYtQklBhCRxC63uR/xt3lifD02U3WJflU0d9VB714r4ZsQw6Jh4q1SgwoaIKYn3BGfNG7zTQ7NAJWkYG6//kzwSBULVj7dG/jPYZlAj0qTCgNya69AoKwMTO6lSyN2VhjG0/p13OmV6ZiKwUFhjG6hbrbZDQvJ1VOk8wEk2cBYNPnBg6M8s8iVuJoNrE8Jc9KJH6Ngp38tUJc79Ec/yPPMR8wXDtUi36JG6e0I3IY4s77Tn1Bj1m4G/GjTo9n64lYnMM8bVfoni/VU+SuOvrA83CD7OUknm+Bjr3trKBDQ4E9b0W/u8F+DVp75zgle7sS5ElPOvq5Mqbdl044Vz2TUqgOAeyi42+ik/Jzuypn+h//bM0bDarFdtJR9gzD2qcjz4B3DfzVl8ojCyt8snbK7ojBb/J7KtJeJSWJ7ETHHk1qeHPTk6O5gohCkdDkxF5jKpLnDTNVRgZLd8u9hfeGlyaw9r1dnqY+FFhM2J6+BNB/y6tOncAeS4l2Ab0RhAL6KtTuwN1qf4RIUdgZIfnn7ikkuPt4ggYZr00vlZJkWguzks/lWiMSpdqriRQYh6gJvC8HxrDw10iL1IZ+Lx7j11pC8IuD0H78TrFPjHBzcscQI1tUDMnyWk45/hRNqN1HgNXpARWjtYJm9lW+wqMXC5eG/roOzdA38747yDH6yLLTvlG2wAuayf9SMcVzHhZ5Ew6lZvI58mhxHIRez/5noyPgMPXE+573Kb3L2f0OHm2PfYWVohbSAXyQazFLhRqQbW7GkjGAfcQqqsPb0YxHZNcmAgobzCceO0HEXaOVL3OO2nxIkLFutYQ6VZT74XTL20LiLYSU4aGdsdk7+I5s18dnmcUEw1uj2gIKXM6VF3 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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RmzoKbBKq5ThLJyuWIUo/O4XomwG9991umi6et1f7x1+H1o29jeV9JeggMeCjc/6xVMwp5pnlaYgcKPx4tpYPWKmz/9HHLSSNDLy7Oldbs7TCogLMc9AHIW/tFNJqTxd9ebfYcV4oCur5vtHvXlbBt/mI8gjwt6IPEV+CP5dg2hrM4oPdQ0PWS8ps4VOYM/1DViKgQteHDH7fBF/LWqKa2ov6Pf74VBswg+rlbLwRqiXJi8FkDf84/y1S9GfmdTzSdSlDO6mHDYtk6NcsCtbQ+EEc4kZNFOy8tBZGnbAID7VIt24bMS4fdqrdY0Bb8upTl6YGfyXV9GgdlXAvXOheLN9/egC/vRCo7PripIFFx9QOlLcU6eGCvbokkyW2dK/R6uw7VhrzIpt6YBggpib/A1IOKnSymT5IGVTUV5qFvrc3BJX9AmscG6fgqxh1dx93S8ibyKiV2qFDIsqrbgAr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8GWJp5Bzpha4nkSr6vrznHpSSiBjmpER50rAq8qUyEcO8IvWA7jCfoPj6XtaLypw09v/pZhHtc1mYK8it4aQ== X-MS-Exchange-CrossTenant-Network-Message-Id: b95d4749-128b-423c-1703-08dd04359198 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:28.1454 (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: 9QKjErevbo+oFbxlGFTpDsTKgN5pXCvkN7PDDwxrWMxDQVP3yT8OCP63taLjwZg9C4YjKcclXHZAeXTIXbmCkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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 Wed Nov 13 22:50:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874369 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 07754D637D3 for ; Wed, 13 Nov 2024 22:50:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DAFA10E75F; Wed, 13 Nov 2024 22:50:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TFi6gZBd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7721410E742; Wed, 13 Nov 2024 22:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731538235; x=1763074235; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=hTQbQ0ZrrTcqO93DrdxrOnJN0pVI3YRO5XHWodo+0Ks=; b=TFi6gZBd2fF/7nsp5y2EPrEJTtgUYpgyqYwxHaPpYH38Str3zwheeDHd nHsNyLfLC9nEvDmH24yBoEsrqT64ZkTYJyMzxwLe3eIFwgJd42aBWjwOo WvGYbCvzl6K6kRyf5zWt/fmgGdiWxMbtW61ho3/kRLnCao5/jNr9W6s2m pSlZVulrHHO8t009Y861BNKHTcw+9SIGmT+KOcJhVNSM7IQDfP6ei4/RP eTS28iVvcMTBmCXEkpE8+yTa3q5pxHJ/TBRrSKWts1wBiR+KcsVjYviEl vi2B1BdhkqTg7DcGDSdV1JjSl5qoB09Wttw29rRQRVe8L6mt2t1sRrCuU w==; X-CSE-ConnectionGUID: JUcirKJmQxKl7SZMmdugNg== X-CSE-MsgGUID: zmUTchRnQk250fJ2PlEcmQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53997865" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53997865" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:35 -0800 X-CSE-ConnectionGUID: KzlgCDyhRBSr/BGi5aM4Dg== X-CSE-MsgGUID: iH9L/6N3TX+MjcBVbKmRBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="93071993" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:35 -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; Wed, 13 Nov 2024 14:50:35 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Wed, 13 Nov 2024 14:50:35 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 13 Nov 2024 14:50:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mTH7Jm5WLw023xe9jwFq985GwicrPfFEN0bmOKhNqhdiZt3WIxrIDkHrwWX/MECbkNi48zAqH7F0O6Nvh6YZt1AULLuoqriAzOy6BphR2aebAg08AWybNQqvktezM0iHiNhRMuBSvaMqL+Z+khrixFJgy+4LglEiAyfKFH+Rr7hQ4h3EHpEhXPjQYn+q/AEUStNoKDRUYeCHZs9MQwEVRx3yBkjPChknsxG9AFX/y0LQ0HdgsW7LjInbtUK2vf2yqL7+M/+IwYy4zLq508aaWxiBR7XU2XHeGFzTVCQj85eP6CCv5Owqd1ABBjB5qwlSo8I7F5QmS7xFUZ56i+NByg== 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=daDfR4G0SknsGhkoMMdx6V4S9ttW2kluHEeeaQhsECikJmCpboE5MCoPwwuAUZZSQJr/aNI7xjwxsKJ2DMROa2dQp0gC+09c6Fy6Z5HDS/83HvoqB4TxMZT8qis75bgxgQ7iOYFcLmH6rkp3KTiaxIftoEDZX6nzyYQUPBsirNeXfgwSy50QXOpSwhlWkdPQhwycq4jq0bSsi0VXmwiX6uePlyrI+03sE1ZnNyf4w1+xAJlK33SwEDIenPYThazhUuMGsasqzmifu0SMSg97Ok3CEKDPwJ+TC6Txlf2PKwAvVJ81i6DcZ8bYbZ+qGYs/+YCwXk350CBPDU/ThMeFeA== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50:31 +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; Wed, 13 Nov 2024 22:50:31 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 4/7] drm/{i915, xe}/display: Move DP MST calls to display_driver Date: Wed, 13 Nov 2024 17:50:13 -0500 Message-ID: <20241113225016.208673-4-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR2101CA0020.namprd21.prod.outlook.com (2603:10b6:302:1::33) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: cab33cc7-df6d-4daf-0bfc-08dd04359365 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: ONrTLyjBlVWUNARsI1XLfUjjE9KCTN0BrHLSduwDX3goVPI2LR7JtSR3LIUiW7zH9PuKrSQfLHhFq1cXZG64qg3+vEW+PGjC3q58cN/S33jTxoXEPcnO9ag1KQEvPd4sBfxBYpq8W89JrFE0mVi9rZzKLTUI23trQkY3iAmLfApcZMj7VO8R5VGNCmAbY1w9/CRVFdOKBeodIAG/y5RykXCO4wa4XBGwUxcdQu5U2b6dkkUJlwPO+ir8nKEX489QHhC/UDJ36AuDecPtmAm//sTEcYFhpXdNvOVtiK74ZIUDZhYIxM1p1apn33hZB7BZrxa1TS8JWFI19qU/dBkoDu6pIDRzvck3TT6gENigtR9ea6ccQI6Rwyz5SWBauQkcixxyEiKlLyErFdzo7dGnr5O7WlsQ1bLxUj0b+6LGD+tvPLWqpx50JvTrOVttcbZGaV/Jcbzv4LqP28xlUUTqQTW0NlEIIgITC4CNYfWoR+Fk1sZHBIKjL7ADFKAOCJJfyFjG9zpWh7aK+YLRpn329sA7o/Uy1l+T08O1vZDkbIvA9266dZfZUY0TAmGAjUHXJ2Y2S9jdBSG9zfeH3YPlcPBy34Rasi8DzIxQQDI1/00HDjEd2KenR0o8vUgGj+JZxQjnFr5RszbUUd2qe8m2ZOmNiM83ll05uz9macTXnO2iP8zmGJSvrH+vSAt0yhjCnnA0LgHLnvKmCgL0WXdjwV7XNSSOZSnYAl6OIrgOrcYJl+l8F9bkznfelXEVlyjwvw9GGiBbiudmKlkr0kUv4BDKQzKDBGu6yiMYjwcjAbx2BmDLV9kFam/0w3KIyOhPhyGArq49gNnTG5lJt7/eGUqw0ZLpHpeaizQiNB/sf+pQIbXGwjrPbtjOT3TOLVFVqpcF8v2ISh+mAGkhoOzBv+1EFLGMNoX8FeBrTs/8rdVSRhMcMhlgSyoJCP9Nf//Zoswrqe5vbYmKHvEUAqPBn60WW9ft0D+R7VqFA6czeN+JAOYzYFSrMP9p8c3QBA/gHh02ufuekfPCt0BhE2OmXMZSomZYehVaqMzhjGCzBZmm4peVnkAjQjWc83K1EJly4eXx/3qXgBPBXdxnCJcZ7JCR4476C6IxcJ1dT0DpnNoF/iABRoRkj2xl3r9FfSP6zp/M/vfh9KRahHV3cJkmIMo1k+ryDcfLlsIu0CQgSLv7nc9RzQ+Na2h6n53awLwipkDz1tXwFW6biSElAOcw7MfL+7s5JHA5t4oMeZt4AnGudc9HOVsffu9UAy/K2yWzDmOkhw6KCJ5uikB3P9vnttHL4Tl3ytnoclEiuxPmD9P4I7+/1diP4barFy7dF7+E 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)(366016)(1800799024); D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E1KcuRJRATSp4tuPHMr2yyaKeXfhNQV26N6wdGSEBbbaF6I6p3Ew1BiB5D3bT1RWNC3+4g6OCjEIPY6BjmEg6HULWwZHPrJUCR8PZ9sjqm2sW7nYRVUDmzh8gs/2mKT9KghfT9hOOOhG9PhaVzRof4t1MHT4/jn5Khy7EPCm2o4bmL5lp6Sp7FaC+Qk22IK+9fFGKDLXxBCEXiKOlwmAqdeHdpVNuY/EJ49LsF4e2z+rDSmH9w8y7O4CTP6eEIJEFtqk+sDIQ0rrLSK2r/znS1WrztQw775SFZ1CkvPMDRpay0GpNudBvtBj7XeYHGhKC/0dO0/KfiBKvR4GD9oArxsbsQ2HG3wsHjZwSQMv/A1jqXQAtyRIDlzXqNHzKnMGIpaRwCN3oqNvqm25C6GqoIxoQ0bvhZGNGauWcSagbOD95DoxXQY0TEA9zY6mmiLuV19eVucZNLEb0JlM3Nft4rXenQkAoGNcayTzhDp/WrV+Yqt0lCS4oy8q+t1N/arKoxvh/BcUGJIbTDcTt3oSRwok1y1dVGL/K/CwnJNWLLNJuegFVqQ8k3dUI8w+/9ZKnICpqXaPefZ1UMsC7OVcsaMtSpVEYnvGh8ySpE5NQ== X-MS-Exchange-CrossTenant-Network-Message-Id: cab33cc7-df6d-4daf-0bfc-08dd04359365 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:31.1328 (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: hI2h+1M4JSeo/EijB4GV0SI2UYhjrkh+7VckKDkPlFGSQ+PA0qPRasEIRPCxzuHm9RD/8XEBRplJfWcpm3CmYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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 Wed Nov 13 22:50:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874370 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 E8FD9D637D2 for ; Wed, 13 Nov 2024 22:50:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B5A810E299; Wed, 13 Nov 2024 22:50:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cYHvo3T/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 022F210E742; Wed, 13 Nov 2024 22:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731538237; x=1763074237; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=93jnuIu7CExO1UeCaHFUTkkiwFTMXcysjDJTyXAT+PE=; b=cYHvo3T/Vd7qhqdkH8SHoi23nLLek2ELDML1dhKLIg0miTerQ2kJna3G oalYW6XQTf4rZ+PfxJgZnS4636KWgzvgXyiprWbcPds/80C6IB6rm9nQa 0eI/XX8Uvw7T5bOyvUkOdAdMB1SK3H8hKN/srd3pkVN4fMTng0AiTcYPc I/IQCgx8EKuFbClcAntFNxLeG7a+CD9pB5t7tQ8oAhO2KaCg2e5D420X0 oPxevpuVen7OOJGJjhCHeNnfvkhbVD/GMoVBSkbzXpjjM9MUYFhzrDBOF 0WufiF2KWViX+z7KyDD5czp/jn8VR7cjhB3dAbx0EDGR+dTLFrcyLJQEt g==; X-CSE-ConnectionGUID: 9AfBshPsQHyKGT+7H0cb6w== X-CSE-MsgGUID: NxXaqCIRQ2eihPYuN0emJg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53997867" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53997867" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:37 -0800 X-CSE-ConnectionGUID: OrXivn5WSKKT+x8vREmGBw== X-CSE-MsgGUID: XDLSxCAzSPO4Kd/ZvWtwGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="93072000" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:37 -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; Wed, 13 Nov 2024 14:50:36 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Wed, 13 Nov 2024 14:50:36 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.42) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 13 Nov 2024 14:50:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xL59rsro7BQxT/lsBibZFyb/JR/lyKzaXB5B2wqzCuEgzzOaeBP2z0xTY+/mB2oig6LudW4ih5OjWtVXIgAW2JXEYDAHRgY8Mc67x0Onx0VTvAT47reTOnPiqf8U6zEmYNYwyBooyHyQEb3uWuAIII7TIHxhf1/gj3+nPgu22p4uAivK30SNJB0ofAoDncKv+9gD+uNtSuVKq8RH/pFZIp3Dlylm6czTK2nNIo8GueEo2WBhxdNI033SYRZW3Q74zchw7YycTGwRFIm8y6CnTXHee2jwAqgOJYip0rmD9xQroL07dG29Md+NgSeBfNnJb1/SQiMUU6uKQ8lzUZjNJw== 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=TLE6duyek5kp3teyWYytyYfaE0Tj3kRFzViuoMXs/jHTJasjbTnDoGRjDjFrPmdWqGTee02jOFkaiwVU2km2C0Y/xGaeXA8vIzAOxCfzkhARsu+kohILGI0YZhDM/9XzpJ4Kb63Iu6dGGzn9iAHwCk06ivsk/Ie4xMTTuqA2REel19v95xjBBaxXFayEqq1lNnNOmy0dJGBg7ilglsPqCSDfClQbX6nnj+VuumMGRvXSw1LRilivxWd96elKVgcBiP+xEvJONZhRZsCZanLvl1QN07Dte3OsimA/cvplkWjXe5rQFshBBEMGxQORNIPam7yZbAXENHAyhi9w6+WnKg== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50:34 +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; Wed, 13 Nov 2024 22:50:33 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 5/7] drm/xe/display: Delay hpd_init resume Date: Wed, 13 Nov 2024 17:50:14 -0500 Message-ID: <20241113225016.208673-5-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR16CA0065.namprd16.prod.outlook.com (2603:10b6:907:1::42) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: c35137a2-0b95-43a1-48a8-08dd0435950f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: VmRaefW/cuvIVDonTzp9nFk0FRTEMquTBHk5QYwxTXDVrRzRrFs75bputHSw057Ukvc848LHbDFd3ogJ0CNe07j/tdw9AaaFGBwAAcnV3Tuat8CQPcHuS7bn9u1TExRkS8oOj5dT4QGyyG/lp3AqXa6C6yKUyfJNtSJjkrnq2hPnuFDvZfzf/e4DOuQWvrcHfhvetltOHanMwHW7/WOebCKozXtTR3OSSoqSyX0lhY26H6D+f8uExsJekPf+n9NCYeQKSASjEhmuQfTklK2yhMw/0Wv6NsGWQeh2pvlZrZ3r2VJ1ovKNh2u3N80z470QOs46wY3s7RIx+elflEtyPUmCkHiZWFUeu0l3YnLBs6kfp3q5i1mP/zY1u0pffc03PPoT0vt7hZbnWNvXX1rtB7D4e29f2R9HVGVhWBIbUTy+aoOaWhV9byqPrqtVJ52xfVCdFwDnd7shtk8rnFsZgHECVhXgRM0ppFRGQLQJEOWh5dV4PIMGeCDnXP7t85QxATuyKpSwxETFtf0GZoXCBx88DPdXaKFuRP3JIL/gB3cdjpDbbeYGE0Vxublaf0DJyNPuPijSJRoFhD0BoBi+8RT8n71uiCO7RL6ujB/a3s+pytga3aSsM0SXzZQwlJrrz7yaXRMRLuKF8izFXpQ0xHBdyq3p6N+5cr57PKaYA5cy9iNTJImUzz2vOtMA9ZP2UGOP4OV7FMUgfxOk8KoR3UPAtdyjH/KsRmchMRpdJ7XrCBdo9eLvV3u8F04rd8/rWGfgrmWmuQ2b7K4qbVsn24nnAlMGv/w5S/BUoabDFnHqKQn69wrJP1ytZYUwzT3cK2LO4wwJGqHgE9GS2dQp8vGBJVcDwRsi6eK0QAwxQXg2tJ+2s3J9gXuduVepUR8sg29iWE6PVsGlRvFOL+9BaWJ4ePfCcGawmhFzpZkjJnhjkfB1Vf7iCAFu/IV7mI1thqzyRKIjsV+hJbIXN5zmEd8eh/zl+7n1Huvu9y9rMv9YmgkVmRnzJpdhU+BKTZ/V57PI+xY8R5DYbZtGfen76NtsMCBussLuTMrAD6Ag91ghL3k0ok4uTKeXAz3YDX6qoMbBSG4oTR/sBs6tViJEIuO1u0w2gME8osDiPh6Kv7HTI+KavTqrA+a0RiAG8uQiPofKikDOdWByg09caGKcT5VF0KDYisx9LCS29KnIN+jdmej01CIUlSKnMxBHWMIbqNeHeeoiLb65N+XDfhhO+FbwnWJ3i9VSqIFAmuvdxyCUBwmlwKjmBcFw/eKkt81yKXG78KW9POhTImU7WXviSV8X7e0Jk2HnMjfZjvAg2sl8TjUe6kabMQvgaz4VTIWY 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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YHUOL1uutqdWtEyFdR1QQvQdlQYSC5Va6g9GiLs82fXwA7aNTtzGyuYv7MjlNj8ssFuDSqlLBpJVses/9M+hbmhwaFefshfaSeAlYuwKewrB+SXX4y3DwnK4eqp8UlhfMTt4LxVdF8q1n+TTzasX2XZMO+9DYLT8EQa8UW42h+ANojq08RJd5Y5vavDHrMkQ2utwst2Gq1i4voIRG76ln+GmmyFjemOERMCzRvapwE4YxfpKwt26hdKIK6KLPj/QxR2xMYXOiWmGtTBVd3Mv5WpBjbfoeccEM2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/WgQSuFkrEc4tikEfb3mNlNzCQNf7OfdpRZ+79hYrjbhTzbCnbntIv57UnsinARxdjB75LbaMwkvyADVThVFZ/aq7x/4a3os1TVGkNP+GDlu4sltFr13p2pIaQ+8F/cxdHfiuw1+1qQXUvnmE7n7I1HO3dZRDjMiYfew0hPsTMDq+gcxiBJrpyzLTzwwvSEwRcPFIHaBf+bIBbw58pJAKnKJmE7CKkiQE3wp8ZD8oojBLXW9pKKiru/13ekYCDg== X-MS-Exchange-CrossTenant-Network-Message-Id: c35137a2-0b95-43a1-48a8-08dd0435950f X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:33.9646 (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: rRJalN0CQTy0dRlhyoc7wDOpVZ/dzqm0ZdfRzsBesisDgAfkF95W0uxrl2Q2WRQJ+TryEpTbTgDicJ0ks9Wf8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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 Wed Nov 13 22:50:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874371 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 15390D637D2 for ; Wed, 13 Nov 2024 22:50:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B899710E767; Wed, 13 Nov 2024 22:50:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="e4fjmxbH"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id A017A10E76F; Wed, 13 Nov 2024 22:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731538241; x=1763074241; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=tsWhzyZZi+0vsKFxoyh/0pARPj84BsdWM+xnK0YQNI8=; b=e4fjmxbH8Cppf1Br8CtoW0kfE/nHXsIT9jRTbZi4OyHoYihTOd2vuRNa FCq1j0/9bKCtNUaAd9AYdZxvktROYrwcf7SeL9Gm84aQ+HOFCLivNwyz4 63o8mRoqie97iB8cEpa0IUTsyc3EzYfIAxXVowEmZ+JxCEoGo3sZytAtn fJVJbTySRoNW3NpzoBuMSfX7CD0Kj0g23rnbMFk6iXsKUyg6a4xo4K8OY CpapK/JPcYK+YnswATYoA4UTlO4mmBwxJdeaAT0eKZDJj5/m2DFJnKmU3 ZeVf+eIqOSYP9uimd3oMLykkZe42jdwT0TQtx6qtXBpGjKjpfke2WQiqP A==; X-CSE-ConnectionGUID: L+qDdzrIRG+wLuGCD0pmwQ== X-CSE-MsgGUID: Ki/CAFPvTX6cDvv54gpaTA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="53997875" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="53997875" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:41 -0800 X-CSE-ConnectionGUID: 1c/H8KowQqKr3zxJhfyYMw== X-CSE-MsgGUID: LjG3lLFJTTe9a6KFcRT6Iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="93072041" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:41 -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; Wed, 13 Nov 2024 14:50:40 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Wed, 13 Nov 2024 14:50:40 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.40) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 13 Nov 2024 14:50:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mo35rrlglAYs6VJLByocWWDRE33gTavry66D5+R5HsQ2a1i1oC+RVeVenAZRyhgmfdtzwEZAuP7e4CZ04pmeF+nfDFErV4O18BfSTjmejXxY1FlNLjCg0CqQXQ0uRqTD42l6JZ6KeGxUIZWrHqQb41vPA1g3HuQlg554Qfv9jV6I9DrzISo0AfYVUOcTNf3mLzO6QGHm23dYyUak/SCjpRC50bYR9bliuLe9SgpNdp19jRec+1D0J8v+Dtaz12DGce0rn8ZnXN/1FoRUi+CSCxRi0m+9Mn6OXg44+yEkBmJT1OuilLGReeMEgynMcIC1cN/X40hBsSFA2Mj3bmO/RQ== 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=IwORtSBmlmdTi4WRQ/4YEXflt6gw0EFkfwVInQ/zDuYEs5giMqS9ENxTfsX8+GrHKlJUONFyyIwE8576XElPi6yiWspIuBp9erE0mokhG0fSjQ/goiHwDneaZ0uQUgaNbJ/HY5N+zCIf4eDTw5dqZ8IVuDwEem55i3/Io8JdGP/ITyvza4Fc1YcQIRlByhIYbwISoirOXys2ndwGeVh+uYo3bKjPt6oyK4PIBHpfjttYtxCkz4NwVrFiEumF38SSdWNZh2hMmMJIz169BEEXDuAO0IqTFyrm7vFJvDwH7VDpLPHXSXC1RT6OfWw609ieRDlmahNo7+XAy1mD0R67eA== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50:37 +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; Wed, 13 Nov 2024 22:50:37 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 6/7] drm/xe/display: Delay dsm handler registration Date: Wed, 13 Nov 2024 17:50:15 -0500 Message-ID: <20241113225016.208673-6-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW2PR2101CA0028.namprd21.prod.outlook.com (2603:10b6:302:1::41) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: 64eb51c5-3961-4508-8cd5-08dd043596d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: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yvhm0viqRXaXKLwxzQPB+EK7xEOrEdIQlgZ/XPrYyCXXRiEuerTiPq3+czF8inWn+Sz5im9EvQnsphX9fuF6f5NxtsKcnizqmQjo5C3FhSjGWRzpgWyDOSR84S/uHqxcvF3ZxqGjxXlN07fRktGAt5S8e+rRQNHoTQV/NEtkpgH77slRaWQMLYbD4NZEZ8pJoaAYgfAWV4Ko50BB9nJRuRtiKeIUCQXk1uKLobpwI8o7a1on6RWBqbRxyKZiyBmWoPGgjp16zv7rlLzzku8ed3kOlF8OEp/mC/OiFL5hd+LIGCRT9WtVoy1VYl3nKQWQOnC 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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5R5i1g6bmMTzRC4bbqN5LUh73yiWcT0OeL+Z74if02j1D5cILqAfBfwkuuki8dI/4Hpd7Fn7Lr2lxeBlq48oKW6BpcGfrbx013SDmmeOobpvXZbU7ZONvKXzA7ncmBIcN9n0ut3OfA/IgPWzNqfDprWhCZTFwPT2uDcTekYS0Cq4wosc7dXmejKXqcot58BZmga/IiMmfG2S+19RFs4eaNJO7Ph/uEwy9RlaMT6+NTO4+Q5y2c6iGARXU/qpUAYOWFijaXgv8RTMqVXF8v1R04tcjQDAph9T2Z6Uy3lTA1O73R7KpaYGQfnw5r84XHlwe43d9H9YoFBwoC8wI7PHf4zzPTIQRosXfroratwam3Eo8JUMWAnWgk4I97p/CUT3RcrWgGmESpfjDJxltXDJ6x1cm2YQ4gUGa7jTWx994KLFJnqHK1MpDIbPgW2L3/YeKOSD9GU8gxzlVmL9G9D9lZzYw0XzDZTdwWVi3WiwM+Z5h1KtD59AnUQ6h9J+94Xsv7cJuq98Hy4Hv2gNIlTB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w6EjH9A== X-MS-Exchange-CrossTenant-Network-Message-Id: 64eb51c5-3961-4508-8cd5-08dd043596d8 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:37.0020 (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: n1rpCosAQaEUGGuXB7F9hXvfoB8YKbuOQabIimv9xQ6uydAbPdtW/iHL2cej7Hlbro54VhQw3xIrOeBWri25Nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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 Wed Nov 13 22:50:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13874373 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 7E264D637D2 for ; Wed, 13 Nov 2024 22:51:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EED1F10E761; Wed, 13 Nov 2024 22:51:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="AytK0J6P"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9937910E29B; Wed, 13 Nov 2024 22:51: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=1731538265; x=1763074265; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=PoK9SFotnH1aeSJynZ41ox9He3UKzul8s1XMsjC0ICg=; b=AytK0J6PetSIEmswK00uL07uPYfJKRxaAByx1FJxEd8lpy9BDCYf/Mb+ E6q39H20yRngKqlN1Fs0wesQlThVoYkYsmsWK6ugwwLeZx4X0fe+pHo6G TOXPSBWNI9nnvvk2kwFBPoxtIFHt7EmL6ySQptHHHL3Iy1PnoBtFMmcA4 5+ks0fVmilFYCWqzYeOCu+Xp+8/XRxSEtKPEBTeYYhdYCnWUL4p/jGEeU +umW5Qk0mYFUEM/eurLVTzP+uKb3CtFQvpt4R99+xyVBzhhOqB6aU9jdO uz2lz2wlJY0SN28JSKmXF8qOcUR1gUe3dzYqYYkNTeWGhmdZNZk+gQKmW Q==; X-CSE-ConnectionGUID: QrffTW4oQOiqCcKDvNKdaw== X-CSE-MsgGUID: vK+oDVX6SIKMhfQDzpUBQQ== X-IronPort-AV: E=McAfee;i="6700,10204,11255"; a="30842506" X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="30842506" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2024 14:50:58 -0800 X-CSE-ConnectionGUID: mrbANBqsSkqwudfy8dkHdg== X-CSE-MsgGUID: dYb8roBMTAK0Ptw/LvAYcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,152,1728975600"; d="scan'208";a="87769950" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Nov 2024 14:50:50 -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; Wed, 13 Nov 2024 14:50:42 -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; Wed, 13 Nov 2024 14:50:42 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.40) 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; Wed, 13 Nov 2024 14:50:42 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=okfoWxAD4TiuWBkTU36Bwiyv1Lwr0TyoUX65gH70KBgA3YBs9nj79+8EELKKHxfvG62lLG5jsPsqip1V5ipUR0AFO+8k8fdHn5iQeSsFGKBeFDKzuPJ5SQjeJOfZrbskerIwICSGmUeMXO517MzKQ5GDf2fLkXOPV1pSPk0scd+wHiA0X12xYtwVpbo2akquBMSWxSmrJOD5fv2BPB87+dxsEFyc9eBmZp9tizulb+8kD2zR5hiyzojxuXhmEc2xoaPhtCtr+1S1ZYaOqF+8QYZL+FmdVWqgUrOZNuYj3Ezti7wmW0H4sLPSz0wfK0uocnqSRx651TQHx/LEjV1Pjg== 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=gkLwAsy5kyjUckQLeLG3fmv6ep1QxcDDBTDJ9YXQfK+9tWDfRUZ/wk7mCrw6K3jqQ1XsWRuLLCGIYGGhY1ScKToq0B1LKTKbnrj3lqHAwIUw4Q024+eEqzErptMUAzSR4pl4OIb2pM4zHjIx5dvgsEKlpLSgsq+PnBdncKQ9pU2ebtnP1qcOwg4HYrO2vIV1VRS/jTS8fGx8NmgKZXX5pBY+6e+LDlURAw5Jzpnd9vaFGADCvmbDf5PicCKQ300lbGhB3MU6E+cyuddCnmrlsSIYmOlHBDJSYhu5UuDQCePiDaEfl7bHlKkcewZyEN7zGpXvs7okFFZA7zTjSsnH+A== 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 CH3PR11MB8416.namprd11.prod.outlook.com (2603:10b6:610:17f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 22:50:40 +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; Wed, 13 Nov 2024 22:50:39 +0000 From: Rodrigo Vivi To: , CC: Rodrigo Vivi , Jonathan Cavitt Subject: [CI 7/7] drm/{i915, xe}: Move power_domains suspend/resume to display_power Date: Wed, 13 Nov 2024 17:50:16 -0500 Message-ID: <20241113225016.208673-7-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113225016.208673-1-rodrigo.vivi@intel.com> References: <20241113225016.208673-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0230.namprd04.prod.outlook.com (2603:10b6:303:87::25) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|CH3PR11MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: a9a4f7c7-1a5e-4dda-5ac0-08dd0435989a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: T/y/hYWnWzrjite1wEg2yy47rf+3hFoaYSNqElDb3TUepInZAOyFkfXa9QNgssJpI8vQy6zMXGJX24HAqNn/XQmziitbV1j0wFPV1aNIrqH5dZEDImFTUQ6MMYrgwnfEdik3TM9TSll/5aXBVzImSTAOQT8UkJND1S/GFHzRsgJ9UJtm1UGg7khaiCm6vYRipBldvCpCD23Hb4hj/QjAOmdo8b011mPj/ZN5Uoe8aBrH/UrQ+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/43G5vtLkt49jcot9juKArfty+X 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)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F3ZuTGWIbCUZ9qEY25pJA+kfBOoUsYfdFn4GPNJDfZXUx+wlLIwPQDF3bJK/+XLvVwRTXkaLoBFdUGr1cBkq/9ndT/+HhvVKOF/YNNrBE4+cLcNYzuUzYunmx+5IGxLpi4qBVjujstu5zhr+JTJ5VTJ7n6PvADPYTnj0NKBUenlQZYPT+khHk+K6/FbfQ1BpsRf77tRRLlZtoSHf/V/g7bXFJ2c0KgCWvXyyj+m2BzHhTMUMcIGwsnw8a4nC7/a7yt4ZsoM9CUxcFZp86Gq5fqC6hku5rwAFkrtrOjCg2QNsTrYE+pkBGSa226cWUoLFalBlYoqNuNk0s580dAlCKYXxokb1EylHFjfJQn/35mkKwB0BIBZlPVNY3BAlIPWOE3n0Md2/G4frxHnom02AIyrnrmbm8wYftITkZMqgVzs+ADXRdqT1+dCJUDMqOC9/R8APaxgpm9TDoPQVbBL/G8IsL4NuVmY/gqr32QR/ZcWCPF90H/ktBybmh/FP8ZZX74MkLI0nWp8gwbCoCwOlyOhwveZDVg5cv+upRaZmvAnjUMe3Sxp3BlRvn+sZO+DBOU1MKZ5j/oCDEb/Q8OOJLpg6y5JBCJHCG9wuNUbU6tXJihWY23XHBmdTh41+LLdV7LQIRRLTXc6++AKPmR6Uqkk/KdYnwkVtF30Vx/6ccXejiXJAOu7xAgXoqpcOCrHHnPlkIGVM5QD7mx+ejXoPDjOrqPIY4oss6qrFpRqEOiQ4a+gYzP7d30XV/ItYOG3N071+CoBnM6jaTXiZZz7mxRdJpVe7TdXq6Z1z0WABR9lNDVbpNDjN2SOytgNTFqJDaQRqn44o0Ftwv72yg9/vHNfA8jovPnedmybHTMM7o3doqDWb/CrZuynnh3q8kTnXNVWuptsPwgvLJMR3plFWee/89Rf1wu8KvpylBehXflHnNzHaQYgxA2z/jBgpeTOIrMqDO7hyVSIGIk8sh4lcOHOLOwXfSHKbMWpOT4VOv+g8+nxicQny7RAQ+EXONvIl6tr4CymOk+PoM3nRuK52hrxZdu7J3xWiyZHCj/SFlB8XZRr76PDrXE3KP2DHWKeprVo66NG9FQTY9i8Upk9v8vZB1FIlYlc/d0+bHVSYvSuPcw57j1U6DSFkn3eDeavVQKIParrp8p+X505dZqn5Gkf5mLV0LQ+yq9N2O+bVHV5y3hmj8WzQ4z6/YsofTHGUpOsgYqchmGT/JXUjbPQzv16ytkqsoxi8PjEUxXyrWYgG1IKgvErUSHiRo0C2Nv4F5kPJxaJxB0x9LHpfpjqFCeiHeIS6WGO0YI9hMHYn3c4yOcWSC8UWyCyXFYJuP1Km+gkBn92gVOl6IF0FEG0x1zUJRlJ86uRapBwXxSf63AKgYq5W+Vyp7bmP0ZUK0wrUdBtoz3n6lItt1sWwyPF7GUeRTOQPHcHxlEaVNKrlKfoYdFzHOYIY8QsoJy90fTQv2Jk+YH69zj+wcylhybRoGHFoY5N/gJMR9GboolZIPAkdBqggK8NkJXJhYWfN8zi4WF51wDpSZ6Py5cj0wf6RFLDTnQkPnJz6syfMmycD4j1UfKpnoKsMUbLJkaoU8B8QQsfQgE3seE2L6c7fYeZx7w== X-MS-Exchange-CrossTenant-Network-Message-Id: a9a4f7c7-1a5e-4dda-5ac0-08dd0435989a X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 22:50:39.8589 (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: sgdmwbIfTJe7U4By0tze7hjOwCpin0Hk5pX3WUqNf8/uunKdJwp5tkIdrXTmDyrostWOl43efyslAdM4382cMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8416 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)