diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2022-11-02 18:17:23 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-11-04 23:05:53 +0300 |
commit | 33034c5c2efaf56c7b89aed5a3cf1bcb3f12b853 (patch) | |
tree | 0cad4b84734a97cd91d59b4ea8ffe4ac290568fe /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
parent | f8638ad7fcac50d2ba8e76625e7d86cabd5d5bd2 (diff) | |
download | linux-33034c5c2efaf56c7b89aed5a3cf1bcb3f12b853.tar.xz |
drm/amdgpu/gfx9: set gfx.funcs in early init
So the callbacks are set before we use them.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 0320be4a5fc6..c80623c35b52 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -1919,8 +1919,6 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev) u32 gb_addr_config; int err; - adev->gfx.funcs = &gfx_v9_0_gfx_funcs; - switch (adev->ip_versions[GC_HWIP][0]) { case IP_VERSION(9, 0, 1): adev->gfx.config.max_hw_contexts = 8; @@ -4539,6 +4537,8 @@ static int gfx_v9_0_early_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + adev->gfx.funcs = &gfx_v9_0_gfx_funcs; + if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 1) || adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2)) adev->gfx.num_gfx_rings = 0; |