File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -376,3 +376,33 @@ static void amdgpu_gfx_rlc_init_microcode_v2_1(struct amdgpu_device *adev)
376
376
}
377
377
}
378
378
}
379
+
380
+ static void amdgpu_gfx_rlc_init_microcode_v2_2 (struct amdgpu_device * adev )
381
+ {
382
+ const struct rlc_firmware_header_v2_2 * rlc_hdr ;
383
+ struct amdgpu_firmware_info * info ;
384
+
385
+ rlc_hdr = (const struct rlc_firmware_header_v2_2 * )adev -> gfx .rlc_fw -> data ;
386
+ adev -> gfx .rlc .rlc_iram_ucode_size_bytes = le32_to_cpu (rlc_hdr -> rlc_iram_ucode_size_bytes );
387
+ adev -> gfx .rlc .rlc_iram_ucode = (u8 * )rlc_hdr + le32_to_cpu (rlc_hdr -> rlc_iram_ucode_offset_bytes );
388
+ adev -> gfx .rlc .rlc_dram_ucode_size_bytes = le32_to_cpu (rlc_hdr -> rlc_dram_ucode_size_bytes );
389
+ adev -> gfx .rlc .rlc_dram_ucode = (u8 * )rlc_hdr + le32_to_cpu (rlc_hdr -> rlc_dram_ucode_offset_bytes );
390
+
391
+ if (adev -> firmware .load_type == AMDGPU_FW_LOAD_PSP ) {
392
+ if (adev -> gfx .rlc .rlc_iram_ucode_size_bytes ) {
393
+ info = & adev -> firmware .ucode [AMDGPU_UCODE_ID_RLC_IRAM ];
394
+ info -> ucode_id = AMDGPU_UCODE_ID_RLC_IRAM ;
395
+ info -> fw = adev -> gfx .rlc_fw ;
396
+ adev -> firmware .fw_size +=
397
+ ALIGN (adev -> gfx .rlc .rlc_iram_ucode_size_bytes , PAGE_SIZE );
398
+ }
399
+
400
+ if (adev -> gfx .rlc .rlc_dram_ucode_size_bytes ) {
401
+ info = & adev -> firmware .ucode [AMDGPU_UCODE_ID_RLC_DRAM ];
402
+ info -> ucode_id = AMDGPU_UCODE_ID_RLC_DRAM ;
403
+ info -> fw = adev -> gfx .rlc_fw ;
404
+ adev -> firmware .fw_size +=
405
+ ALIGN (adev -> gfx .rlc .rlc_dram_ucode_size_bytes , PAGE_SIZE );
406
+ }
407
+ }
408
+ }
You can’t perform that action at this time.
0 commit comments