From patchwork Mon Oct 7 14:05:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 13824751 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 EBC9CCFB441 for ; Mon, 7 Oct 2024 14:05:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79D9F10E150; Mon, 7 Oct 2024 14:05:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VPpmbTuF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC77D10E150; Mon, 7 Oct 2024 14:05: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=1728309906; x=1759845906; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=f3fXM8yekoVrOjkmzwu8iw4fGvNKb9OQrNl3QY/H2Eo=; b=VPpmbTuFWLdTLQA96gK+mUJhq1UI8Cq3UGSRXuZBFWkKEJZ328/4nQcU yahJudtKDx+4GvSWCW9sxqxxb84qQHUf2CLsooA178+rB3vac1OhS9VDO +0s6CTaSaCpSgiGD6rbm09rla+TZfUjKZT39BQnA5/4Erp3prr+4dd5v9 62+t3xFkYa5FYPwoufMtU9ZEhuQXyDs5JOIyslB6HPZVLTXzi49KvvpwY Lh17nTdnha4NdncUpsxzF6KtDmfqGvQaJgpnl0RWtORPCf7lecQREaKRw HSXZAJc1fUs9L+hUyb7SeF/bZHa9mNACgzWIavYpGekY1CUdxF0lkxxXh g==; X-CSE-ConnectionGUID: YuwW8q7FTqaBtsYul/MmIw== X-CSE-MsgGUID: wHPGJEzITpeb8er7TTwLxA== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27336859" X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="27336859" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 07:05:05 -0700 X-CSE-ConnectionGUID: I0nkZRhvSOeFAGZKbkGi7A== X-CSE-MsgGUID: a6FuzIH8SXOIqFimNmY1nA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="80461579" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 07:05:04 -0700 From: Imre Deak To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Rodrigo Vivi Subject: [PATCH 1/2] drm/xe: Separate the d3cold and non-d3cold runtime PM handling Date: Mon, 7 Oct 2024 17:05:30 +0300 Message-ID: <20241007140531.1044630-1-imre.deak@intel.com> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 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" For clarity separate the d3cold and non-d3cold runtime PM handling. The only change in behavior is disabling polling later during runtime resume. This shouldn't make a difference, since the poll disabling is handled from a work, which could run at any point wrt. the runtime resume handler. The work will also require a runtime PM reference, syncing it with the resume handler. Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index ca00a365080fb..cb2449b7921ac 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -345,6 +345,9 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime) intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold); intel_dmc_suspend(display); + + if (runtime && has_display(xe)) + intel_hpd_poll_enable(xe); } void xe_display_pm_suspend(struct xe_device *xe) @@ -387,8 +390,10 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe) if (!xe->info.probe_display) return; - if (xe->d3cold.allowed) + if (xe->d3cold.allowed) { __xe_display_pm_suspend(xe, true); + return; + } intel_hpd_poll_enable(xe); } @@ -453,9 +458,11 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime) intel_display_driver_resume(xe); drm_kms_helper_poll_enable(&xe->drm); intel_display_driver_enable_user_access(xe); - intel_hpd_poll_disable(xe); } + if (has_display(xe)) + intel_hpd_poll_disable(xe); + intel_opregion_resume(display); if (!runtime) @@ -474,10 +481,12 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) if (!xe->info.probe_display) return; - intel_hpd_poll_disable(xe); - - if (xe->d3cold.allowed) + if (xe->d3cold.allowed) { __xe_display_pm_resume(xe, true); + return; + } + + intel_hpd_poll_disable(xe); } From patchwork Mon Oct 7 14:05:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 13824752 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 0CF1ECFB443 for ; Mon, 7 Oct 2024 14:05:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2B8710E358; Mon, 7 Oct 2024 14:05:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="l8YLC4MO"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FB1B10E34C; Mon, 7 Oct 2024 14:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728309908; x=1759845908; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C4Wmdi2c7F9qK0dxw1qoUYQ52TqvmBBdAppeS70N2XE=; b=l8YLC4MOmBbYUK0LGzWGSU2xDR8s2rCXQnj6vBybO5FI2UgEbvTZEdo0 6eGR9FipU9rq9myFYElKWBXmNroqsUjEpzWdNMhq6L+6qKtfTFTEUQQJH 6n+m1dweJ7KNklPDmFragMkV/DRxUWUu2vpE6bzAr3qm1Wp4DQuhXNbuN JV6FyAs1+D1Th9uFyNOK9cl4HvB8PDF15qly8PlsrcHl1ASnXq7CXQu96 r3EwSMDALVjyfiiCH98cuBch+Ha27HLcgEkALHQLF6f+IjYR82KBhAozD dngzOUpifYiT4mXWnweyyN2gfTBSl7VB6bwdbDv3tPoTB+KZCFLPQzrN2 Q==; X-CSE-ConnectionGUID: kXDghJfCRd6do2hE9r7n/Q== X-CSE-MsgGUID: 1opu6qSLRlq0Ph+O8NqSpA== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27336871" X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="27336871" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 07:05:07 -0700 X-CSE-ConnectionGUID: aTWUxERLTZmy0HB4moNd0g== X-CSE-MsgGUID: dbGIERwtRBSVa78Z6O8vew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,184,1725346800"; d="scan'208";a="80461600" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 07:05:05 -0700 From: Imre Deak To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Rodrigo Vivi Subject: [PATCH 2/2] drm/xe: Add missing HPD interrupt enabling during non-d3cold RPM resume Date: Mon, 7 Oct 2024 17:05:31 +0300 Message-ID: <20241007140531.1044630-2-imre.deak@intel.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20241007140531.1044630-1-imre.deak@intel.com> References: <20241007140531.1044630-1-imre.deak@intel.com> MIME-Version: 1.0 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" Atm the display HPD interrupts that got disabled during runtime suspend, are re-enabled only if d3cold is enabled. Fix things by also re-enabling the interrupts if d3cold is disabled. Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Jonathan Cavitt --- drivers/gpu/drm/xe/display/xe_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index cb2449b7921ac..695c27ac6b0f8 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -486,6 +486,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe) return; } + intel_hpd_init(xe); intel_hpd_poll_disable(xe); }