]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu/jpeg3.0: remove extra asic type check
authorJames Zhu <James.Zhu@amd.com>
Thu, 23 Jul 2020 15:07:52 +0000 (11:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2020 20:30:03 +0000 (16:30 -0400)
jpeg ip block is already selected based on ASIC type during set_ip_blocks.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c

index 42f1a516005ec865532e6c452d89e9d528c8a96c..c41e5590a7019b0cc561c3c0aba3432c2f5be086 100644 (file)
@@ -49,12 +49,11 @@ static int jpeg_v3_0_set_powergating_state(void *handle,
 static int jpeg_v3_0_early_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-       if (adev->asic_type == CHIP_SIENNA_CICHLID) {
-               u32 harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
+       u32 harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING);
+
+       if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
+               return -ENOENT;
 
-               if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
-                       return -ENOENT;
-       }
        adev->jpeg.num_jpeg_inst = 1;
 
        jpeg_v3_0_set_dec_ring_funcs(adev);