diff mbox series

[libdrm,1/3] amdgpu: Propogate user flags to amdgpu_bo_va_op_raw

Message ID 1538075109-3759-1-git-send-email-andrey.grodzovsky@amd.com (mailing list archive)
State New, archived
Headers show
Series [libdrm,1/3] amdgpu: Propogate user flags to amdgpu_bo_va_op_raw | expand

Commit Message

Andrey Grodzovsky Sept. 27, 2018, 7:05 p.m. UTC
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
 amdgpu/amdgpu_bo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Marek Olšák Sept. 28, 2018, 3:28 a.m. UTC | #1
This will break old UMDs that didn't set the flags correctly. Instead,
UMDs should stop using amdgpu_bo_va_op if they want to set the flags.

Marek
On Thu, Sep 27, 2018 at 3:05 PM Andrey Grodzovsky
<andrey.grodzovsky@amd.com> wrote:
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
> ---
>  amdgpu/amdgpu_bo.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
> index c0f42e8..1892345 100644
> --- a/amdgpu/amdgpu_bo.c
> +++ b/amdgpu/amdgpu_bo.c
> @@ -736,7 +736,7 @@ drm_public int amdgpu_bo_va_op(amdgpu_bo_handle bo,
>                                uint64_t offset,
>                                uint64_t size,
>                                uint64_t addr,
> -                              uint64_t flags,
> +                              uint64_t extra_flags,
>                                uint32_t ops)
>  {
>         amdgpu_device_handle dev = bo->dev;
> @@ -746,7 +746,8 @@ drm_public int amdgpu_bo_va_op(amdgpu_bo_handle bo,
>         return amdgpu_bo_va_op_raw(dev, bo, offset, size, addr,
>                                    AMDGPU_VM_PAGE_READABLE |
>                                    AMDGPU_VM_PAGE_WRITEABLE |
> -                                  AMDGPU_VM_PAGE_EXECUTABLE, ops);
> +                                  AMDGPU_VM_PAGE_EXECUTABLE |
> +                                  extra_flags, ops);
>  }
>
>  drm_public int amdgpu_bo_va_op_raw(amdgpu_device_handle dev,
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
diff mbox series

Patch

diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index c0f42e8..1892345 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -736,7 +736,7 @@  drm_public int amdgpu_bo_va_op(amdgpu_bo_handle bo,
 			       uint64_t offset,
 			       uint64_t size,
 			       uint64_t addr,
-			       uint64_t flags,
+			       uint64_t extra_flags,
 			       uint32_t ops)
 {
 	amdgpu_device_handle dev = bo->dev;
@@ -746,7 +746,8 @@  drm_public int amdgpu_bo_va_op(amdgpu_bo_handle bo,
 	return amdgpu_bo_va_op_raw(dev, bo, offset, size, addr,
 				   AMDGPU_VM_PAGE_READABLE |
 				   AMDGPU_VM_PAGE_WRITEABLE |
-				   AMDGPU_VM_PAGE_EXECUTABLE, ops);
+				   AMDGPU_VM_PAGE_EXECUTABLE |
+				   extra_flags, ops);
 }
 
 drm_public int amdgpu_bo_va_op_raw(amdgpu_device_handle dev,