Skip to content

Commit 33034c5

Browse files
committed
drm/amdgpu/gfx9: set gfx.funcs in early init
So the callbacks are set before we use them. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent f8638ad commit 33034c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,8 +1919,6 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev)
19191919
u32 gb_addr_config;
19201920
int err;
19211921

1922-
adev->gfx.funcs = &gfx_v9_0_gfx_funcs;
1923-
19241922
switch (adev->ip_versions[GC_HWIP][0]) {
19251923
case IP_VERSION(9, 0, 1):
19261924
adev->gfx.config.max_hw_contexts = 8;
@@ -4539,6 +4537,8 @@ static int gfx_v9_0_early_init(void *handle)
45394537
{
45404538
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
45414539

4540+
adev->gfx.funcs = &gfx_v9_0_gfx_funcs;
4541+
45424542
if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 1) ||
45434543
adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2))
45444544
adev->gfx.num_gfx_rings = 0;

0 commit comments

Comments
 (0)