Skip to content

Commit e053d71

Browse files
committed
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 105195a commit e053d71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ static const struct amdgpu_gfx_funcs gfx_v11_0_gfx_funcs = {
843843

844844
static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
845845
{
846-
adev->gfx.funcs = &gfx_v11_0_gfx_funcs;
847846

848847
switch (adev->ip_versions[GC_HWIP][0]) {
849848
case IP_VERSION(11, 0, 0):
@@ -4657,6 +4656,8 @@ static int gfx_v11_0_early_init(void *handle)
46574656
{
46584657
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
46594658

4659+
adev->gfx.funcs = &gfx_v11_0_gfx_funcs;
4660+
46604661
adev->gfx.num_gfx_rings = GFX11_NUM_GFX_RINGS;
46614662
adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
46624663
AMDGPU_MAX_COMPUTE_RINGS);

0 commit comments

Comments
 (0)