public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Extending GET_APERTURE ioctl
@ 2015-07-08  6:51 ankitprasad.r.sharma
  2015-07-08  6:51 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
  2015-07-08  6:51 ` [PATCH 2/2] drm/i915: Extend GET_APERTURE ioctl to report size of the stolen region ankitprasad.r.sharma
  0 siblings, 2 replies; 16+ messages in thread
From: ankitprasad.r.sharma @ 2015-07-08  6:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma, akash.goel, shashidhar.hiremath

From: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>

When constructing a batchbuffer, it is sometimes crucial to know the
largest hole into which we can fit a fenceable buffer (for example when
handling very large objects on gen2 and gen3). This depends on the
fragmentation of pinned buffers inside the aperture, a question only the
kernel can easily answer.

This set of patches extends the current DRM_I915_GEM_GET_APERTURE ioctl
to include a couple of new fields in its reply to userspace - the total
amount of space available in the mappable region of the aperture and
also the single largest block available.

This is not quite what userspace wants to answer the question of whether
this batch will fit as fences are also required to meet severe alignment
constraints within the batch. For this purpose, a third conservative
estimate of largest fence available is also provided. For when userspace
needs more than one batch, we also provide the culmulative space
available for fences such that it has some additional guidance to how
much space it could allocate to fences. Conservatism still wins.

The patches also support for getting total size and available size of the
stolen region as well as single largest block available in the stolen region.

It also adds a debugfs file for convenient testing and reporting.

v2: Rebased to the latest drm-intel-nightly

v3: Fixed compilation error

Ankitprasad Sharma (1):
  drm/i915: Extend GET_APERTURE ioctl to report size of the stolen
    region

Rodrigo Vivi (1):
  drm/i915: Extend GET_APERTURE ioctl to report available map space

 drivers/gpu/drm/i915/i915_debugfs.c    |  33 +++++++++
 drivers/gpu/drm/i915/i915_drv.h        |   3 +
 drivers/gpu/drm/i915/i915_gem.c        | 123 +++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_stolen.c |  35 ++++++++++
 include/uapi/drm/i915_drm.h            |  40 +++++++++++
 5 files changed, 230 insertions(+), 4 deletions(-)

-- 
1.9.1

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

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH v2 0/2] Extending GET_APERTURE ioctl
@ 2015-07-01  9:25 ankitprasad.r.sharma
  2015-07-01  9:25 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
  0 siblings, 1 reply; 16+ messages in thread
From: ankitprasad.r.sharma @ 2015-07-01  9:25 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma, akash.goel, shashidhar.hiremath

From: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>

When constructing a batchbuffer, it is sometimes crucial to know the
largest hole into which we can fit a fenceable buffer (for example when
handling very large objects on gen2 and gen3). This depends on the
fragmentation of pinned buffers inside the aperture, a question only the
kernel can easily answer.

This set of patches extends the current DRM_I915_GEM_GET_APERTURE ioctl
to include a couple of new fields in its reply to userspace - the total
amount of space available in the mappable region of the aperture and
also the single largest block available.

This is not quite what userspace wants to answer the question of whether
this batch will fit as fences are also required to meet severe alignment
constraints within the batch. For this purpose, a third conservative
estimate of largest fence available is also provided. For when userspace
needs more than one batch, we also provide the culmulative space
available for fences such that it has some additional guidance to how
much space it could allocate to fences. Conservatism still wins.

The patches also support for getting total size and available size of the
stolen region as well as single largest block available in the stolen region.

It also adds a debugfs file for convenient testing and reporting.

v2: Rebased to the latest drm-intel-nightly

Ankitprasad Sharma (1):
  drm/i915: Extend GET_APERTURE ioctl to report size of the stolen
    region

Rodrigo Vivi (1):
  drm/i915: Extend GET_APERTURE ioctl to report available map space

 drivers/gpu/drm/i915/i915_debugfs.c    |  33 +++++++++
 drivers/gpu/drm/i915/i915_drv.h        |   3 +
 drivers/gpu/drm/i915/i915_gem.c        | 123 +++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_stolen.c |  35 ++++++++++
 include/uapi/drm/i915_drm.h            |  40 +++++++++++
 5 files changed, 230 insertions(+), 4 deletions(-)

-- 
1.9.1

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

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH 0/2] Extending GET_APERTURE ioctl
@ 2015-05-13 12:07 ankitprasad.r.sharma
  2015-05-13 12:07 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
  0 siblings, 1 reply; 16+ messages in thread
From: ankitprasad.r.sharma @ 2015-05-13 12:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma, akash.goel, shashidhar.hiremath

From: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>

When constructing a batchbuffer, it is sometimes crucial to know the
largest hole into which we can fit a fenceable buffer (for example when
handling very large objects on gen2 and gen3). This depends on the
fragmentation of pinned buffers inside the aperture, a question only the
kernel can easily answer.

This set of patches extends the current DRM_I915_GEM_GET_APERTURE ioctl
to include a couple of new fields in its reply to userspace - the total
amount of space available in the mappable region of the aperture and
also the single largest block available.

This is not quite what userspace wants to answer the question of whether
this batch will fit as fences are also required to meet severe alignment
constraints within the batch. For this purpose, a third conservative
estimate of largest fence available is also provided. For when userspace
needs more than one batch, we also provide the culmulative space
available for fences such that it has some additional guidance to how
much space it could allocate to fences. Conservatism still wins.

The patches also support for getting total size and available size of the
stolen region as well as single largest block available in the stolen region.

It also adds a debugfs file for convenient testing and reporting.

Ankitprasad Sharma (1):
  drm/i915: Extend GET_APERTURE ioctl to get size of the stolen region

Rodrigo Vivi (1):
  drm/i915: Extend GET_APERTURE ioctl to report available map space

 drivers/gpu/drm/i915/i915_debugfs.c    |  33 +++++++++
 drivers/gpu/drm/i915/i915_drv.h        |   3 +
 drivers/gpu/drm/i915/i915_gem.c        | 123 +++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_stolen.c |  35 ++++++++++
 include/uapi/drm/i915_drm.h            |  40 +++++++++++
 5 files changed, 230 insertions(+), 4 deletions(-)

-- 
1.9.1

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

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

end of thread, other threads:[~2015-07-08 14:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  6:51 [PATCH v3 0/2] Extending GET_APERTURE ioctl ankitprasad.r.sharma
2015-07-08  6:51 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
2015-07-08 13:13   ` Tvrtko Ursulin
2015-07-08 13:28     ` Chris Wilson
2015-07-08 13:36       ` Tvrtko Ursulin
2015-07-08 13:53         ` Chris Wilson
2015-07-08 14:24           ` Tvrtko Ursulin
2015-07-08 14:32             ` Chris Wilson
2015-07-08 13:38       ` Chris Wilson
2015-07-08 13:29   ` Tvrtko Ursulin
2015-07-08  6:51 ` [PATCH 2/2] drm/i915: Extend GET_APERTURE ioctl to report size of the stolen region ankitprasad.r.sharma
2015-07-08 13:33   ` Tvrtko Ursulin
  -- strict thread matches above, loose matches on Subject: below --
2015-07-01  9:25 [PATCH v2 0/2] Extending GET_APERTURE ioctl ankitprasad.r.sharma
2015-07-01  9:25 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
2015-07-01 13:39   ` Daniel Vetter
2015-07-01 16:34     ` Ankitprasad Sharma
2015-05-13 12:07 [PATCH 0/2] Extending GET_APERTURE ioctl ankitprasad.r.sharma
2015-05-13 12:07 ` [PATCH 1/2] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox