diff options
| author | Daniel Vetter <[email protected]> | 2017-07-10 19:56:39 +0000 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2017-07-10 19:56:39 +0000 |
| commit | 953152253e9cbd4f358d4b4ca56d48072af3846d (patch) | |
| tree | 6c60e924732351682959f911833e3434d78aa849 /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | |
| parent | drm/i915/cnl: Add max allowed Cannonlake DC. (diff) | |
| parent | drm: Remove unused drm_file parameter to drm_syncobj_replace_fence() (diff) | |
| download | kernel-953152253e9cbd4f358d4b4ca56d48072af3846d.tar.gz kernel-953152253e9cbd4f358d4b4ca56d48072af3846d.zip | |
Merge tag 'drm-for-v4.13' into drm-intel-next-queued
Resync with the main drm-next pull request for 4.13. What we really
need is to fully resync with pending drm-misc, but that's not yet
possible due to the still ongoing merge window.
Signed-off-by: Daniel Vetter <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index 902e6015abca..a57abc1a25fb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c @@ -224,8 +224,9 @@ void amdgpu_gart_table_vram_free(struct amdgpu_device *adev) * * Unbinds the requested pages from the gart page table and * replaces them with the dummy page (all asics). + * Returns 0 for success, -EINVAL for failure. */ -void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, +int amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, int pages) { unsigned t; @@ -237,7 +238,7 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, if (!adev->gart.ready) { WARN(1, "trying to unbind memory from uninitialized GART !\n"); - return; + return -EINVAL; } t = offset / AMDGPU_GPU_PAGE_SIZE; @@ -258,6 +259,7 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, } mb(); amdgpu_gart_flush_gpu_tlb(adev, 0); + return 0; } /** |
