[PATCH 1/1] drm/amdgpu: fix ctx init failure for asics without gfx ring

Nirmoy nirmodas at amd.com
Thu Dec 19 12:01:25 UTC 2019


Reviewed-by: Nirmoy Das <nirmoy.das at amd.com>

On 12/19/19 12:42 PM, Le Ma wrote:
> This workaround does not affect other asics because amdgpu only need expose
> one gfx sched to user for now.
>
> Change-Id: Ica92b8565a89899aebe0eba7b2b5a25159b411d3
> Signed-off-by: Le Ma <le.ma at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index 63f6365..64e2bab 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:


More information about the amd-gfx mailing list