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=1796380596; b=O9iiTLKZmwp4MyRjhitklE9+6w8d8sfO2Ox2N7dGBbKB3wFWMNoKT29TK2fmQauULx5x ka4i7UFzyJQy4482Of8lr1RnMg4exJXjMRutqA+yfHKfeWwPzskuKscOO9LV7edph+Wdg BDk/uhDiSzTSXTTYWZvujBmsPif6IxWI1FWkGCaWFedYlZysNhIKNW26dATb6XzW8lUcg HxPp0NPNGxQe5RoFnewCeaU09NylLDsZl3DmLyj3YcS8UOa+2M7Bli5VmaPkcRU2GVjpg U0Z9KoIzgYvH2mr2WUF073RCZs08mdGoY8va4355Zd1eXcdW7IKPBQAyI34kPAF+XNQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380596; 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=6j5GTz/f4D6S4eoZKeEqCCZ6Lag2ij4gR+5m6FRcL4A=; b=0WJxThTgi1yM3UiERBYS0j2azZfuoQ1WxhJw6k61IBfGczNEjhqUcPKKCd6CkToEk8zh 1HFFt+P+9bRL/8eMewWEsWNk51ic2xA2RVwcTb0mKud8txk4CgMYykbwQZL49GAx9UAIG kfBz4ZtNmT4I2CinaNZ/XuldI+R9dHoeiQbyUOB0TrSJmU2G82VMtZdenqRWSytUFXpzs suUW7AfzHx+iIsafYF62ZQwhq8RNCBGAX+yR/Noi6tyjoFRnKZmvuGib1/VuECVwba9wd UdQQw5hSVMh2a8Rm+xUIKWYuW1LIgs7HcACd5GCl6FBsZoCBH0/YDBgd7CILo0oNPwQ== 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=xpIUHPJr; 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 09B76606A336; Fri, 4 Dec 2026 10:36:35 +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=xpIUHPJr Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CE361F000C2; Fri, 4 Dec 2026 10:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380595; bh=6j5GTz/f4D6S4eoZKeEqCCZ6Lag2ij4gR+5m6FRcL4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xpIUHPJr0AEupcz2c37+tRJgBBPWD5CyAC1jcat8IDASqOxvTvD0W7vKL0m5aBncl VJpkxnAFPKUuNWSNWnBvrMc4dMk9l7vBsJnRQjWuAnE4zLTbuSDymaoRpKxum0Vb7q HRajZNSPmu2NsuAJbqqsRtVo1DJGLdYvxYCN6Qos= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hanson Wang , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Joonas Lahtinen Subject: [PATCH 7.3 341/742] drm/i915/dsb: Realign GOSUB only for QW slots 6 and 7 Date: Fri, 4 Dec 2026 19:03:25 +0900 Message-ID: <20261204100644.114157714@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: Hanson Wang commit 715f145f6204363a50853eb15719dc860db0bc01 upstream. intel_dsb_gosub_align() moves free_pos to the next cacheline unconditionally, but only clears the skipped bytes when at most two QW slots remain. Wa_16024917128 forbids GOSUB in slots 6 and 7 only. A larger gap is still executed. A Panther Lake DSB dump showed nonzero data in that gap, with the tail at 0x58 and GOSUB at 0x80. Advance free_pos only when the instruction would land in slot 6 or 7, and fill that gap with NOPs. Emit GOSUB in place for every other slot. intel_dsb_align_tail() still clears the rest of the cacheline. Update free_pos inside the existing gap check in intel_dsb_align_tail() as well, so the two helpers keep the same shape. Fixes: 2c41d62f6fb1 ("drm/i915/dsb: Implement intel_dsb_gosub()") Cc: stable@vger.kernel.org # v6.17+ Signed-off-by: Hanson Wang Signed-off-by: Ville Syrjälä Link: https://patch.msgid.link/20261106102315.1361645-1-hanson.wang@ugreen.com (cherry picked from commit a2f5df6c5468b4f65e58c4125bba3f0e3cdc6aa1) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_dsb.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_dsb.c +++ b/drivers/gpu/drm/i915/display/intel_dsb.c @@ -589,10 +589,10 @@ static void intel_dsb_align_tail(struct tail = dsb->free_pos * 4; aligned_tail = ALIGN(tail, CACHELINE_BYTES); - if (aligned_tail > tail) + if (aligned_tail > tail) { dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail); - - dsb->free_pos = aligned_tail / 4; + dsb->free_pos = aligned_tail / 4; + } } static void intel_dsb_gosub_align(struct intel_dsb *dsb) @@ -607,11 +607,15 @@ static void intel_dsb_gosub_align(struct /* * Wa_16024917128 * "Ensure GOSUB is not placed in cacheline QW slot 6 or 7 (numbered 0-7)" + * + * Move to the next cacheline only for those two slots. The skipped + * bytes stay in the programmed range, so fill them with NOPs. Any + * other slot can take the GOSUB directly. */ - if (aligned_tail - tail <= 2 * 8) + if (aligned_tail - tail <= 2 * 8) { dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail); - - dsb->free_pos = aligned_tail / 4; + dsb->free_pos = aligned_tail / 4; + } } void intel_dsb_gosub(struct intel_dsb *dsb,