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 A2B302561A8; Mon, 23 Jun 2025 13:32:01 +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=1750685521; cv=none; b=th65V1D6QaEpaPoGaP14QkHl0ZXfN3TEymYWvHrLYjR7MEAbUgdu7WjF1Dw4KQwnhoEv5eRXMmcgumCwtjqvWG+S0yk471KRFSa/GtZ/5P075xDyG5HMIxiDw8/OdqBHr88QczOM5bF27UA53F3UE0bYzScZGDeDOHXQ8P5mx1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685521; c=relaxed/simple; bh=oTMgnc7RXhlZ9aKqTIUpFY7tBhKzj4ZwJTe/vOlcBR0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZYmRlbcD2DKUlTD+DKzM9Z2zBM+L8UQvj2XrohX9jxQZi+nH05XDmI2EENdBiNaO5FKy7GsvzRBlo6ORfFEReemcq8IOClL0RCDJSgMvATrB0dEvr2LVKQFVriIeG45FhF9c6VHE72g/wZXxzuq7IG6D06X0Z0d3iofADegH78o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fDS1woZe; 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="fDS1woZe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F8F5C4CEEA; Mon, 23 Jun 2025 13:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750685521; bh=oTMgnc7RXhlZ9aKqTIUpFY7tBhKzj4ZwJTe/vOlcBR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fDS1woZeFSwtJ9mqMSC+UFszAH0Iw3qrN65F4Yo8SrxCRkLg4PUwCgG1HekNH/tNG rqDsxezuJy6TjUw9Ch2O213KiBsqMZgxbqmjRdhvgTIQo5GXU36iVM2iXJTbHgKCIR ttP4t6btlC5NT52Mehi8W7ZsZCXccD/QpgZyPZEA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jesse Zhang , "Shaoyun.liu" , Prike Liang , Alex Deucher , Sasha Levin Subject: [PATCH 6.15 241/592] drm/amdgpu: Fix API status offset for MES queue reset Date: Mon, 23 Jun 2025 15:03:19 +0200 Message-ID: <20250623130706.023610277@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130700.210182694@linuxfoundation.org> References: <20250623130700.210182694@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jesse.Zhang [ Upstream commit ad7c088e31f026d71fe87fd09473fafb7d6ed006 ] The mes_v11_0_reset_hw_queue and mes_v12_0_reset_hw_queue functions were using the wrong union type (MESAPI__REMOVE_QUEUE) when getting the offset for api_status. Since these functions handle queue reset operations, they should use MESAPI__RESET union instead. This fixes the polling of API status during hardware queue reset operations in the MES for both v11 and v12 versions. Signed-off-by: Jesse Zhang Reviewed-By: Shaoyun.liu Reviewed-by: Prike Liang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index ef9538fbbf537..480283da18454 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c @@ -480,7 +480,7 @@ static int mes_v11_0_reset_hw_queue(struct amdgpu_mes *mes, return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_reset_queue_pkt, sizeof(mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE, api_status)); + offsetof(union MESAPI__RESET, api_status)); } static int mes_v11_0_map_legacy_queue(struct amdgpu_mes *mes, diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c index e6ab617b9a404..624c6b4e452c8 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c @@ -500,7 +500,7 @@ static int mes_v12_0_reset_hw_queue(struct amdgpu_mes *mes, return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe, &mes_reset_queue_pkt, sizeof(mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE, api_status)); + offsetof(union MESAPI__RESET, api_status)); } static int mes_v12_0_map_legacy_queue(struct amdgpu_mes *mes, -- 2.39.5