diff options
| author | Dave Airlie <[email protected]> | 2020-03-27 12:33:13 +1000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2020-03-27 12:33:23 +1000 |
| commit | 5117c363eb213d5503f5b7e39c9bfafd46388184 (patch) | |
| tree | 7f867b9405619ebd81486b1d85ca15822863401a /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
| parent | 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff) | |
| parent | 47f7826c520ecd92ffbffe59ecaa2fe61e42ec70 (diff) | |
Merge tag 'drm-misc-fixes-2020-03-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes for v5.6:
- SG fixes for prime, radeon and amdgpu.
Signed-off-by: Dave Airlie <[email protected]>
From: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index dee446278417..c6e9885c071f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -974,7 +974,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm) /* Map SG to device */ r = -ENOMEM; nents = dma_map_sg(adev->dev, ttm->sg->sgl, ttm->sg->nents, direction); - if (nents != ttm->sg->nents) + if (nents == 0) goto release_sg; /* convert SG to linear array of pages and dma addresses */ |