diff options
| author | Dave Airlie <[email protected]> | 2024-06-27 07:18:49 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2024-06-27 07:18:49 +0000 |
| commit | 365aa9f573995b46ca14a24165d85e31160e47b9 (patch) | |
| tree | 392d9656fc902e8198ee89efe278c78376478f8a /drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | |
| parent | agp: add missing MODULE_DESCRIPTION() macros (diff) | |
| parent | drm/amdgpu: init TA fw for psp v14 (diff) | |
| download | kernel-365aa9f573995b46ca14a24165d85e31160e47b9.tar.gz kernel-365aa9f573995b46ca14a24165d85e31160e47b9.zip | |
Merge tag 'amd-drm-next-6.11-2024-06-22' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.11-2024-06-22:
amdgpu:
- HPD fixes
- PSR fixes
- DCC updates
- DCN 4.0.1 fixes
- FAMS fixes
- Misc code cleanups
- SR-IOV fixes
- GPUVM TLB flush cleanups
- Make VCN less verbose
- ACPI backlight fixes
- MES fixes
- Firmware loading cleanups
- Replay fixes
- LTTPR fixes
- Trap handler fixes
- Cursor and overlay fixes
- Primary plane zpos fixes
- DML 2.1 fixes
- RAS updates
- USB4 fixes
- MALL fixes
- Reserved VMID fix
- Silence UBSAN warnings
amdkfd:
- Misc code cleanups
From: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/imu_v12_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c index 0c8ef908d112..1341f0292031 100644 --- a/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c @@ -39,7 +39,6 @@ MODULE_FIRMWARE("amdgpu/gc_12_0_1_imu.bin"); static int imu_v12_0_init_microcode(struct amdgpu_device *adev) { - char fw_name[40]; char ucode_prefix[15]; int err; const struct imu_firmware_header_v1_0 *imu_hdr; @@ -48,11 +47,10 @@ static int imu_v12_0_init_microcode(struct amdgpu_device *adev) DRM_DEBUG("\n"); amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix)); - - snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_imu.bin", ucode_prefix); - err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, fw_name); + err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, "amdgpu/%s_imu.bin", ucode_prefix); if (err) goto out; + imu_hdr = (const struct imu_firmware_header_v1_0 *)adev->gfx.imu_fw->data; adev->gfx.imu_fw_version = le32_to_cpu(imu_hdr->header.ucode_version); @@ -72,8 +70,8 @@ static int imu_v12_0_init_microcode(struct amdgpu_device *adev) out: if (err) { dev_err(adev->dev, - "gfx12: Failed to load firmware \"%s\"\n", - fw_name); + "gfx12: Failed to load firmware \"%s_imu.bin\"\n", + ucode_prefix); amdgpu_ucode_release(&adev->gfx.imu_fw); } @@ -119,7 +117,8 @@ static int imu_v12_0_load_microcode(struct amdgpu_device *adev) static int imu_v12_0_wait_for_reset_status(struct amdgpu_device *adev) { - int i, imu_reg_val = 0; + u32 imu_reg_val = 0; + int i; for (i = 0; i < adev->usec_timeout; i++) { imu_reg_val = RREG32_SOC15(GC, 0, regGFX_IMU_GFX_RESET_CTRL); @@ -138,7 +137,7 @@ static int imu_v12_0_wait_for_reset_status(struct amdgpu_device *adev) static void imu_v12_0_setup(struct amdgpu_device *adev) { - int imu_reg_val; + u32 imu_reg_val; WREG32_SOC15(GC, 0, regGFX_IMU_C2PMSG_ACCESS_CTRL0, 0xffffff); WREG32_SOC15(GC, 0, regGFX_IMU_C2PMSG_ACCESS_CTRL1, 0xffff); @@ -157,7 +156,7 @@ static void imu_v12_0_setup(struct amdgpu_device *adev) static int imu_v12_0_start(struct amdgpu_device *adev) { - int imu_reg_val; + u32 imu_reg_val; imu_reg_val = RREG32_SOC15(GC, 0, regGFX_IMU_CORE_CTRL); imu_reg_val &= 0xfffffffe; |
