drm/jpeg: add init value for num_jpeg_rings
authorJames Zhu <James.Zhu@amd.com>
Wed, 24 May 2023 14:48:40 +0000 (10:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 15:07:00 +0000 (11:07 -0400)
Need init new num_jpeg_rings to 1 on jpeg.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Richard Liang <rliang1@amd.com>
Tested-by: Ying Li <ying.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c

index 1c5b60604a193ab98fc8481aa9b7ddf1e6ecf83c..77595e9622da34204d3be939c2c1c74cfdf9bdf3 100644 (file)
@@ -460,6 +460,7 @@ int jpeg_v1_0_early_init(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
        adev->jpeg.num_jpeg_inst = 1;
+       adev->jpeg.num_jpeg_rings = 1;
 
        jpeg_v1_0_set_dec_ring_funcs(adev);
        jpeg_v1_0_set_irq_funcs(adev);
index 3aeeceae34a5efd82be317b08caa49b1907646d4..c25d4a07350b76ad34d542177415503f4e7920a2 100644 (file)
@@ -49,6 +49,7 @@ static int jpeg_v2_0_early_init(void *handle)
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
        adev->jpeg.num_jpeg_inst = 1;
+       adev->jpeg.num_jpeg_rings = 1;
 
        jpeg_v2_0_set_dec_ring_funcs(adev);
        jpeg_v2_0_set_irq_funcs(adev);
index f533ede484d4e3b8f5024236191024a254431e1f..aadb74de52bcf8e99d875727b9aa1dc4b6ecb511 100644 (file)
@@ -60,6 +60,7 @@ static int jpeg_v2_5_early_init(void *handle)
        u32 harvest;
        int i;
 
+       adev->jpeg.num_jpeg_rings = 1;
        adev->jpeg.num_jpeg_inst = JPEG25_MAX_HW_INSTANCES_ARCTURUS;
        for (i = 0; i < adev->jpeg.num_jpeg_inst; i++) {
                harvest = RREG32_SOC15(JPEG, i, mmCC_UVD_HARVESTING);
index cb5494effc0fd420d319d8ff55e550ec0b342acd..79791379fc2b09b9b77221f8710fa92484de8428 100644 (file)
@@ -64,6 +64,7 @@ static int jpeg_v3_0_early_init(void *handle)
        }
 
        adev->jpeg.num_jpeg_inst = 1;
+       adev->jpeg.num_jpeg_rings = 1;
 
        jpeg_v3_0_set_dec_ring_funcs(adev);
        jpeg_v3_0_set_irq_funcs(adev);
index 86383fbf9358a041d153fe77a3754ee17bd1017f..a707d407fbd0d28edc26b2e5b2d8ba0cf332ee62 100644 (file)
@@ -58,6 +58,7 @@ static int jpeg_v4_0_early_init(void *handle)
 
 
        adev->jpeg.num_jpeg_inst = 1;
+       adev->jpeg.num_jpeg_rings = 1;
 
        jpeg_v4_0_set_dec_ring_funcs(adev);
        jpeg_v4_0_set_irq_funcs(adev);