From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 97FC02D978C; Mon, 20 Apr 2026 15:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700371; cv=none; b=Tn4gz5Hj1LRW+zLNv5WIy9lUn7E/QkbB4MaHnhzRyxRlixbk3+yCTacEK82dKhh9G9nsodDobx2tAKaH8eJ6iJgtrIT2AF2+oMhUp400YMkgIOZ2L8UIpMUIhctTNp9QyaUmT43MFgOMUL7dbiwMmBLD36Pe4uWjithEsr9JtFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700371; c=relaxed/simple; bh=yzHdlgyLCA/xYM7K3zysFazgPx3spysWO34ZhVbZcrI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CPJtIJjB4PZEJe2AgMBeAbeHroY4IBC+FEdRsBvHVnFAwUS7/sIEtMsMXnUOIORCTQtTF/tHeBwe5pjBdS+1skYpK77sciqGkUABcqhmbkVHHsjXyT5U6iLCHS945TOsT5liMuHebF5GtmE2RDjlaPzee1ZcVeM3Z8sUMkSd8BM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MB83Q4f1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MB83Q4f1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FE39C19425; Mon, 20 Apr 2026 15:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776700371; bh=yzHdlgyLCA/xYM7K3zysFazgPx3spysWO34ZhVbZcrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MB83Q4f16WVx8lyqosQcxw5ufl2cnlL3uYi8P2XuUgtAlHGep7W4Lh2fAHK8Csbsn xaqdy04APf0n3I3vHjNun9fy7nDVeQmpZ/9hOIF1pg5Xf0kADuUm23FoGFeoA7quMb 4wzLlga5YE4iuipvv41MldLjsQ/14ThIws0qGDX8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tangudu Tilak Tirumalesh , Vinay Belgaumkar , Rodrigo Vivi , Sasha Levin Subject: [PATCH 6.19 113/220] drm/xe: Fix bug in idledly unit conversion Date: Mon, 20 Apr 2026 17:40:54 +0200 Message-ID: <20260420153938.099683591@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153934.013228280@linuxfoundation.org> References: <20260420153934.013228280@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-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vinay Belgaumkar [ Upstream commit 7596459f3c93d8d45a1bf12d4d7526b50c15baa2 ] We only need to convert to picosecond units before writing to RING_IDLEDLY. Fixes: 7c53ff050ba8 ("drm/xe: Apply Wa_16023105232") Cc: Tangudu Tilak Tirumalesh Acked-by: Tangudu Tilak Tirumalesh Signed-off-by: Vinay Belgaumkar Link: https://patch.msgid.link/20260401012710.4165547-1-vinay.belgaumkar@intel.com (cherry picked from commit 13743bd628bc9d9a0e2fe53488b2891aedf7cc74) Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin --- drivers/gpu/drm/xe/xe_hw_engine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c index 6a9e2a4272dde..3e928b6c098f2 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -596,9 +596,8 @@ static void adjust_idledly(struct xe_hw_engine *hwe) maxcnt *= maxcnt_units_ns; if (xe_gt_WARN_ON(gt, idledly >= maxcnt || inhibit_switch)) { - idledly = DIV_ROUND_CLOSEST(((maxcnt - 1) * maxcnt_units_ns), + idledly = DIV_ROUND_CLOSEST(((maxcnt - 1) * 1000), idledly_units_ps); - idledly = DIV_ROUND_CLOSEST(idledly, 1000); xe_mmio_write32(>->mmio, RING_IDLEDLY(hwe->mmio_base), idledly); } } -- 2.53.0