From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380607; b=cauejlUjP5yAx2cp4aENWbC+VBer6Wq2wY9g12zvMceGGlPzSEZlTacXZYCnpIe3mzJ6 5VL/4ZEoJM6VmTEfY9YYw8KClCAwn+UH7GuAAndkt4NT3aOdetzXEYcG8+40NBUXS33r+ iAKY2vZnhvs+DemXbGUJdkOl2plbR4xOJRPm0pepdM23mzPNdLizbFSwtJF4dCYI4CF83 fkGrd+o3AHqLJA8MDeb5/RHtL5+q3Dhp/vLXDbp3qDYIKYZeuNs5RhI3Vq5kTXwGAdayC XurtxOIjZJLSDyFfyjBlHPFJZNsyclsFVADVzUhmXdheK7g8zgTrZH7lWEM8T2lq9GQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380607; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=z5HBseS0jfp6/0HMEg7xQGctp0j2IKS+KVqczwmff2E=; b=xVA3gjl0ANwolO3EvXJrt+dc9AUahsHfTvQlBAQkXJelKPA9dDegJwEmStL+bNuLaEHx vhDed1CnvABhZ4D4H7O1wjz3y8dk0plzzMKH6MPWXFtGXCj30tQEIeWeR2oZJnkJJE+BM ZMgNfSlZKs3SePFESH+mmHJNb6Ct7mkY3/2leU/1oxAmatNGGM7aoGFnCoNcf0NfbsAFl GE8IuBstMAEXKjoglIqHDbTUgDfdGjLPFXQcpjpij/CucsGa+bqsa6lRVh/h5qSPM2laI i3mmrFWM+VbMXK4MFIEdi/YwT3otsaSPw/ZRsNunBLHneFI6LBE4KMFrG4Whw2o2E9A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jsgvoA4j; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30232606A681; Fri, 4 Dec 2026 10:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jsgvoA4j Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A71E1F0092C; Fri, 4 Dec 2026 10:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380607; bh=z5HBseS0jfp6/0HMEg7xQGctp0j2IKS+KVqczwmff2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jsgvoA4jKAlGGmaooazHjpp3rJKFVTaB7kOJNtcGrEd0pUKDN0xJezOu72BCt6yk+ 56seL9RK3WY/scSmR7cuvoVzKs7YDfrjaRX9e/RYyr/a478wqMiysEZae01uM70FLs WUIjzqwHU3F8BWT9U2eVeyn17LYF97Kt5kxR3Y+o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jouni=20H=C3=B6gander?= , Mika Kahola , Joonas Lahtinen Subject: [PATCH 7.3 346/742] drm/i915/psr: Clear CFF state on flip flush Date: Fri, 4 Dec 2026 19:03:30 +0900 Message-ID: <20261204100644.252592017@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jouni Högander commit 9bf9ced37e60a6c947a481385cd9ed919f14cf36 upstream. An ORIGIN_FLIP flush can clear the last busy frontbuffer bits without running _psr_flush_handle(), leaving the CFF state flag set. Clear CFF state when no frontbuffer bits remain busy, and queue PSR work only when inactive and not paused. Fixes: 805f04d42a6b ("drm/i915/display/psr: Use continuos full frame to handle frontbuffer invalidations") Cc: # v5.19+ Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://patch.msgid.link/20261102100051.272137-4-jouni.hogander@intel.com (cherry picked from commit 233e3453eb705c0434f6f8467f211f0250c5832b) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_psr.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3648,12 +3648,6 @@ static void _psr_flush_handle(struct int intel_psr_exit(intel_dp); } else if (intel_dp->psr.psr2_sel_fetch_enabled) { /* Selective fetch prior LNL */ - if (intel_dp->psr.psr2_sel_fetch_cff_enabled) { - /* can we turn CFF off? */ - if (intel_dp->psr.busy_frontbuffer_bits == 0) - intel_dp->psr.psr2_sel_fetch_cff_enabled = false; - } - /* * Still keep cff bit enabled as we don't have proper SU * configuration in case update is sent for any reason after @@ -3710,13 +3704,8 @@ void intel_psr_flush(struct intel_displa intel_dp->psr.busy_frontbuffer_bits &= ~pipe_frontbuffer_bits; - /* - * If the PSR is paused by an explicit intel_psr_paused() call, - * we have to ensure that the PSR is not activated until - * intel_psr_resume() is called. - */ if (intel_dp->psr.pause_counter) - goto unlock; + goto rearm; if (origin == ORIGIN_FLIP || origin == ORIGIN_CURSOR_UPDATE) psr2_dc3co_flush_locked(intel_dp, frontbuffer_bits); @@ -3728,8 +3717,20 @@ void intel_psr_flush(struct intel_displa _psr_flush_handle(intel_dp); rearm: - if (!intel_dp->psr.active && !intel_dp->psr.busy_frontbuffer_bits) - queue_work(display->wq.unordered, &intel_dp->psr.work); + if (!intel_dp->psr.busy_frontbuffer_bits) { + if (intel_dp->psr.psr2_sel_fetch_cff_enabled) + intel_dp->psr.psr2_sel_fetch_cff_enabled = false; + + /* + * If the PSR is paused by an explicit + * intel_psr_paused() call, we have to ensure that the + * PSR is not activated until intel_psr_resume() is + * called. + */ + if (!intel_dp->psr.active && !intel_dp->psr.pause_counter) + queue_work(display->wq.unordered, &intel_dp->psr.work); + } + unlock: mutex_unlock(&intel_dp->psr.lock); }