diff mbox series

[i-g-t] tests/i915/query: use 48B_ADDRESS in upload

Message ID 20221031121730.32056-1-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show
Series [i-g-t] tests/i915/query: use 48B_ADDRESS in upload | expand

Commit Message

Matthew Auld Oct. 31, 2022, 12:17 p.m. UTC
Our working set could be larger than 4G here.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6671
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
---
 tests/i915/i915_query.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Nirmoy Das Oct. 31, 2022, 12:41 p.m. UTC | #1
Reviewed-by: |Nirmoy Das <nirmoy.das@intel.com>|

On 10/31/2022 1:17 PM, Matthew Auld wrote:
> Our working set could be larger than 4G here.
>
> Closes:https://gitlab.freedesktop.org/drm/intel/-/issues/6671
> Signed-off-by: Matthew Auld<matthew.auld@intel.com>
> Cc: Nirmoy Das<nirmoy.das@intel.com>
> ---
>   tests/i915/i915_query.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/i915_query.c b/tests/i915/i915_query.c
> index 4e43c7cd..e725e04e 100644
> --- a/tests/i915/i915_query.c
> +++ b/tests/i915/i915_query.c
> @@ -625,10 +625,14 @@ static void upload(int fd, struct igt_list_head *handles, uint32_t num_handles)
>   		      sizeof(struct drm_i915_gem_exec_object2));
>   
>   	i = 0;
> -	igt_list_for_each_entry(iter, handles, link)
> -		exec[i++].handle = iter->handle;
> +	igt_list_for_each_entry(iter, handles, link) {
> +		exec[i].handle = iter->handle;
> +		exec[i].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
> +		i++;
> +	}
>   
>   	exec[i].handle = batch_create_size(fd, 4096);
> +	exec[i].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
>   
>   	execbuf.buffers_ptr = to_user_pointer(exec);
>   	execbuf.buffer_count = num_handles + 1;
diff mbox series

Patch

diff --git a/tests/i915/i915_query.c b/tests/i915/i915_query.c
index 4e43c7cd..e725e04e 100644
--- a/tests/i915/i915_query.c
+++ b/tests/i915/i915_query.c
@@ -625,10 +625,14 @@  static void upload(int fd, struct igt_list_head *handles, uint32_t num_handles)
 		      sizeof(struct drm_i915_gem_exec_object2));
 
 	i = 0;
-	igt_list_for_each_entry(iter, handles, link)
-		exec[i++].handle = iter->handle;
+	igt_list_for_each_entry(iter, handles, link) {
+		exec[i].handle = iter->handle;
+		exec[i].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+		i++;
+	}
 
 	exec[i].handle = batch_create_size(fd, 4096);
+	exec[i].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
 
 	execbuf.buffers_ptr = to_user_pointer(exec);
 	execbuf.buffer_count = num_handles + 1;