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 5FC27C7EE43 for ; Thu, 1 Jun 2023 21:52:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6317B10E5F5; Thu, 1 Jun 2023 21:52:53 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id AA74910E5E6 for ; Thu, 1 Jun 2023 21:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685656369; x=1717192369; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X9Sfd43ItkMD6QzOgAEa8a1NHYwDvkKjAf2CqesoqPk=; b=DXG4a72y15RiaEM2n4IwYNF39Or0jYmdBGQ5PIMgYLgFCzlZwCPbKaSr N1kT48TfqKQQrGLAFYuCh7250gUcEobMtCz/3M6FqNnvsLxJVYl1rgD3k wKg4+Wg8RB1+WXz/DxBgZ/EpoyIRNr4ZN3A2cwhikZd5K1Z+K30fJ4H/w Ul+2sGIyGNFuVqNjHqfaaQCYvxGXTB6OPFmutnvDPi6EKSnyxnBo4Nwrz HWlUuTvMe0J728xvoqTas5EM4/RoUYuBKgKID/R8iTvHG32txhzPR33Ez RpREIBbRUcAMAEqnS5lw3IqJXPtulEcj7gp8OzKGw3Q6miylylSDhoN9A A==; X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="335313625" X-IronPort-AV: E=Sophos;i="6.00,210,1681196400"; d="scan'208";a="335313625" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 14:52:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="707563617" X-IronPort-AV: E=Sophos;i="6.00,210,1681196400"; d="scan'208";a="707563617" Received: from mdroper-desk1.fm.intel.com ([10.1.27.147]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 14:52:48 -0700 From: Matt Roper To: intel-xe@lists.freedesktop.org Date: Thu, 1 Jun 2023 14:52:35 -0700 Message-Id: <20230601215244.678611-23-matthew.d.roper@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601215244.678611-1-matthew.d.roper@intel.com> References: <20230601215244.678611-1-matthew.d.roper@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [CIv2 22/31] drm/xe/irq: Handle ASLE backlight interrupts at same time as display X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: matthew.d.roper@intel.com Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Our only use of GUnit interrupts is to handle ASLE backlight operations that are reported as GUnit GSE interrupts. Move the enable/disable of these interrupts adjacent to display interrupts. In the future we may want to even move these inside the xe_display_irq_*() functions. But since these rely on xe_irq static functions like mask_and_disable() it's easier to keep them separate for now. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi --- drivers/gpu/drm/xe/xe_irq.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c index ad2f73b2a031..c069e374a947 100644 --- a/drivers/gpu/drm/xe/xe_irq.c +++ b/drivers/gpu/drm/xe/xe_irq.c @@ -187,8 +187,6 @@ static void xelp_irq_postinstall(struct xe_device *xe, struct xe_tile *tile) gt_irq_postinstall(tile); - unmask_and_enable(tile, GU_MISC_IRQ_OFFSET, GU_MISC_GSE); - xelp_intr_enable(xe, true); } @@ -372,8 +370,6 @@ static void dg1_irq_postinstall(struct xe_device *xe, struct xe_tile *tile) { gt_irq_postinstall(tile); - unmask_and_enable(tile, GU_MISC_IRQ_OFFSET, GU_MISC_GSE); - if (tile->id == 0) dg1_intr_enable(xe, true); } @@ -486,7 +482,6 @@ static void xelp_irq_reset(struct xe_tile *tile) gt_irq_reset(tile); - mask_and_disable(tile, GU_MISC_IRQ_OFFSET); mask_and_disable(tile, PCU_IRQ_OFFSET); } @@ -497,7 +492,6 @@ static void dg1_irq_reset(struct xe_tile *tile) gt_irq_reset(tile); - mask_and_disable(tile, GU_MISC_IRQ_OFFSET); mask_and_disable(tile, PCU_IRQ_OFFSET); } @@ -513,6 +507,8 @@ static void xe_irq_reset(struct xe_device *xe) xelp_irq_reset(tile); } + tile = xe_device_get_root_tile(xe); + mask_and_disable(tile, GU_MISC_IRQ_OFFSET); xe_display_irq_reset(xe); } @@ -535,6 +531,13 @@ static void xe_irq_postinstall(struct xe_device *xe) xe_gt_irq_postinstall(tile); xe_display_irq_postinstall(xe, xe_root_mmio_gt(xe)); + + /* + * ASLE backlight operations are reported via GUnit GSE interrupts + * on the root tile. + */ + unmask_and_enable(xe_device_get_root_tile(xe), + GU_MISC_IRQ_OFFSET, GU_MISC_GSE); } static irq_handler_t xe_irq_handler(struct xe_device *xe) -- 2.40.1