History

drm/amdgpu: add flag to delay VM updates

Christian König committed 11 years ago

Commit fc220f61 parent 2b48d322 files · +6 −3Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 −3
  2. include/uapi/drm/amdgpu_drm.h +3 −0
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c+3−3
@@ -525,8 +525,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 524 unmodified lines
525525 return -EINVAL;
526526 }
527527
528− invalid_flags = ~(AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE |
529− AMDGPU_VM_PAGE_EXECUTABLE);
528+ invalid_flags = ~(AMDGPU_VM_DELAY_UPDATE | AMDGPU_VM_PAGE_READABLE |
529+ AMDGPU_VM_PAGE_WRITEABLE | AMDGPU_VM_PAGE_EXECUTABLE);
530530 if ((args->flags & invalid_flags)) {
531531 dev_err(&dev->pdev->dev, "invalid flags 0x%08X vs 0x%08X\n",
532532 args->flags, invalid_flags);
@@ -579,7 +579,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 46 unmodified lines
579579 break;
580580 }
581581
582− if (!r)
582+ if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE))
583583 amdgpu_gem_va_update_vm(adev, bo_va);
584584
585585 drm_gem_object_unreference_unlocked(gobj);
include/uapi/drm/amdgpu_drm.h+3−0
@@ -313,6 +313,9 @@ struct drm_amdgpu_gem_op { · 312 unmodified lines
313313 #define AMDGPU_VA_OP_MAP 1
314314 #define AMDGPU_VA_OP_UNMAP 2
315315
316+/* Delay the page table update till the next CS */
317+#define AMDGPU_VM_DELAY_UPDATE (1 << 0)
318+
316319 /* Mapping flags */
317320 /* readable mapping */
318321 #define AMDGPU_VM_PAGE_READABLE (1 << 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t