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: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Esse commit está contido em:
@@ -1428,6 +1428,9 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
|
||||
if (IS_ERR(fence))
|
||||
return PTR_ERR(fence);
|
||||
|
||||
if (!fence)
|
||||
fence = dma_fence_get_stub();
|
||||
|
||||
switch (info->in.what) {
|
||||
case AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ:
|
||||
r = drm_syncobj_create(&syncobj, 0, fence);
|
||||
|
Referência em uma nova issue
Block a user