drm/amdgpu: enable vcn3.0 for van gogh
authorThong Thai <thong.thai@amd.com>
Thu, 27 Aug 2020 15:35:13 +0000 (11:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Oct 2020 19:15:27 +0000 (15:15 -0400)
Same as other VCN 3.0 asics.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/nv.c

index 495c3d7..8110259 100644 (file)
@@ -44,6 +44,7 @@
 #define FIRMWARE_NAVI12        "amdgpu/navi12_vcn.bin"
 #define FIRMWARE_SIENNA_CICHLID        "amdgpu/sienna_cichlid_vcn.bin"
 #define FIRMWARE_NAVY_FLOUNDER         "amdgpu/navy_flounder_vcn.bin"
+#define FIRMWARE_VANGOGH       "amdgpu/vangogh_vcn.bin"
 
 MODULE_FIRMWARE(FIRMWARE_RAVEN);
 MODULE_FIRMWARE(FIRMWARE_PICASSO);
@@ -55,6 +56,7 @@ MODULE_FIRMWARE(FIRMWARE_NAVI14);
 MODULE_FIRMWARE(FIRMWARE_NAVI12);
 MODULE_FIRMWARE(FIRMWARE_SIENNA_CICHLID);
 MODULE_FIRMWARE(FIRMWARE_NAVY_FLOUNDER);
+MODULE_FIRMWARE(FIRMWARE_VANGOGH);
 
 static void amdgpu_vcn_idle_work_handler(struct work_struct *work);
 
@@ -123,6 +125,12 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
                    (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
                        adev->vcn.indirect_sram = true;
                break;
+       case CHIP_VANGOGH:
+               fw_name = FIRMWARE_VANGOGH;
+               if ((adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) &&
+                   (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
+                       adev->vcn.indirect_sram = true;
+               break;
        default:
                return -EINVAL;
        }
index da6eed1..1666d43 100644 (file)
@@ -577,6 +577,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
                        amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
                amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
                amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);
+               amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
+               amdgpu_device_ip_block_add(adev, &jpeg_v3_0_ip_block);
                break;
        default:
                return -EINVAL;