[AMD Official Use Only - AMD Internal Distribution Only] Thanks Satish.
Reviewed-by: Jesse.Zhang <[email protected]> > -----Original Message----- > From: Sundararaju, Sathishkumar <[email protected]> > Sent: Saturday, October 11, 2025 2:24 AM > To: [email protected] > Cc: Liu, Leo <[email protected]>; Zhang, Jesse(Jie) <[email protected]>; > Sundararaju, Sathishkumar <[email protected]> > Subject: [PATCH] drm/amdgpu: fix bit shift logic > > BIT_ULL(n) sets nth bit, remove explicit shift and set the position > > Fixes: e30383fce4cb ("drm/amdgpu: fix shift-out-of-bounds in > amdgpu_debugfs_jpeg_sched_mask_set") > Signed-off-by: Sathishkumar S <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > index e7b4b768f7d2..91678621f1ff 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c > @@ -370,7 +370,7 @@ static int amdgpu_debugfs_jpeg_sched_mask_set(void > *data, u64 val) > for (i = 0; i < adev->jpeg.num_jpeg_inst; ++i) { > for (j = 0; j < adev->jpeg.num_jpeg_rings; ++j) { > ring = &adev->jpeg.inst[i].ring_dec[j]; > - if (val & (BIT_ULL(1) << ((i * > adev->jpeg.num_jpeg_rings) + > j))) > + if (val & (BIT_ULL((i * adev->jpeg.num_jpeg_rings) + > j))) > ring->sched.ready = true; > else > ring->sched.ready = false; > -- > 2.48.1
