提交 4e917713 编写于 作者: C Christian König 提交者: Alex Deucher

drm/amdgpu: fix NULL fence handling in amdgpu_cs_fence_to_handle_ioctl

When the fence is already signaled it is perfectly normal to get a NULL
fence here. But since we can't export that we need to use a stub fence.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NChunming Zhou <david1.zhou@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e27a73d1
...@@ -1428,6 +1428,9 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data, ...@@ -1428,6 +1428,9 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
if (IS_ERR(fence)) if (IS_ERR(fence))
return PTR_ERR(fence); return PTR_ERR(fence);
if (!fence)
fence = dma_fence_get_stub();
switch (info->in.what) { switch (info->in.what) {
case AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ: case AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ:
r = drm_syncobj_create(&syncobj, 0, fence); r = drm_syncobj_create(&syncobj, 0, fence);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册