summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Zhang <yifan1.zhang@amd.com>2019-10-18 16:32:17 +0800
committerYifan Zhang <yifan1.zhang@amd.com>2019-10-19 12:35:29 +0800
commitcc9465a0674c2cad3d0a8cd241d8b6cf5ebc1fe7 (patch)
treee023b9232c879ff81afe935a89433944e3ce5912
parente576643835ac289d9c3ca30ede56e5062bb98e21 (diff)
drm/amd/autoconf: narrow HAVE_DMA_FENCE_GET_STUB scope
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 15420a17ff14..4bcff40345dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1507,7 +1507,7 @@ static struct dma_fence *amdgpu_cs_get_fence(struct amdgpu_device *adev,
return fence;
}
-#if defined(HAVE_DRM_AMDGPU_FENCE_TO_HANDLE) && defined(HAVE_DMA_FENCE_GET_STUB)
+#if defined(HAVE_DRM_AMDGPU_FENCE_TO_HANDLE)
int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp)
{
@@ -1522,8 +1522,10 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
if (IS_ERR(fence))
return PTR_ERR(fence);
+#if defined(HAVE_DMA_FENCE_GET_STUB)
if (!fence)
fence = dma_fence_get_stub();
+#endif
switch (info->in.what) {
case AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ: