Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp31721lqz; Fri, 29 Mar 2024 07:43:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoGVYgkVv+Yv+5YL0ATfJA3Rb1qP5dJVd0Lnr4+hQT2zhsIKxUJLJGqpZ9YJfAioJLw5H5M11Zfw1FDwSTHciPa62t0Ci28+DWC45HPA== X-Google-Smtp-Source: AGHT+IE2qoqOfPfp1T3eRABa1b7kL7hehmwSvKtUHgVhdExqQcaJdicY4ae2ty+7y310Z5I6zbZQ X-Received: by 2002:a17:906:1254:b0:a4d:f673:7f30 with SMTP id u20-20020a170906125400b00a4df6737f30mr2204683eja.11.1711723380536; Fri, 29 Mar 2024 07:43:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711723380; cv=pass; d=google.com; s=arc-20160816; b=vJKAFKPMFZyVelnfeoSQwRa61jIC1hzw9DeNCHawau06W76DvEUGV2Y/uG5aTW72Jn mqUdnZPjYmgNpqoj4dEdEXWUuxCsqqmcJKdaWjJjuIwkrEnuSl88xnNHRvtFDyXMutRg Sfeh0KmYoR5CygQgjeH4ncl8mbOtdjjhI8kFCWCuRTqOIpD/NL+/Imt2wU+h3jazn+f1 NraNKGG8C/xhSBh32iPGyH4pTRKXhoAA1WgeHfQ/9ubnXrWTP6u6AU/GOsAfLiQmAI3p ukhHTn1lKUSq2HDJ44J5zvngpKhvyCWnblu8qNHQN13ri+QeUm+FeDkey+CvyYD986gW wTkg== 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=0k02SGiGb9nQ8gz7L42UjYYVkuuatdbrRiCDqAu7LBQ=; fh=5a1CcwU2fgNjumfc80rfl92p23lx6PxWmVzl3W+AUNc=; b=dY6/cztJNbJ+Q69BGcYT82aX+iMEceKMkeYW3TSajeHycHLX8fwjEujsSodQBWNeqF VSZ3TEtTMuzei1O85WtLVPRSalXUZo4RRZw7OojhIdQ4xsZhLsuW2zfL5zBmECmxO7rl poxfWDXS4IQZWsTDhUUh18tuQnBqHzIsVRK2ZO3HPhnhXnaZ5sPZfEdMKzWJ0H9PUS9x lb/9lN7h3jCuWi/aITtGqteEOkvjHxyTPWemymgKg40YgNGtd/mMHLgoaHabYNbsR4p/ QibV+MMYYXyQUS5XiJijOrLPXDhdmok624YtZnM8fZBG0ndfe6lT+SnM6Gq4Qq3XIiRa Bj0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I9zZArx/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dk17-20020a170907941100b00a4749f4632dsi1992264ejc.43.2024.03.29.07.43.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 07:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I9zZArx/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124908-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 49F3A1F2A6F6 for ; Fri, 29 Mar 2024 14:23:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 008E929D395; Fri, 29 Mar 2024 12:46:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I9zZArx/" 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 1BD2A29D38A; Fri, 29 Mar 2024 12:46: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=1711716411; cv=none; b=He4W/gqDHx5qz1aBaT7ivr6CwVUhRf2vHoquWzYxCJk5j1CNa8EWQeA02A1WCTRZesa+vKh30pJ+Rz/spl9FWRxI2MAjfi9A9PUTDyqnNvzWi+1PtyEHdmOg5Vs7Yu+tOd4HPJpt0c+BF+ODlEarfZ0K9dlHPqHbPlXWiIwa3vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716411; c=relaxed/simple; bh=aiYW0yw5E+HOidbqciMe7uHQZ7wj+DvE0N4dRycpisI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ac2XtY5jkMoghz3GMURugC//IFBNeq0ZhRaZ59Q8y41JehCcmvSpmE5ULfc3RPYqDGqI8+KCYpDugltr++EgNuMkchwTviHzU4xZEREUc9DIa/6GCd6mJ8afgJxi6Woo7SibcP7cuv0IuQRBL2im1DZ2sYlYttaQHiUmgMtdrYQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I9zZArx/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33944C433C7; Fri, 29 Mar 2024 12:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716411; bh=aiYW0yw5E+HOidbqciMe7uHQZ7wj+DvE0N4dRycpisI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I9zZArx/ejgGFTEYvrZX8+IKqWa9nCUJyAgQUZcdtw4VpP9MvRAF9w8gniKSOn8zm edUq/IjHzRj7jumccAos2FlwgRxVgUMyZuG1A8NbVE7rRbK50KWLz2UZEByc3zPb9s P7A4bMetDLB8Vgjq8/t/QxSBgDtwps7RdoSh/ENmni1jI6UplhQJ1xDqJXaQ3WtjvJ jRSK6j+DONEvmK6W3JVHoRsrnucA1sX93JVgG+b7muzykwXZu1J2mtKqdxGvf91iVJ lHnRTCHTtxpnY1ng3wLRdD074dXSHIqaM9l0h3o2OM2l7PXMhrgzM7Zl6v+SF5PD96 uRrfwPuH393BQ== 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, aurabindo.pillai@amd.com, dillon.varone@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.1 24/52] drm/amd/display: Fix nanosec stat overflow Date: Fri, 29 Mar 2024 08:45:18 -0400 Message-ID: <20240329124605.3091273-24-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124605.3091273-1-sashal@kernel.org> References: <20240329124605.3091273-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.1.83 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 4220fd8fdd60c..54cd86060f4d6 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