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);