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=1794590240; b=UaYeU7JHXIyXB6bl4+qSaJfQS2kreRmM39REKD0b6QSa6rBnuvTkl0PQgZXmqp6V+M82 yxuAGJ44yOs6nllnFRtW+MWwNArsfKI3Yimz1HzsIgGEkyvFca2jvm5bk0cn9UvwxVQxh apy3jsqFXo+Au47xlrnttAhO1ULHP+8qzEMUkTpzaycUZ0ihlon29NskkGLGooP2ivwca cymQxuQdl8M/Ga2RUSDVU3PtwtqXov8piiRZPlo7Xagvj373U9+mYjhtzGHcton/yxiD0 t9akI1guRaAmuyad1glSHZ6cxm7NMdRXkTFhABIrAMPdZqs/n/fCUlLbjSbehhC+FSA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794590240; 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=DzQjvz0bzf9bMpFg58bHDhfeJEfdgY071iTcZnRq6GA=; b=q0GYd1HkG203gQE76pvAXGKn9dDFUuJYBd8WxnkbBtsEQNQFgRJcQ9THrvQHasIJ3kOU sKkqFKayZ1Tvb7imW0PEy8pDO9l3FEXY3POvUFnsXPkcTWHxt1TkQ7zfn+z29JP+6KW9p /3Q6HmsI9X1+6RMIo0Jloe2rPMEt9T5y0+20DrUrxgX1u505lHEx2y2vmDmsSdsseWa0D jYfkpusZvCLlT0QTDOIelbjDvsOD8Ccj7ER+pZUWhw1V1CVcZl+kBYRqnyuyFMtsCE34w X0hwlwo7HiqZlQ4CECqD9IFt2/7BKLfHKZepGmSv1bGetdzINxgvaDuWq5NP19svadw== 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=G6Nf7mM1; 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 C3E0C6075E26; Fri, 13 Nov 2026 17:17:20 +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=G6Nf7mM1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 714681F000C4; Fri, 13 Nov 2026 17:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794590240; bh=DzQjvz0bzf9bMpFg58bHDhfeJEfdgY071iTcZnRq6GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=G6Nf7mM1OJ8S6PEaCy9G4Vc81hbj4Fgvr2xMhqseEVjefpZmva7J/fqR6bvIznGyv tZjT0cegMTK9Rr4wLbirVv+ntoz/kP+G2zRJD0rTRuj/EniE4hM6mvBVo4kX9P/1W7 FG4EFN40OOETimuHB/krKSRBKlvU6wbdeZ82bUDU= 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 , Sasha Levin Subject: [PATCH 6.18 239/686] drm/i915/psr: Disable linked plane sel fetch as well Date: Fri, 13 Nov 2026 10:46:12 -0500 Message-ID: <20261113153829.147944817@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113153820.902362109@linuxfoundation.org> References: <20261113153820.902362109@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev 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 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jouni Högander [ Upstream commit b56721c32eb3ad0f086fdc0f33479be395e43bb9 ] Currently we are not setting linked plane selective area when selective fetch is about to be disabled for the UV plane. Fix this by simplifying the loop by just handling plane selective fetch disable and area setting same way. Also set the update_planes bit based on comparing old and new plane selective fetch area. This way both the plane and its linked Y plane are updated only when their selective fetch area changed. Fixes: a4f477e6ac17 ("drm/i915/psr: Add proper handling for disabling sel fetch for planes") Cc: # v6.8+ Assisted-by: GitHub-Copilot:claude-opus-5 Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://patch.msgid.link/20260929094434.77129-4-jouni.hogander@intel.com (cherry picked from commit b10c83af60cbc00ce4112742fd297581233e43cd) Signed-off-by: Joonas Lahtinen Signed-off-by: Sasha Levin --- drivers/gpu/drm/i915/display/intel_psr.c | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 253045374a061..d1a9f9de75b9a 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -2942,21 +2942,14 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, inter = crtc_state->psr2_su_area; sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; - if (!drm_rect_intersect(&inter, &new_plane_state->uapi.dst)) { - /* - * if plane sel fetch was previously enabled -> - * disable it - */ - if (drm_rect_height(&old_plane_state->psr2_sel_fetch_area) > 0) - crtc_state->update_planes |= BIT(plane->id); - - continue; + if (drm_rect_intersect(&inter, &new_plane_state->uapi.dst)) { + sel_fetch_area->y1 = inter.y1 - new_plane_state->uapi.dst.y1; + sel_fetch_area->y2 = inter.y2 - new_plane_state->uapi.dst.y1; } - sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; - sel_fetch_area->y1 = inter.y1 - new_plane_state->uapi.dst.y1; - sel_fetch_area->y2 = inter.y2 - new_plane_state->uapi.dst.y1; - crtc_state->update_planes |= BIT(plane->id); + if (!drm_rect_equals(&old_plane_state->psr2_sel_fetch_area, + sel_fetch_area)) + crtc_state->update_planes |= BIT(plane->id); /* * Sel_fetch_area is calculated for UV plane. Use @@ -2964,16 +2957,22 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, */ if (linked) { struct intel_plane_state *linked_new_plane_state; + struct intel_plane_state *linked_old_plane_state; struct drm_rect *linked_sel_fetch_area; linked_new_plane_state = intel_atomic_get_new_plane_state(state, linked); if (!linked_new_plane_state) return -EINVAL; + linked_old_plane_state = intel_atomic_get_old_plane_state(state, linked); + linked_sel_fetch_area = &linked_new_plane_state->psr2_sel_fetch_area; linked_sel_fetch_area->y1 = sel_fetch_area->y1; linked_sel_fetch_area->y2 = sel_fetch_area->y2; - crtc_state->update_planes |= BIT(linked->id); + + if (!drm_rect_equals(&linked_old_plane_state->psr2_sel_fetch_area, + linked_sel_fetch_area)) + crtc_state->update_planes |= BIT(linked->id); } } -- 2.53.0