From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50AA02EBB9E; Sun, 7 Jun 2026 10:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780829590; cv=none; b=OEFp11RI8gG86VmezNJblQO/rcRxtQhdAksnegapCF0I5fWsnvNsnwcPUMRnug+TiyLzKCMS2RFj0W+PZKS3+9eu16K/8vdJJ5XNLtlj/PEzB3OLnwUv2iVQUrCB2g+LxJZOcOhN2o5n/2piiBsDHWHBAHkjAfuC2cC/M5TZhSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780829590; c=relaxed/simple; bh=qgnyGhkp85paTKBSvGE8WvTryEij3HgonA+++srsJPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cSkeG9nwJo8IuZOxG8JhoytrqSaU0QvXjwflClhyvIXBe9GlfFz7C5EAI0LkYEQNsuVw84w+k0PohYhrCJ4MLB5QDhTQPdjDIMQDbBc0P98JLPJd9hzF31C7/CBgvvCyFLuU8UBWCfXjy7bkVNtairBDWoqrRVq3HzaCMnccSHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zpAhxpsX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zpAhxpsX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1613B1F00898; Sun, 7 Jun 2026 10:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780829587; bh=MREkEPAPH3ubTPfK58AnCsP6B0piFcjG8aw4/dTkcKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zpAhxpsXAD0W/Ed/FN6aknH7gkIwjGqSgoba9NGURkt14jJ1L3leNY4sIBOzwiELf 0q8LvyNcaOx1/DHOatxEvwiWgkqXMtewHyOFmSvyld05CCtQ3h7zJguKUPVCbTEZyq a7D1DwoQSMr+ppXdZECPlmyXb0TkJVVu1UBfXmi0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jouni=20H=C3=B6gander?= , =?UTF-8?q?Micha=C5=82=20Grzelak?= , Tvrtko Ursulin Subject: [PATCH 7.0 292/332] drm/i915/psr: Block DC states on vblank enable when Panel Replay supported Date: Sun, 7 Jun 2026 12:01:01 +0200 Message-ID: <20260607095738.781432454@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260607095728.031258202@linuxfoundation.org> References: <20260607095728.031258202@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jouni Högander commit 8bb9093df555f9e89fdbe1405118b11384c03e04 upstream. Currently we are blocking DC states only when Panel Replay is enabled on vblank enable. It may happen that Panel Replay is getting enabled when vblank is already enabled. Fix this by blocking DC states always if Panel Replay is supported. While at it take care of possible dual eDP case by looping all encoders supporting PSR. Fixes: 0c427ac78a1d ("drm/i915/psr: Add interface to notify PSR of vblank enable/disable") Cc: # v6.16+ Signed-off-by: Jouni Högander Reviewed-by: Michał Grzelak Link: https://patch.msgid.link/20260520104944.239797-1-jouni.hogander@intel.com (cherry picked from commit eb5911f990554f7ce947dd53df00c114362e4465) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -4141,32 +4141,33 @@ void intel_psr_notify_vblank_enable_disa bool enable) { struct intel_encoder *encoder; + bool block_dc_states = false; for_each_intel_encoder_with_psr(display->drm, encoder) { struct intel_dp *intel_dp = enc_to_intel_dp(encoder); mutex_lock(&intel_dp->psr.lock); - if (intel_dp->psr.panel_replay_enabled) { - mutex_unlock(&intel_dp->psr.lock); - break; - } + if (CAN_PANEL_REPLAY(intel_dp)) + block_dc_states = true; - if (intel_dp->psr.enabled && intel_dp->psr.pkg_c_latency_used) + if (intel_dp->psr.enabled && !intel_dp->psr.panel_replay_enabled && + intel_dp->psr.pkg_c_latency_used) intel_psr_apply_underrun_on_idle_wa_locked(intel_dp); mutex_unlock(&intel_dp->psr.lock); - return; } /* * NOTE: intel_display_power_set_target_dc_state is used - * only by PSR * code for DC3CO handling. DC3CO target + * only by PSR code for DC3CO handling. DC3CO target * state is currently disabled in * PSR code. If DC3CO * is taken into use we need take that into account here * as well. */ - intel_display_power_set_target_dc_state(display, enable ? DC_STATE_DISABLE : - DC_STATE_EN_UPTO_DC6); + if (block_dc_states) + intel_display_power_set_target_dc_state(display, enable ? + DC_STATE_DISABLE : + DC_STATE_EN_UPTO_DC6); } static void