drm/amdgpu/gfx10: set gfx.funcs in early init
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Nov 2022 15:20:49 +0000 (11:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Nov 2022 20:05:53 +0000 (16:05 -0400)
So the callbacks are set early in case we need them.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

index ff3c127..7853d3c 100644 (file)
@@ -4453,8 +4453,6 @@ static void gfx_v10_0_gpu_early_init(struct amdgpu_device *adev)
 {
        u32 gb_addr_config;
 
-       adev->gfx.funcs = &gfx_v10_0_gfx_funcs;
-
        switch (adev->ip_versions[GC_HWIP][0]) {
        case IP_VERSION(10, 1, 10):
        case IP_VERSION(10, 1, 1):
@@ -7593,6 +7591,8 @@ static int gfx_v10_0_early_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       adev->gfx.funcs = &gfx_v10_0_gfx_funcs;
+
        switch (adev->ip_versions[GC_HWIP][0]) {
        case IP_VERSION(10, 1, 10):
        case IP_VERSION(10, 1, 1):