Received: by 2002:ab2:855:0:b0:1ef:b27b:cc29 with SMTP id 21csp1722273lqy; Fri, 29 Mar 2024 06:50:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRs7BtrhVuaT0lWiDJuwZ94pHt78rz45nsWm/fDH8V0LXbhFBQ4u8dJZUpzqo1ET+lUuiGesAtOBl/OGkUFfDtSxh9ItpHuZwUMZ3eZg== X-Google-Smtp-Source: AGHT+IGPKU2Wzi7ybJAjozvQY6SmQDPNFT3gWZV7ZNCA/p7q4q6z7x3Wx2+ZYZ3Ikz2kacuj6VGb X-Received: by 2002:a05:6e02:1386:b0:365:e274:5e55 with SMTP id d6-20020a056e02138600b00365e2745e55mr2377237ilo.7.1711720212110; Fri, 29 Mar 2024 06:50:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711720212; cv=pass; d=google.com; s=arc-20160816; b=FCmJafNZKAvCE1qdpcgCxvpoVjl9JuyL+6LKq/sgh/9ux0D/a9g7yomSLeN0FiLAYU cdyP57aTSKoyD7V9Qi5GNr9U1z6RYmUYj0DvAQv9Ls+Y8r35pTm3wA5RnoYbZOYLQvuj aHcVFh1bG0S1j6u3GvMYeAQswiijTJ+ihfl8Jet6nDJSHpC/Vde93K0mnshFD77+ueap cJdHZK72I+vE2RTvrlf8EmX1vMAmPnMRyyr2b8gPO57aO44hkWEIEVyLWqkDRAYB6md6 ft2kcANtkxrOcvueXcGSaztNb1qYj3ZZlnY3aaOBpwYvATsGVSeCstgkTyxbwYoG1+/U TcHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JfafyHfW6g9nifiB+U0j6B6dG3zL0WO6U++aR9goCVE=; fh=ZwtS2h2nJNROiKhLBy4hdOaohNcWQXjFblQUqlQ0r9E=; b=E6tnsjHdbL4hgODxgIYTockKPGJD8vYc4+EjVtqt/04wMNz8r7mm65mC39dKuogKC8 ACBRFdFApjVzXwGGu3gWc/FZsrxS50rLgrvkr1xw4NfEk0V0LbpKHYGHuRXiNpeMUznR HULtGWcNWCGRU4J2YBz/AW5jjObZn0rOJSupX9gD3kMUD2f53Tu708GY46cbn7ZweE+c SGRqMgwsU3Ve78c/LQnaLpT5X6vGINxvULbhTrLV7wJYMV5pD5ZLuz0Qvn8IXS02KKyB 1HrYgsBjptIrr3FTIixOxgdFcFhBEsTSMhR1MNNXB/gVHY4LHokIe+dpCG0sA2iwP4Eg V49A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKPyu6CV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z186-20020a6333c3000000b005dc883a6ba5si3694991pgz.500.2024.03.29.06.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:50:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uKPyu6CV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3A65228B0C2 for ; Fri, 29 Mar 2024 13:45:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25FD318133D; Fri, 29 Mar 2024 12:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uKPyu6CV" 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 368B518132E; Fri, 29 Mar 2024 12:41:41 +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=1711716102; cv=none; b=aNIWw17OkRd31O4yBLwrdPqkUtWAmJmXKK2G5wYO0wdS9UjVEXpVi7o5mA/MG5wrk5UC5qqIOdnDWQtSgjFMm/ZCWbu0aTGK4Rkt4LVb/Zb3HJr3z9t7QsZNl3s3YOPlCKfn08lzYo8no9zLlnzVsRXy3Au27nVfNhE4tAFfJeA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716102; c=relaxed/simple; bh=58rZfvaFipaxYd8uXFiVRAcZUdsrKwMl21wU3vpq4q4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QdsNQbWy1sK4tVTguiifP3MOew1oqY+7OkkCQwpBp2fTeAf6fZ71Db819kYkiTrhLs630AXOeJ3uul1WtiGPqz7UrZtN9VqiYRdHH+ojcglPSp6OLFwtUH99ezt5e0UxIQqeoPyjRW4vLmhIWmKiO9cIsU+6+t8TIZzwFtmZQO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uKPyu6CV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 147F8C43390; Fri, 29 Mar 2024 12:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716101; bh=58rZfvaFipaxYd8uXFiVRAcZUdsrKwMl21wU3vpq4q4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uKPyu6CVVWdWaA+vz6/uZEEaFEkg3aIaFDwGNtx01yBYNuezoXkMxpHzTef1kbsT5 QCz9n3xgNAyn2XGiuRHKEM8jvoyYenXCZ6Sh7aqod7z9OzbsP7SAMtM76oenlU8Ja1 oauW/eokLc8gz13KD52zD5/eVAO82QwNsKe3mGPydQXkJFj21bfqNy1NkztsnO1GQN cBMtFWhueOjc6f7uceG67tOdcWr7aUTMeNeKr/z8tCZ4EPRg3bxNms4AreNMahgKBN AWy935ihw67H7+BU8v/uvO0CkobvZUeE3p7nwxKX257HfVLj1ZWk/rj6HyZ+Ys4NPi EP1aFm/BekePQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Aric Cyr , Rodrigo Siqueira , Daniel Wheeler , Alex Deucher , Sasha Levin , harry.wentland@amd.com, sunpeng.li@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, dillon.varone@amd.com, aurabindo.pillai@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.8 54/98] drm/amd/display: Fix nanosec stat overflow Date: Fri, 29 Mar 2024 08:37:25 -0400 Message-ID: <20240329123919.3087149-54-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329123919.3087149-1-sashal@kernel.org> References: <20240329123919.3087149-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.2 Content-Transfer-Encoding: 8bit From: Aric Cyr [ Upstream commit 14d68acfd04b39f34eea7bea65dda652e6db5bf6 ] [Why] Nanosec stats can overflow on long running systems potentially causing statistic logging issues. [How] Use 64bit types for nanosec stats to ensure no overflow. Reviewed-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/modules/inc/mod_stats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h index 5960dd760e91c..8ce6c22e5d041 100644 --- a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h @@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats, unsigned int length); void mod_stats_update_flip(struct mod_stats *mod_stats, - unsigned long timestamp_in_ns); + unsigned long long timestamp_in_ns); void mod_stats_update_vupdate(struct mod_stats *mod_stats, - unsigned long timestamp_in_ns); + unsigned long long timestamp_in_ns); void mod_stats_update_freesync(struct mod_stats *mod_stats, unsigned int v_total_min, -- 2.43.0