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 37C091509A1; Fri, 29 Mar 2024 12:49:29 +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=1711716569; cv=none; b=iS/AEo5s3UUD0hmfUKUHExdR58dsmCqMvCq1FzcietgrdVyHKDnyoAFuu6LnbWPHiTnJDPZdlI+o4+gXKPeFoxXkH4Sa77Z4MVPzOyIL35toJQr7BgqmJz/rx+ZCX0sJx4/kUd6ZysGBa/cbxPhYjWLdJ23Y13B8VtJEJsi3tvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716569; c=relaxed/simple; bh=aiYW0yw5E+HOidbqciMe7uHQZ7wj+DvE0N4dRycpisI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SI6TfSAmZwCsg6Z0eqr+hBjY80LRNz+t/V4dniLdZK0S3YRuELEiF5OKDGOc8S8lom42Y8xDNQXMW8veMFWwq92FMXGo3tlzOgSyHhQ/7cmznCTJvt2cVXym/1hUTMRVfp/Zrdp5EKqIVGVt54Iqs/MdHqixC5+OdrDLq8chx44= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uSoV2WQq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uSoV2WQq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DE6AC433F1; Fri, 29 Mar 2024 12:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716569; bh=aiYW0yw5E+HOidbqciMe7uHQZ7wj+DvE0N4dRycpisI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSoV2WQq0hKksk6Y8x17z8V0nA8vBF4vgckqxrnHw4Nr4h+fJ3rkUo6RssBo20sPf KY9Uahe5mGAqql2kn6dxHT0WAVgIPk4deNz34wpUY1cmhE/Wdipe8ACcx6FpScD37Q zXqhbRi8S/7l4FMFb8RGYWN24MuyiIbGGhXXo2ysLTLmnXn7HrJDHLd0dDSJSXUfUA Fn/WjgpC42dCZB8m8foZroqVSjd4fmZtRZj8GlsbcntyqoYBB6o9oFS1cXsXlPHlPY vIgg3PQEesToqbsEFU1tmSa19cJ/9isXExjsrQVP2pYt/R88KyOQePEyYCBa7R0j4P whDC+XWbQ9cOQ== 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 5.10 14/31] drm/amd/display: Fix nanosec stat overflow Date: Fri, 29 Mar 2024 08:48:31 -0400 Message-ID: <20240329124903.3093161-14-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124903.3093161-1-sashal@kernel.org> References: <20240329124903.3093161-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 5.10.214 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