summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoyuan Zhang <boyuan.zhang@amd.com>2026-06-24 09:50:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-07-01 11:47:57 -0400
commit680adf5faeeabb4585f7aeb53681719e2d6c2f41 (patch)
tree76c2329fb68143dcd0f1bdc31227e362c6af4df7
parent2bf6867e5953a140fc91c3159987656e44ed29fb (diff)
downloadlinux-680adf5faeeabb4585f7aeb53681719e2d6c2f41.tar.gz
linux-680adf5faeeabb4585f7aeb53681719e2d6c2f41.zip
drm/amdgpu/jpeg: fix jpeg_v5_0_1_is_idle detection
jpeg_v5_0_1_is_idle() initializes ret to false and then accumulates ring idle status using &=. Since false & condition always remains false, the function can never report the JPEG block as idle. Initialize ret to true so the function returns true only when all JPEG rings report RB_JOB_DONE. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
index 324d5899bd80..8846cb3ed12b 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
@@ -674,7 +674,7 @@ static void jpeg_v5_0_1_dec_ring_set_wptr(struct amdgpu_ring *ring)
static bool jpeg_v5_0_1_is_idle(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = ip_block->adev;
- bool ret = false;
+ bool ret = true;
int i, j;
for (i = 0; i < adev->jpeg.num_jpeg_inst; ++i) {