mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
drm/amdgpu: add new parameter to seperate map and unmap
Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
e722b71a54
commit
194a33643b
1 changed files with 5 additions and 3 deletions
|
@ -449,7 +449,7 @@ out:
|
||||||
* vital here, so they are not reported back to userspace.
|
* vital here, so they are not reported back to userspace.
|
||||||
*/
|
*/
|
||||||
static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
|
static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
|
||||||
struct amdgpu_bo_va *bo_va)
|
struct amdgpu_bo_va *bo_va, uint32_t operation)
|
||||||
{
|
{
|
||||||
struct ttm_validate_buffer tv, *entry;
|
struct ttm_validate_buffer tv, *entry;
|
||||||
struct amdgpu_bo_list_entry *vm_bos;
|
struct amdgpu_bo_list_entry *vm_bos;
|
||||||
|
@ -485,6 +485,8 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
|
||||||
if (r)
|
if (r)
|
||||||
goto error_unlock;
|
goto error_unlock;
|
||||||
|
|
||||||
|
|
||||||
|
if (operation == AMDGPU_VA_OP_MAP)
|
||||||
r = amdgpu_vm_bo_update(adev, bo_va, &bo_va->bo->tbo.mem);
|
r = amdgpu_vm_bo_update(adev, bo_va, &bo_va->bo->tbo.mem);
|
||||||
|
|
||||||
error_unlock:
|
error_unlock:
|
||||||
|
@ -580,7 +582,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE))
|
if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE))
|
||||||
amdgpu_gem_va_update_vm(adev, bo_va);
|
amdgpu_gem_va_update_vm(adev, bo_va, args->operation);
|
||||||
|
|
||||||
drm_gem_object_unreference_unlocked(gobj);
|
drm_gem_object_unreference_unlocked(gobj);
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Add table
Reference in a new issue