From: Le Ma Date: Thu, 19 Dec 2019 11:26:02 +0000 (+0800) Subject: drm/amdgpu: fix ctx init failure for asics without gfx ring X-Git-Tag: v5.6-rc1~114^2~12^2~93 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0a96afc7c56cbac075426a6a5f82a88cadb648f7;p=linux.git drm/amdgpu: fix ctx init failure for asics without gfx ring This workaround does not affect other asics because amdgpu only need expose one gfx sched to user for now. Signed-off-by: Le Ma Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 63f6365312d5..64e2babbc36e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -127,7 +127,8 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, switch (i) { case AMDGPU_HW_IP_GFX: - scheds = adev->gfx.gfx_sched; + sched = &adev->gfx.gfx_ring[0].sched; + scheds = &sched; num_scheds = 1; break; case AMDGPU_HW_IP_COMPUTE: