From patchwork Tue Sep 24 20:35:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13811157 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 AC067CF9C6B for ; Tue, 24 Sep 2024 20:42:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5151D10E741; Tue, 24 Sep 2024 20:42:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JCEynGY5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7242510E217; Tue, 24 Sep 2024 20:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727210558; x=1758746558; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=spsuIZydcvj4ahqrprYkFE4JsZbL4co8qdswXnkzBLM=; b=JCEynGY5TFb4ZwGsrhNXnlk+cooSV3MpfnfXBH45FGyGPDsCaPQ4MsdP Vb9S4QkbeGJ1wz8wKZBAdyLr6YkgKLoy1dBez/TCSi3nUyPjLvFuJRggc w4aTaOe9BfEhw4ovofxknvaamUrCsLyGu+4RC264H2iPRP4gHpQG1qDqa VyoWS/EzvJFOiQaMRvWbY1HZMETbbSl0eouyEih937znS/LW3mbehAUd1 gE82oCfFhxuPPXuM5Fr7JgauySafukmfpcSsVwVD/cSSdTh793rgHVs1K XlCw+5cCoFcDULk2jX3an4APKeXVeECF78LeZ9jQk+hYP18TcwMBCAFYa g==; X-CSE-ConnectionGUID: rvF5T6hzTcmtjLRzv4Q5gQ== X-CSE-MsgGUID: sgCslxESTC2/kOeo0kiNTw== X-IronPort-AV: E=McAfee;i="6700,10204,11205"; a="26326051" X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="26326051" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 13:42:37 -0700 X-CSE-ConnectionGUID: 6xbRhuMhQoqYJft8V7N/4A== X-CSE-MsgGUID: v4N38MhvSGC1VhVJFM8Grw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,255,1719903600"; d="scan'208";a="109001313" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Sep 2024 13:42:37 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Tue, 24 Sep 2024 13:42:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 13:42:36 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 24 Sep 2024 13:42:36 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) 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; Tue, 24 Sep 2024 13:42:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x4OxVl25z7GMmfgbqOS/1sU2G+HBOZwrTeEl2ZqaeB9DIvgRn1LFFzZ1T851eZd9hYKY291SePO1rDsh4VxHCtth3tujRyCdJSaKVpbpEy5MC7NXQpfiMHXbplcJjsmHYa3qXq/WuuSOlI8+4/203V0SBexcQh+nOhJm92/VsDA3htAUXr76SEr4xliEa8SheR7HmK0xDz4WnQxBRBlsPrgRgDQnhkAytYU1igVuDxWcCBXA0C1L6fYk/krIwTUkCBezdtDB2kbWL/1xQzhmZQAf6MY7vWTg69CrxjGDvWJK87V0w+HuNQ2fdACh9/vcyGCR3M/WpiQBslfLnGc3wA== 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=MJN1NlDrP8sxMXo/3Tn8sCfJSfMZatpwNQ4rSUTI/d4=; b=erXYZT5DnVjZ5PCC5JxZZhhmFUBYC6PgOvIY/6F/Jv6LtAHrG3Bz72mslHI0LiX11rwvDeDaL2s3nhy1LhEA/GIve+tgzs/3ZhPNs5xZB0eXR05lG3n8wEthQcTaSDwopU0RblIy+urkcDWV+5hAEztBtnaIqjCDogvtXp7uUP7wKm0B9r1xJ2Hu4+yzcmGYXa80u3hZNjfr0nYKsUT9i4jcn/C26KVSaOxiXf8Rz9rpQm4bp2zlLEJeAw2C6a9na9HqsSMSSm+3vY+lV1nDINDhPfAmrfpy166tG3K4jv1fOdXKqz7RgYTv6DoaP8ycx4M/xskTMlbk7LcsOxqu0A== 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 BY1PR11MB8127.namprd11.prod.outlook.com (2603:10b6:a03:531::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23; Tue, 24 Sep 2024 20:42:33 +0000 Received: from BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42]) by BYAPR11MB2854.namprd11.prod.outlook.com ([fe80::8a98:4745:7147:ed42%5]) with mapi id 15.20.7962.022; Tue, 24 Sep 2024 20:42:32 +0000 From: Rodrigo Vivi To: , CC: , Rodrigo Vivi , Jani Nikula Subject: [PATCH 01/31] drm/i915: Remove vga and gmbus seq out of i915_restore_display Date: Tue, 24 Sep 2024 16:35:22 -0400 Message-ID: <20240924204222.246862-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240924204222.246862-1-rodrigo.vivi@intel.com> References: <20240924204222.246862-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR03CA0169.namprd03.prod.outlook.com (2603:10b6:303:8d::24) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|BY1PR11MB8127:EE_ X-MS-Office365-Filtering-Correlation-Id: 6809a951-bc6a-4006-88a1-08dcdcd969bd X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-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ReRZT+o2CvcIRQkhEH4YJO+rdDhVQxzG5vJkv70rHAiRW84AE9C5AjDIeUj2wubwntcCUWIt8EdBn0WtPxBYO0Z71xHDbiO3cJb+yJh7UfpzPh2rBzUDQ9XtseaVQY+Qduv93zzbXClu0MQNHxCcpLCxEBvuQM+7WKuFStO15N0QmUVV3Tsge2pXN9QXE9HS5BDvlEFsla8snk1yH3NYUbmrCcooCQ6yWVWGi/z7mudL8vaw== 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)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RpJuZL9H/LFOaYtWp9HOhaU2H3UUcrdVdbVOJn0O8hJVWw5tc0B1ovi6vdqQ+dVCX58CWxwMRRuFOMg84YRum0APQvhidc0aoVqgtUmeWiaHx44gnRQ015/tnSR2BnkmeGWs9LIVSEBVN9hG1bXjka1kICpsyPc0IZYIkWqwLdpQjvNApWMcxnzJjZepn5xUwv5AtkUeVDirnzyuX1aDm3kxmjfEOt8i1reBH/s0XbyiH1rzhhuR/Wa6+SiCC1r4RIkIa8ESKrEUDpsJc943qVnWRhWDghfpT/ytZUSyrKc6bHa7bvAEvK6qRXpCf0D/O8PwCqFpchTALip5nRDk8saWvzfXhWhSpMI2c4PdsVAKDNdDJD+qtL8bf+qWC4VsMQHWIdm49aBwKLnPznyE9fIt3VK8/nEhegl4SCS9Mtma97efLO2ZrFzqz6Qoa+f2X1BuP5CQUSWMHegAWZZ+ltJMEufxjO6yT4LHrr9Xohbk4jwYH2WGxcwo4tQxJnnD3cEjRjzUXmNmP+8lSAHLSesvl2xpsNgiWQMOF+Jo9oIrcLdH0L/0bYNptVb/6xfA8VaXZne5Cvv1gL/ow/o5oR54f+dIABRE0/mEkGwFP3C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uthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 20:42:32.4793 (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: siKNULqxQONUoel+qsmw49shI3zbXJ0IreL0nEMxuvvGSK3qeeeGgNHR/q7TNnF+KKkSiX2OYr66hTua9T/0hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB8127 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 Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt --- 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 6dc0104a3e36..c5ffcf229f42 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" @@ -1167,6 +1168,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(dev_priv); + 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 9d3d9b983032..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(dev_priv); }