From: Alex Deucher Date: Wed, 2 Nov 2022 15:21:35 +0000 (-0400) Subject: drm/amdgpu/gfx11: set gfx.funcs in early init X-Git-Tag: v6.6.7~3824^2~24^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e053d71f8c04fd7ef53241d2ab39f02acee6aaa0;p=platform%2Fkernel%2Flinux-starfive.git drm/amdgpu/gfx11: set gfx.funcs in early init So the callbacks are set early in case we need them. Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 84a76c3..d799359 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -843,7 +843,6 @@ static const struct amdgpu_gfx_funcs gfx_v11_0_gfx_funcs = { static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev) { - adev->gfx.funcs = &gfx_v11_0_gfx_funcs; switch (adev->ip_versions[GC_HWIP][0]) { case IP_VERSION(11, 0, 0): @@ -4657,6 +4656,8 @@ static int gfx_v11_0_early_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + adev->gfx.funcs = &gfx_v11_0_gfx_funcs; + adev->gfx.num_gfx_rings = GFX11_NUM_GFX_RINGS; adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev), AMDGPU_MAX_COMPUTE_RINGS);