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 A804917CA0E; Tue, 16 Jul 2024 16:06:56 +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=1721146016; cv=none; b=Cv0PfnJdttUUbUzS/D20SMXvNtK/5HKW89FMdMimjexuL98N0yvWa2SoHV+HHMYHEvCRhqRqSG4OuPENm4tQGiTrEkoCwf0c+1fYCnlOAStBF6WRechnU4i4uXTJ1d09JoH8ZzFhASg5oDYgUFurXwSG+1vg/VINVCgE+3MwOV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721146016; c=relaxed/simple; bh=da9mwpeMcL2VoiIjIsku2SaQd6HOmJkfOMXi2dpK0ho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C79xT2s5PsQ2QtzUJf1LlDnynuymGIoepKug7b9LpeajxSUkh+ITx5Sz1mlopCKnzkOXNGI8uXqddJzZyUJtCfnSH8POrzJPh5T4Yo4HAIq2Dw99xhlo8RHYcPlXj6+NP1IiKJFa5Z86bleIi3IxhcKB66Tl6WC1rtcfOdTVG8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U+3dopkH; 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="U+3dopkH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E1E7C116B1; Tue, 16 Jul 2024 16:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721146016; bh=da9mwpeMcL2VoiIjIsku2SaQd6HOmJkfOMXi2dpK0ho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U+3dopkHTPlzxHAj1PlCcDzFaxBGbnzPwViXNuT6qy2091sYwG3I712UR68iBFBjE FALSy4/9BIfV2sngoOvejb7idDEAu2j6lhdGnIGJ7vghBjXrXVwUeltGwC0rpLUm6J fswh8nU2LKUV8L14UotP5krk5LktezHF7GND3gYI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ma Jun , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 008/144] drm/amdgpu: Initialize timestamp for some legacy SOCs Date: Tue, 16 Jul 2024 17:31:17 +0200 Message-ID: <20240716152752.851444305@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240716152752.524497140@linuxfoundation.org> References: <20240716152752.524497140@linuxfoundation.org> User-Agent: quilt/0.67 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ma Jun [ Upstream commit 2e55bcf3d742a4946d862b86e39e75a95cc6f1c0 ] Initialize the interrupt timestamp for some legacy SOCs to fix the coverity issue "Uninitialized scalar variable" Signed-off-by: Ma Jun Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index cc2e0c9cfe0a1..c04f458db937f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -494,6 +494,14 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev, entry.ih = ih; entry.iv_entry = (const uint32_t *)&ih->ring[ring_index]; + + /* + * timestamp is not supported on some legacy SOCs (cik, cz, iceland, + * si and tonga), so initialize timestamp and timestamp_src to 0 + */ + entry.timestamp = 0; + entry.timestamp_src = 0; + amdgpu_ih_decode_iv(adev, &entry); trace_amdgpu_iv(ih - &adev->irq.ih, &entry); -- 2.43.0