From patchwork Thu Sep 12 17:25:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13802382 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 7A2E8EED627 for ; Thu, 12 Sep 2024 17:25:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0427C10EBF4; Thu, 12 Sep 2024 17:25:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="nkIDrFMn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id D697A10EBF4 for ; Thu, 12 Sep 2024 17:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726161954; x=1757697954; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=7nZ51yG4Uaz1G0gbEq6HheJPqe5Skl5DkyiSEgbZjlg=; b=nkIDrFMnIJ5GfIJ5WHYMvqfid8hVYE5YY4iztkNLtaYBPc0AiDoYPhzJ rvUDf44GgQJi/Xrn69wzXZRB9SlRDT/Ufy10pXSglZhNZT/mHAXZgcS52 Ja4ws87UrbjGJ3lxVUrVsqZnCk8tDTAgv4Cb3sGm06Fbb8T3NbCVoTzGX BnnBVtJy6uLZ32ZrJqmXC3tRSbZi24xUEoVRmjLG4ZWAGrgy5fJWnLU2j PFtbom1FB0SA1NiXXqZhSjwP8bHpKVW5Uw3h3TZCudoNtoVPPE43f/EUx lLtvoYyt+skxKurRhV9UsOaJM7VDGRlRgwVkmtPpmiXZN4AYFq7ES5Cj9 Q==; X-CSE-ConnectionGUID: ZjVd7+fYTtCuXPwLa1TTsA== X-CSE-MsgGUID: YMWCBBEUS6CbewmNHELe2Q== X-IronPort-AV: E=McAfee;i="6700,10204,11193"; a="35703611" X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="35703611" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2024 10:25:53 -0700 X-CSE-ConnectionGUID: nuLup1C2RrKhFf4O+rK0fQ== X-CSE-MsgGUID: 7vxcBNmSQ220DnRIdg1Utg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="68299130" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Sep 2024 10:25:53 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 12 Sep 2024 10:25:52 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 12 Sep 2024 10:25:52 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 12 Sep 2024 10:25:52 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.44) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 12 Sep 2024 10:25:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GOnEk0veqkRpfQeHkLpEhRr6RifdfZ7Rp6GjMdHdujSm2vP+RdoFswHn4YAewnz3fcYPueV0Df+7Z9i5k84wadAtA/p+F+feE1Fl9meMgpb7n7b1umTvCgTZ8WipHghOCCJXc7n1R83WpuggW3TWnC8vOuMobAsvXvrBqLBkk7MwVSiBJpJgDukDz/j9+DmTGovsHYXJviqHIZ1bvF2d2QRpzjWVWp9EHYUXtRYIzYkNsNP0/fwnT7W6im7h9LCLehJlCL8kA4mr1KKXrrBOgehzbxlSK+dTMKksYLt+6XdHQt99S5NiDbujW8ONiLgS6w0lIQxKEsWKLbvKoQGSRw== 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=BGJ0nPGsppaoyNX1rvQJUB6UH3w+kIvnWuB5VXPJzt0=; b=UZToUT0Z4CyR3R7Cy/owLwP+cRmR0mPRdIbuoy2UgUfb9ip4h/l5T6IVFsRqWfRNBj53c2n1JlSExr5Ka7TKh2ydHCDcKXSR2BPm6Ww7Y+z3EQHz5de+XO+u+B+2aaV8dTbtcXl3N2EW+VoHFRI9HiL4jJszgUFOOjFD88PGqTo79T4BXq/yc+9p0OYbFTkQpzlzDiYthC0JeL75Gk7cDgR9FQ99I4VEguV1jcJ6fGhOKRI7Gsv/Hk2G/UuTECcArY2IdL8yuQ/pd5FzyNqICYAAsHTnugN9DtbePhX7UV103SxeT5ZriB0ZQ44mZR9V0BMpFt0/mqt0gpiVF6RRxw== 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 SA3PR11MB7555.namprd11.prod.outlook.com (2603:10b6:806:311::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.18; Thu, 12 Sep 2024 17:25:44 +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.7918.024; Thu, 12 Sep 2024 17:25:43 +0000 From: Rodrigo Vivi To: CC: Rodrigo Vivi , Jani Nikula Subject: [PATCH 1/3] drm/i915/irq: Remove duplicated irq_enabled variable Date: Thu, 12 Sep 2024 13:25:37 -0400 Message-ID: <20240912172539.418957-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 X-ClientProxiedBy: MW4PR04CA0295.namprd04.prod.outlook.com (2603:10b6:303:89::30) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SA3PR11MB7555:EE_ X-MS-Office365-Filtering-Correlation-Id: 07968eef-191b-47c9-e41a-08dcd34fee52 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: vHzbuWG6l/W5rQf/1Ekc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bj5oY8A+kNW2jGcSbQM7Vfx7aru0dWTSfLkJzDmWyF/1yx1f3ILnvMugZ8OVFCJqS5nDQolD4FksyYlrlxWXtH0H5ajhznfghivZze3ktdxb9EZwb7BNtKau1GSSi/HuUsKbMypr+9+HgYRNNlcmBU6QoYKgGPbsxeUkcqjFoM0W+wYJ9Ad9PHhpghtxQBtWWIfmFDxKthv1aecyhnLOlbW1MxaRr+vsau/5aRYTXw97o9RidU2Mkt2Jx3Y7yff4loMB1Jyj9j28lYjXGGf0tg5g== 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: QhBQ+PZQozRi7jbD6884blOgcK1DLvC/wx/gUXJmda4O2+EYfeQv4z3X4Dy+hI5Q5IKmPJFUkEUbZh6n8PBPIMY1FSU4iYGpwIX3YPO7kRCSYYI7te4+Z3P9gAeWq0Jqxxj6nNcgvBWG5EPNKAnd+jCKlm7tWGQ8q1dCBAVmKDGNNkQSYHapSibOmzBXQaPewM/uV2IibT7SGAxqQE1SsG4M3JcGdu8AkEv1OxPdk4iL2AAmrqUNRqE8NxuQFgOxEhLeaLDVDNeTStUmvr4fPEtAcgb0bt7CHgJiZO8Dzk7PuoPz/wAySv9R2/G0+g2rHpfOFqyAMCf2IaBgZdOEUIHWIAfJzGXN+2fnLH4bDybGtS+mSj1tj6FESCrubIaxkJ+g/FKfveLMLOYfaNdrz36+giIWs170KM4WJQ6+F2PnAb5JzjBrDLlsFQJvqE2G34mxwX0GrcN76Dovf39mVZ1TXvFvtDAeBhyb3CvfFfGQgMhIBLK5RzgkPKyN1iriDyYyhONcpx8gM/qtMGs9fIMMKoEazrZrW80EScSQJg8bWoXvkH5EM0g5xnb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-Message-Id: 07968eef-191b-47c9-e41a-08dcd34fee52 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 17:25:43.7258 (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: 3Hrygk/Vn1WCnEg9EySXcLRfqKFuH2kBO1eOeKIHv9uyb2kY3ZtohdLMRmOiawiVzBvfEqK5rakwAtTBl9okew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7555 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" Let's kill this legacy iand almost unused rq_enabled version in favor of the real one that is checked at intel_irqs_enabled(). The commit 'ac1723c16b66 ("drm/i915: Track IRQ state in local device state")' shows that this was a legacy DRM level irq_enabled information that got removed. But the driver one already existed under a different name. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_irq.c | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 39f6614a0a99..aa3000349116 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -343,8 +343,6 @@ struct drm_i915_private { struct intel_pxp *pxp; - bool irq_enabled; - struct i915_pmu pmu; /* The TTM device structure. */ diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2321de48d169..9f1a6f692dd1 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1406,14 +1406,12 @@ int intel_irq_install(struct drm_i915_private *dev_priv) */ dev_priv->runtime_pm.irqs_enabled = true; - dev_priv->irq_enabled = true; - intel_irq_reset(dev_priv); ret = request_irq(irq, intel_irq_handler(dev_priv), IRQF_SHARED, DRIVER_NAME, dev_priv); if (ret < 0) { - dev_priv->irq_enabled = false; + dev_priv->runtime_pm.irqs_enabled = false; return ret; } @@ -1439,11 +1437,9 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) * intel_display_driver_remove() calling us out of sequence. * Would be nice if it didn't do that... */ - if (!dev_priv->irq_enabled) + if (!dev_priv->runtime_pm.irqs_enabled) return; - dev_priv->irq_enabled = false; - intel_irq_reset(dev_priv); free_irq(irq, dev_priv); From patchwork Thu Sep 12 17:25:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13802383 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 A3750EED62A for ; Thu, 12 Sep 2024 17:25:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14F4110EBF5; Thu, 12 Sep 2024 17:25:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VOjzKfaI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B6D710EBF4 for ; Thu, 12 Sep 2024 17:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726161954; x=1757697954; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=N2oE9LsAFYW241RaMTljJCU2pNlvqzZHk8DExk/MI/M=; b=VOjzKfaIDlTw4tGupCnL49XsFiBfFalncwZ4ZSfETm+J1x7Rgn7urhMv FXfY2gqC8GnfHgK+akAv30+3oFq3OOOV2wB+XijhBw90V7U9/8kz3wRWQ nXOjFSom7oUVWi9RMKhXwpdv9f3qK9RCv7+EywbebNSfRSSSy8PwbVV/d yiQ9nuE5XxS+Aid50zemhJaDoWT+UyF1+CEh339gsmzt+ynTxZnXTzIzt 0UwBD11FEkIuyxkVeaZBJ/PigxRMI0zZkbG+CFoYaSGdwi6yaWryDg55R TuO978PRZby6favDmhI/ikN0HsZKpev2Kn+S4i/1/c4R+yY/T/wPbQu1b g==; X-CSE-ConnectionGUID: 6gm9wlDKSHS8doCE6rWwNA== X-CSE-MsgGUID: /b4yKzTJQ+qi1QjdKMzs3Q== X-IronPort-AV: E=McAfee;i="6700,10204,11193"; a="28929421" X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="28929421" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2024 10:25:54 -0700 X-CSE-ConnectionGUID: eu+l/Cx9Sce9elAHWgxAxw== X-CSE-MsgGUID: m6Dh0H6eR3qEQBcZMta74g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="105243311" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Sep 2024 10:25:53 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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; Thu, 12 Sep 2024 10:25:53 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 12 Sep 2024 10:25:53 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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; Thu, 12 Sep 2024 10:25:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CUZ9wJEVAd1+oBqor5eBk9SQs2FhgHzwKRg9yWf2ziQNM20GRDOAbFlp/l86GTksqcDzlb1TMYCBZ4eI1ET/FSGrxTN99wvVm5XQToaH87rFHIM8B1VUdmFB06GDK938cziwy+skfu7bHSq0itxJSUny9gxY9DjCwrl1Ds4D7En/K5Rr93S+1DFMVl5nW+ABx4j/TnlQ8egYprbibj+UbZrdfwyLxy6ePAhJMkhhV8EnDCRAda5HSXvfxnkVc4GR4XwREMbYmvw8ck0FsocSfMRBA9yCUtzgVm1jYBS9T6nkJ+q9eBGblcI5jTZ4L40CCQAyDuzHwpiB7tBAzyaN5w== 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=Pupn0ARl7qOgboIcP27g41PtWZ6+tm3pjPLnHcJrvxQ=; b=ufisZN/Ux1Ced80S+wfeSEIERk1wnOjmBLVMW6XKyEiNv9GDDGN7JJPrKAZtUmxMj3xdSCL328ZEqnsm6yUYOTpUN1LJ4fq4FFDufE8uopN850i+I3ujNyBfcAQ8bS7tRvXCg3Qxdxy7Ehkhyz3ZQW5r8Ev4SitpIqD9CMvDoF3oKVdxA+Ff/nvRAmWCQkJ/T3JW6dp9dpI13EWhUDmrfpic55aT6LoqDVCswu/WryjHmona5qy3PK+OustGybM64VTreWtaWmlnhsV5LhpXB9tcnD1Xr1zC9F3Cc0rcPmXYWgGEt9qXhMWmDyzn/sZOXjECqQiFol2p8YR+4IPlHA== 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 SA3PR11MB7555.namprd11.prod.outlook.com (2603:10b6:806:311::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.18; Thu, 12 Sep 2024 17:25:47 +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.7918.024; Thu, 12 Sep 2024 17:25:47 +0000 From: Rodrigo Vivi To: CC: Rodrigo Vivi Subject: [PATCH 2/3] drm/i915/irq: Move irqs_enabled out of runtime_pm Date: Thu, 12 Sep 2024 13:25:38 -0400 Message-ID: <20240912172539.418957-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240912172539.418957-1-rodrigo.vivi@intel.com> References: <20240912172539.418957-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW4PR04CA0263.namprd04.prod.outlook.com (2603:10b6:303:88::28) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|SA3PR11MB7555:EE_ X-MS-Office365-Filtering-Correlation-Id: 43f1a463-4aaa-4918-7769-08dcd34ff085 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: 8cxurGR9h7ecshqB9DyucSw34RjW/xOSLfEPsRe8jawJNW3zHqgAhKLQybXd6sdsXUz38QXwb1G4nItm2mRy+8VJs1VJMecAzUTSVKiNaV1jPO5I3Od6bOE/ZTypuBs30cGcCx3f+NQDZ0ODbc6dfR2BrS2D4/jBPUa7U7pmxNXnTHjC5+5oUWafPd+9UM56CYpfPcpik5jsiMahmhvloXavb/U2E9ZFzjPw08l5C4AQo+O5QbIdyRFZRU0OHowU2Ol8hNOycIDoXasTiPvpOhrdpcnBw2AANpgXdk9Xcd4Q9hOVG+jolgTJtabRTdK0+T0UerMDwjU0peLih40tV3DDj4nN0whgrkntX6FXX4tyI/GbDdBoMFnPl3Q+o1FZpyCdKFSDrPOV9hWzCbl5mJpiLTUzGXqWJAKYPtKTuUUU0z32IYuRBNURuKBRZS30warN8dcMYx18mdI5NV9xnQoDFkbzoQ2GyztTlThIYjGT0MJYqELF6c8ycKtTFqIr4y8/DgOsZPwpAzVaWSlEDzu6GxZufh1HSOx3FCxySVpCN3edYBZTKafeXOEBROKfl5qbkSLw40EsDe5boBQk/pdBOl7+QS1QjGbxErFfPaWwQId6F2V8Jgsj6md0d/4Vbh7ysifJ+kgvEvVdDcLZIOLivqMRiSGZqQ5vjhiUhKHl/78qeKdUIPvPpQnS3vLiBnyTbbGL5p8ZuI1qwLSKaOF74nB//FK7wLy5z18JDIOxNMvVZVcgtPcPw6lUchOVPXfSwZnW7Z/ie5b+14iwURlWEdmRYqezUvSQWsQ2JckY+8unJv3iW98mXopwuNIlO1ExC/8O0rAWzjWiGhBX9x9ndMad7LaW/qDcWYzvVvMGo5kZGilnkV910NAh2oMUXK+jkO+MkZzxMPb7e29JAefXHOD48C5UrKXft90LMUc9XXAIsPX+xOGoRTug1DgyugFHKKEpMZO33LcNU0puGoKJRgmt3gtnAplS/8u9JfT4HEBz6U5kYGqi/fBHoaiRMV2OeYVQKxA84XbJi8zJOQ8A5lAEyq/DYfTyqnn0aNgsQpB8qwokbq1Zb4SWZs0rK1HiFTN2RCywTpSmIQ6QQ9SSttBA+NUqR7gIH9mDVudf0+x3//3Df/tesveKh0OhN+HYw1qFkStmjNnZ2tsQhxtH6WWAlV4OZSJ6y/M05gIAS7DU/v+aJwie3J8aooYR6nADKokfyxmOGL/vr32Mwqa+bdeFID969QYPQPzyVYpCTihiFSRzAMs6Q/97/0sb8E5zBOLb6Fiv0RaeEZYyD2tH2a3yQM8Bc+7YRvSE5frQfifU6YuGiimFLkdjD3fqqi71/8rX5E0aJ9P4bAoQhw== 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: YxX99rTBNG5Fwaj2SYHlEJm2XjguWadFk0BOSu0cjfrmltMpOq3s+3S+9V1VhjzaPQxOiFEzTw9jwMYd54hPMx2jXUbsLJXJuabuNzfxN0HMnAOM/kuzleNDeKQhM1wjeJAXEIIq3/rkPL3GcPfCbfFY1Pe6tyvQTlOpxKLlKwO86+xcygIn7NjmHta+j3EGVyz5y8XWT9INQkC9ll9YQhfDGNZ3ltpvYDyk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N+3VmYnAybDNPT9KwOZa/3Hq+LB9jpLB+KtSMHwtFOZ9pVzqFOMg+9eRc92oAXEki2AkoVrctBobbV3Pzl+GvqQV3r+WruVHqLhH5aAkr5eDiowpM/zexYjX70Iti8JxJ2yKKxpX4lw1cAh6EBmV7iB5yfLSZcTu8rP/QomSxK1ULD76h6c312r4BUhVFMU57XoqHpZClgVSCgG3h0FEIRXK0NJPMpj8ZwM4jkNCCJ6u4fFM+nGXGmWpeCYH8lnyeRqacrMldrYAPoidA3n5FO5dxDV42Jb1ZcPDZzosB2v5UU2lW9xw4g== X-MS-Exchange-CrossTenant-Network-Message-Id: 43f1a463-4aaa-4918-7769-08dcd34ff085 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 17:25:47.4505 (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: TWVv0SNG7qmAkzB6LgnoHai3BicATITvn5SLFQDgBu4QOGI4jUSgBtIERsQo7ggqh92mwzFrn/E+Y2Xwqt3www== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7555 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This information is used in many places and it doesn't have anything to do with runtime_pm directly. Let's move it to the driver, where it belongs. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- drivers/gpu/drm/i915/intel_runtime_pm.h | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index aa3000349116..def3ca135406 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -234,6 +234,7 @@ struct drm_i915_private { /* protects the irq masks */ spinlock_t irq_lock; + bool irqs_enabled; /* Sideband mailbox protection */ struct mutex sb_lock; diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 9f1a6f692dd1..2c0fdb5e05a6 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1404,14 +1404,14 @@ int intel_irq_install(struct drm_i915_private *dev_priv) * interrupts as enabled _before_ actually enabling them to avoid * special cases in our ordering checks. */ - dev_priv->runtime_pm.irqs_enabled = true; + dev_priv->irqs_enabled = true; intel_irq_reset(dev_priv); ret = request_irq(irq, intel_irq_handler(dev_priv), IRQF_SHARED, DRIVER_NAME, dev_priv); if (ret < 0) { - dev_priv->runtime_pm.irqs_enabled = false; + dev_priv->irqs_enabled = false; return ret; } @@ -1437,7 +1437,7 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) * intel_display_driver_remove() calling us out of sequence. * Would be nice if it didn't do that... */ - if (!dev_priv->runtime_pm.irqs_enabled) + if (!dev_priv->irqs_enabled) return; intel_irq_reset(dev_priv); @@ -1445,7 +1445,7 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) free_irq(irq, dev_priv); intel_hpd_cancel_work(dev_priv); - dev_priv->runtime_pm.irqs_enabled = false; + dev_priv->irqs_enabled = false; } /** @@ -1458,7 +1458,7 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv) { intel_irq_reset(dev_priv); - dev_priv->runtime_pm.irqs_enabled = false; + dev_priv->irqs_enabled = false; intel_synchronize_irq(dev_priv); } @@ -1471,14 +1471,14 @@ void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv) */ void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv) { - dev_priv->runtime_pm.irqs_enabled = true; + dev_priv->irqs_enabled = true; intel_irq_reset(dev_priv); intel_irq_postinstall(dev_priv); } bool intel_irqs_enabled(struct drm_i915_private *dev_priv) { - return dev_priv->runtime_pm.irqs_enabled; + return dev_priv->irqs_enabled; } void intel_synchronize_irq(struct drm_i915_private *i915) diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h index de3579d399e1..796a2dcb307e 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.h +++ b/drivers/gpu/drm/i915/intel_runtime_pm.h @@ -42,7 +42,6 @@ struct intel_runtime_pm { atomic_t wakeref_count; struct device *kdev; /* points to i915->drm.dev */ bool available; - bool irqs_enabled; bool no_wakeref_tracking; /* From patchwork Thu Sep 12 17:25:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 13802384 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 72E0BEED627 for ; Thu, 12 Sep 2024 17:25:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02A2710EBF7; Thu, 12 Sep 2024 17:25:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YVlW0cfd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 432AE10EBF6 for ; Thu, 12 Sep 2024 17:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726161956; x=1757697956; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=CsSFwLKdfUYEYsCUKdizhSYaoNkOQ+ROmVCgO2zFIGw=; b=YVlW0cfdZlc0bItGhNzsVHPEL7vewdBKvm2zUbJtZNXO+a1Ec6iSlD0f DYnObuoy+xQiA9LkAqzIWRu8GaCVazUlqrINbWmeVUpyJbDUNMqwzvxlA HQRjIeD15ECVm3+Iu9+T9vlER4EVOqzniFDVFCxMIIDYXVgMfjxvJsBdC qWjzK99mForZR4EqD1+sVMuSoay4JmDJ+y95EnM7guCCXnZ6iYvQytmJB eyCkvmkQ2Q89qG1yHu+XIIgPa7Ybh2tYqA7I8SvAImzyMV7uRY/4PdV9m lFk47FETQOmK4sXH/jECMgzlhypQ7wB/SQAUe6/QY/hU5B34wG5+P5M2f A==; X-CSE-ConnectionGUID: VGKGGIdtTrqRVSluWHgiKA== X-CSE-MsgGUID: 0gMivF+eThaEcoQKXstG7Q== X-IronPort-AV: E=McAfee;i="6700,10204,11193"; a="24972451" X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="24972451" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2024 10:25:55 -0700 X-CSE-ConnectionGUID: 7VZ+l5H6QE2ndMb2LgIFWQ== X-CSE-MsgGUID: mLIORKZpQruvou5xrLGySg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,223,1719903600"; d="scan'208";a="72592884" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Sep 2024 10:25:55 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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; Thu, 12 Sep 2024 10:25:54 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 12 Sep 2024 10:25:54 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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; Thu, 12 Sep 2024 10:25:54 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 12 Sep 2024 10:25:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Rylh7DLIpXFMNN3GVW3LfKiQ/meoXufrwWdvepFX7+3V16URgH7Wk9IjqWXXove0GXFmzopMuNaICcyLYNfAYn+FFwwj2r4jgc8PU2lY+pC2Ji6FHRRfTgkRv2Dct8oZ5E4kER5C4EFzLG7VFQH42fAbnJI5HMPswZXcdZ4+Ttn5c+X0lSv3lZjx3STNnzHOJlL/ROh8osYNVNMT5jpZSbtoWwug+PqIOGaRDC0CgiHGI0x0fLwLKelypiUcyN737fOGztwac7lU1JB7o1rV5O2ZT1jojoS/lm9sxu3l9Mfd3TRLAKD28KNsSPDpaRsP9/PYa+YcSLIXnX2GFaRPtA== 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=xSQ2KyU6jaai7yXsh9vfMDedIPQ0YUJcAWGajIiBhZ8=; b=lhBnK6zR0Jgc6Cdkw8/R+YfWtJFqPHItg7w2cz773e1yAHADBeTx1pBEc5WJWA2eUgEExtxY+mN6KKP4JOerSKKCnU2gNn9Pu3YrHvYXjKDOagSJ9qXerzn967HJrkfVw0kmTt58aQw8pe19+yLuU38HnMIhvqkRcmG+Q1e9vrG/GmQO4yL7Nww9otKEpEL21arM1paVgi14m+w5A0zM/OSCuJwkSYZ1VOGa53w5EoK1YZ7So+baf+yRLxKP291QLOh/dofviCvDUVSbAUulYxC1t8MtmwizPVcF7TFczu8Q4xWz/5rvPLaEqiBwTUFOF9jNv/Op82EeLI2pegNHqw== 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 PH7PR11MB7480.namprd11.prod.outlook.com (2603:10b6:510:268::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.18; Thu, 12 Sep 2024 17:25:50 +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.7918.024; Thu, 12 Sep 2024 17:25:50 +0000 From: Rodrigo Vivi To: CC: Rodrigo Vivi Subject: [PATCH 3/3] drm/i915/irq: Rename suspend/resume funcitons Date: Thu, 12 Sep 2024 13:25:39 -0400 Message-ID: <20240912172539.418957-3-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240912172539.418957-1-rodrigo.vivi@intel.com> References: <20240912172539.418957-1-rodrigo.vivi@intel.com> X-ClientProxiedBy: MW3PR05CA0004.namprd05.prod.outlook.com (2603:10b6:303:2b::9) To BYAPR11MB2854.namprd11.prod.outlook.com (2603:10b6:a02:c9::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB2854:EE_|PH7PR11MB7480:EE_ X-MS-Office365-Filtering-Correlation-Id: 296d7c76-c241-4679-8583-08dcd34ff279 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: 408TgD2m1vLoOqjM8HzFmUA9LE6MtD8GHOFb61DiR4UQ/NLDe50V34Hui7khKTeznMfTnGRsijMOUBzAKVgQ6ZcIGMzvZnobpuAM3+71gKgWIe0PogFu6tjtACXnb0BB0ak7fOC/3qyl82vxbgWe73EpacQywsk5jKIUK5hkbOC0FOkvttse3D3LmM7712rojR9KSdydCr8eILT+fcUBzgMCPO0YfbyXB7d6zDMufwnbgoJ4UOjFaUHy0zG2SoC5qJdUnLvvMQ+S2x0P4hZsXtIE/TXD7VhhNKCyhi/4aEE4Oga9gWd3FuX+JFwGzw3RNaNELlUCgkPHEwchFSeDL2kNAM8Pn+Hkq9pIVHuet9Ei7utcUYwqgmUkpP5SZTlLroX6lIx/44LA7Thycm0cYZcg9H8cMVRRa5ukVhchMuD3oeodgCma29USEa+k8AczlEKThxIu5dyzuzhA6iPThFzxZ3/+ERg8dXqFhJEfg0ja77bQwSzrw/czyWDZAZ+kk+vuPYuJXMX+76DJ0j+Mc+iToNjjXwZEO7Xjo5WjimsEYJmd1VPGA1bzcwTij9fP10UoLlvYByNpT5ZDmCpeT9LBu/tjXMR9446lPLpuySbUvUHUGpfAVvUpO+nH/HAucHtKDTmW+QFIin4A9Y8om+O3Zs5yGk5gumBE85d7PZb9nXGHuxMF8gqNaF/E6TKPTWr5LKigeDcUOLG829sqE286XvpGFgfgergdlK+7yDrEpdON4DvhxFnkeKl2I7JsadEXzWINMpSoMw21L+hjhrf713b3wDqpveuO1Oobxeh0YPRJ+SKUNlzI8b+RZ+KrAc9Vo+PT7M08+jTUTAxXu5pNFp/VuisMobJJti41Ipgr0HY8zbGSfNXQAfZP6hE1GIVmrEw8JuCTB6jCyWoaM3hCy/j8hy/JtHvgKDSXzMj8uByvuIPRX2S0Z+jif7H2Ii2USQeXA91AOTPUNN1Z7MQ06IOxrCDTm770/rdnlJQ6rZmcPQsWGg3G1mDHQhosxknpoCLtKArMvn+cQWz3WcuqkhQs7NZAEUL3CJ8RLrvSWY6v2KPBmy6xKWvOHrCh+B9+8+CKimfh0OShtj4+VSQvXuN+83h30dcLKI2KWDpryuZra6agujtbFVPVr3CTSwlYujiTkyG/bz8HtxoZ9fGEQ/NmST3RLJp7MxaR/3TN+ukutz7R7jmKs49Vt+91X3vMyEDVkdvBaY6RVfhLE3Iyd1p1WTMpcqyxJBOvPiLcNOQVXFRWTUq5FjAwFwPcCDrRLE0fA25SYczHu37jeeEeYpW2sRSAeTLd/xkza7zIDXSqBmr4Wgd5Yx6TCOWIG7pmJTYLUfs0ignTkHyzSg== 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: jvccfdslvxkra7BDvnzGCjr1L57sBKKWW17hCG60e01OL7ksV6U0pQPPL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hBUAQCaKVEP1oTe+sOOoNGBvY2AyZCQpA8phD+gPdoW6gzRsrxHnICGqzmd6DBIUS8BhMz1SRmTyMh9iGqYyl+0Bez8Y/7MeO5ndbENOKDSKhQSkYjo2z4XKYWw7+BAM3kEd7b+8Y7TH2C3hmUsxu/G0iHGYmU5/x2JEGWBgpDDkLtRJuPVUNaKYPsb3EhYe42kDdP5SSPpv9GHwwFXVftOb4T99hbua5Dh4iJK6C8H3KeJbeZdjSq0jR8HN0nYJ4meKtsCySBAQhHCQXDHHprNuIEYg30JFyfjgEk/LKClJ2aXPGpwBUu38fWls8CDd8Sy9g4mCtoYgR3+lUYZTIgpxAoqGQxjafsIEUZWVU0T33lvkjrFqPYnPIxOc8nCzxY+b1yuaEgcUyIgw+f2iiukFS3YzB4ynMC91x5lVAK7UuwWrBfytQBZD4C0c/7I9rW8u5ygk752YmM4vrVmQl+1fxPf6fYPQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 296d7c76-c241-4679-8583-08dcd34ff279 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2854.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 17:25:50.5422 (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: MPdXZnBp/siJe9e6hdIdgfRRsYWc0o3+Shf8s/Mlf/y7s3jtCxFtZvXX/EftczIPID8d0HH8CPJpgHrIeM7H0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7480 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" Although these functions are used in runtime_pm, they are not exclusively used there, so remove the misleading prefix. Signed-off-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_reset.c | 4 ++-- drivers/gpu/drm/i915/i915_driver.c | 12 +++++------ drivers/gpu/drm/i915/i915_irq.c | 30 +++++++++++++-------------- drivers/gpu/drm/i915/i915_irq.h | 4 ++-- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index 8f1ea95471ef..f42f21632306 100644 --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -1233,7 +1233,7 @@ void intel_gt_reset(struct intel_gt *gt, } if (INTEL_INFO(gt->i915)->gpu_reset_clobbers_display) - intel_runtime_pm_disable_interrupts(gt->i915); + intel_irq_suspend(gt->i915); if (do_reset(gt, stalled_mask)) { gt_err(gt, "Failed to reset chip\n"); @@ -1241,7 +1241,7 @@ void intel_gt_reset(struct intel_gt *gt, } if (INTEL_INFO(gt->i915)->gpu_reset_clobbers_display) - intel_runtime_pm_enable_interrupts(gt->i915); + intel_irq_resume(gt->i915); intel_overlay_reset(gt->i915); diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 943e938040c0..f82aa313f854 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -950,7 +950,7 @@ void i915_driver_shutdown(struct drm_i915_private *i915) intel_dp_mst_suspend(i915); - intel_runtime_pm_disable_interrupts(i915); + intel_irq_suspend(i915); intel_hpd_cancel_work(i915); if (HAS_DISPLAY(i915)) @@ -1035,7 +1035,7 @@ static int i915_drm_suspend(struct drm_device *dev) intel_dp_mst_suspend(dev_priv); - intel_runtime_pm_disable_interrupts(dev_priv); + intel_irq_suspend(dev_priv); intel_hpd_cancel_work(dev_priv); if (HAS_DISPLAY(dev_priv)) @@ -1181,7 +1181,7 @@ static int i915_drm_resume(struct drm_device *dev) * Modeset enabling in intel_display_driver_init_hw() also needs working * interrupts. */ - intel_runtime_pm_enable_interrupts(dev_priv); + intel_irq_resume(dev_priv); if (HAS_DISPLAY(dev_priv)) drm_mode_config_reset(dev); @@ -1481,7 +1481,7 @@ static int intel_runtime_suspend(struct device *kdev) for_each_gt(gt, dev_priv, i) intel_gt_runtime_suspend(gt); - intel_runtime_pm_disable_interrupts(dev_priv); + intel_irq_suspend(dev_priv); for_each_gt(gt, dev_priv, i) intel_uncore_suspend(gt->uncore); @@ -1494,7 +1494,7 @@ static int intel_runtime_suspend(struct device *kdev) "Runtime suspend failed, disabling it (%d)\n", ret); intel_uncore_runtime_resume(&dev_priv->uncore); - intel_runtime_pm_enable_interrupts(dev_priv); + intel_irq_resume(dev_priv); for_each_gt(gt, dev_priv, i) intel_gt_runtime_resume(gt); @@ -1587,7 +1587,7 @@ static int intel_runtime_resume(struct device *kdev) for_each_gt(gt, dev_priv, i) intel_uncore_runtime_resume(gt->uncore); - intel_runtime_pm_enable_interrupts(dev_priv); + intel_irq_resume(dev_priv); /* * No point of rolling back things in case of an error, as the best diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2c0fdb5e05a6..d42997fdee65 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1449,31 +1449,29 @@ void intel_irq_uninstall(struct drm_i915_private *dev_priv) } /** - * intel_runtime_pm_disable_interrupts - runtime interrupt disabling - * @dev_priv: i915 device instance + * intel_irq_suspend - Suspend interrupts + * @i915: i915 device instance * - * This function is used to disable interrupts at runtime, both in the runtime - * pm and the system suspend/resume code. + * This function is used to disable interrupts at runtime. */ -void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv) +void intel_irq_suspend(struct drm_i915_private *i915) { - intel_irq_reset(dev_priv); - dev_priv->irqs_enabled = false; - intel_synchronize_irq(dev_priv); + intel_irq_reset(i915); + i915->irqs_enabled = false; + intel_synchronize_irq(i915); } /** - * intel_runtime_pm_enable_interrupts - runtime interrupt enabling - * @dev_priv: i915 device instance + * intel_irq_resume - Resume interrupts + * @i915: i915 device instance * - * This function is used to enable interrupts at runtime, both in the runtime - * pm and the system suspend/resume code. + * This function is used to enable interrupts at runtime. */ -void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv) +void intel_irq_resume(struct drm_i915_private *i915) { - dev_priv->irqs_enabled = true; - intel_irq_reset(dev_priv); - intel_irq_postinstall(dev_priv); + i915->irqs_enabled = true; + intel_irq_reset(i915); + intel_irq_postinstall(i915); } bool intel_irqs_enabled(struct drm_i915_private *dev_priv) diff --git a/drivers/gpu/drm/i915/i915_irq.h b/drivers/gpu/drm/i915/i915_irq.h index e665a1b007dc..cde4cac5eca2 100644 --- a/drivers/gpu/drm/i915/i915_irq.h +++ b/drivers/gpu/drm/i915/i915_irq.h @@ -34,8 +34,8 @@ void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv); void gen6_rps_reset_ei(struct drm_i915_private *dev_priv); u32 gen6_sanitize_rps_pm_mask(const struct drm_i915_private *i915, u32 mask); -void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv); -void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv); +void intel_irq_suspend(struct drm_i915_private *i915); +void intel_irq_resume(struct drm_i915_private *i915); bool intel_irqs_enabled(struct drm_i915_private *dev_priv); void intel_synchronize_irq(struct drm_i915_private *i915); void intel_synchronize_hardirq(struct drm_i915_private *i915);