diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2023-03-11 17:28:02 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-03-13 17:27:48 -0400 |
commit | 5640e06e60198d9abdf6c618c54d982d8ec9cc0a (patch) | |
tree | c1e7b65598f7ca49bf5b8d32a8fa86c26c061ad3 /drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | |
parent | c69d51395a3bd3905a3837691ed48c7c89ea3d95 (diff) |
drm/amdgpu: Move jpeg ras block init to ras sw_init
Initialize jpeg ras block only when jpeg ip block
supports ras features. Driver queries ras capabilities
after early_init, ras block init needs to be moved to
sw_int.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Stanley Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c index 3beb731b2ce5..3129094baccc 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c @@ -113,6 +113,10 @@ static int jpeg_v4_0_sw_init(void *handle) adev->jpeg.internal.jpeg_pitch = regUVD_JPEG_PITCH_INTERNAL_OFFSET; adev->jpeg.inst->external.jpeg_pitch = SOC15_REG_OFFSET(JPEG, 0, regUVD_JPEG_PITCH); + r = amdgpu_jpeg_ras_sw_init(adev); + if (r) + return r; + return 0; } @@ -685,6 +689,4 @@ static void jpeg_v4_0_set_ras_funcs(struct amdgpu_device *adev) default: break; } - - jpeg_set_ras_funcs(adev); } |