All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] lib: Fixup __gem_create() to be 64b safe.
@ 2017-10-03 13:54 Chris Wilson
  2017-10-03 14:05 ` Mika Kuoppala
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2017-10-03 13:54 UTC (permalink / raw)
  To: intel-gfx

We want to create very large objects, larger than the 2G limit imposed
by using ints.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/ioctl_wrappers.c | 2 +-
 lib/ioctl_wrappers.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 1b483706..87511fc6 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -551,7 +551,7 @@ uint32_t gem_create_stolen(int fd, uint64_t size)
 	return create.handle;
 }
 
-int __gem_create(int fd, int size, uint32_t *handle)
+int __gem_create(int fd, uint64_t size, uint32_t *handle)
 {
 	struct drm_i915_gem_create create = {
 		.size = size,
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 6ed65fad..1663b7f8 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -73,7 +73,7 @@ void gem_sync(int fd, uint32_t handle);
 bool gem_create__has_stolen_support(int fd);
 uint32_t __gem_create_stolen(int fd, uint64_t size);
 uint32_t gem_create_stolen(int fd, uint64_t size);
-int __gem_create(int fd, int size, uint32_t *handle);
+int __gem_create(int fd, uint64_t size, uint32_t *handle);
 uint32_t gem_create(int fd, uint64_t size);
 void gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
 int __gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH igt] lib: Fixup __gem_create() to be 64b safe.
  2017-10-03 13:54 [PATCH igt] lib: Fixup __gem_create() to be 64b safe Chris Wilson
@ 2017-10-03 14:05 ` Mika Kuoppala
  0 siblings, 0 replies; 3+ messages in thread
From: Mika Kuoppala @ 2017-10-03 14:05 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> We want to create very large objects, larger than the 2G limit imposed
> by using ints.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

Reviwed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  lib/ioctl_wrappers.c | 2 +-
>  lib/ioctl_wrappers.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 1b483706..87511fc6 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -551,7 +551,7 @@ uint32_t gem_create_stolen(int fd, uint64_t size)
>  	return create.handle;
>  }
>  
> -int __gem_create(int fd, int size, uint32_t *handle)
> +int __gem_create(int fd, uint64_t size, uint32_t *handle)
>  {
>  	struct drm_i915_gem_create create = {
>  		.size = size,
> diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> index 6ed65fad..1663b7f8 100644
> --- a/lib/ioctl_wrappers.h
> +++ b/lib/ioctl_wrappers.h
> @@ -73,7 +73,7 @@ void gem_sync(int fd, uint32_t handle);
>  bool gem_create__has_stolen_support(int fd);
>  uint32_t __gem_create_stolen(int fd, uint64_t size);
>  uint32_t gem_create_stolen(int fd, uint64_t size);
> -int __gem_create(int fd, int size, uint32_t *handle);
> +int __gem_create(int fd, uint64_t size, uint32_t *handle);
>  uint32_t gem_create(int fd, uint64_t size);
>  void gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
>  int __gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
> -- 
> 2.14.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH igt] lib: Fixup __gem_create() to be 64b safe.
@ 2017-10-03 13:56 Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2017-10-03 13:56 UTC (permalink / raw)
  To: intel-gfx

We want to create very large objects, larger than the 2G limit imposed
by using ints.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/ioctl_wrappers.c | 2 +-
 lib/ioctl_wrappers.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 1b483706..87511fc6 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -551,7 +551,7 @@ uint32_t gem_create_stolen(int fd, uint64_t size)
 	return create.handle;
 }
 
-int __gem_create(int fd, int size, uint32_t *handle)
+int __gem_create(int fd, uint64_t size, uint32_t *handle)
 {
 	struct drm_i915_gem_create create = {
 		.size = size,
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 6ed65fad..1663b7f8 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -73,7 +73,7 @@ void gem_sync(int fd, uint32_t handle);
 bool gem_create__has_stolen_support(int fd);
 uint32_t __gem_create_stolen(int fd, uint64_t size);
 uint32_t gem_create_stolen(int fd, uint64_t size);
-int __gem_create(int fd, int size, uint32_t *handle);
+int __gem_create(int fd, uint64_t size, uint32_t *handle);
 uint32_t gem_create(int fd, uint64_t size);
 void gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
 int __gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-03 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 13:54 [PATCH igt] lib: Fixup __gem_create() to be 64b safe Chris Wilson
2017-10-03 14:05 ` Mika Kuoppala
2017-10-03 13:56 Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.