All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v19 00/12] Support for creating/using Stolen memory backed objects
@ 2016-04-20 11:17 ankitprasad.r.sharma
  2016-04-20 11:17 ` [PATCH 01/12] drm/i915: Add support for mapping an object page by page ankitprasad.r.sharma
                   ` (13 more replies)
  0 siblings, 14 replies; 41+ messages in thread
From: ankitprasad.r.sharma @ 2016-04-20 11:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma, akash.goel

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

This patch series adds support for creating/using Stolen memory backed
objects.

Despite being a unified memory architecture (UMA) some bits of memory
are more equal than others. In particular we have the thorny issue of
stolen memory, memory stolen from the system by the BIOS and reserved
for igfx use. Stolen memory is required for some functions of the GPU
and display engine, but in general it goes wasted. Whilst we cannot
return it back to the system, we need to find some other method for
utilising it. As we do not support direct access to the physical address
in the stolen region, it behaves like a different class of memory,
closer in kin to local GPU memory. This strongly suggests that we need a
placement model like TTM if we are to fully utilize these discrete
chunks of differing memory.

To add support for creating Stolen memory backed objects, we extend the
drm_i915_gem_create structure, by adding a new flag through which user
can specify the preference to allocate the object from stolen memory,
which if set, an attempt will be made to allocate the object from stolen
memory subject to the availability of free space in the stolen region.

This patch series adds support for clearing buffer objects via CPU/GTT.
This is particularly useful for clearing out the memory from stolen
region, but can also be used for other shmem allocated objects. Currently
being used for buffers allocated in the stolen region. Also adding support
for stealing purgable stolen pages, if we run out of stolen memory when
trying to allocate an object.

v2: Added support for read/write from/to objects not backed by
shmem using the pread/pwrite interface.
Also extended the current get_aperture ioctl to retrieve the
total and available size of the stolen region.

v3: Removed the extended get_aperture ioctl patch 5 (to be submitted as
part of other patch series), addressed comments by Chris about pread/pwrite
for non shmem backed objects.

v4: Rebased to the latest drm-intel-nightly.

v5: Addressed comments, replaced patch 1/4 "Clearing buffers via blitter
engine" by "Clearing buffers via CPU/GTT".

v6: Rebased to the latest drm-intel-nightly, Addressed comments, updated
stolen memory purging logic by maintaining a list for purgable stolen
memory objects, enabled pread/pwrite for all non-shmem backed objects
without tiling restrictions.

v7: Addressed comments, compiler optimization, new patch added for correct
error code propagation to the userspace.

v8: Added a new patch to the series to Migrate stolen objects before
hibernation, as stolen memory is not preserved across hibernation. Added
correct error propagation for shmem as well non-shmem backed object allocation.

v9: Addressed comments, use of insert_page helper function to map object page
by page which can be helpful in low aperture space availability.

v10: Addressed comments, use insert_page for clearing out the stolen memory

v11: Addressed comments, 3 new patches added to support allocation from Stolen
memory
1. Allow use of i915_gem_object_get_dma_address for stolen backed objects
2. Use insert_page for pwrite_fast
3. Fail the execbuff using stolen objects as batchbuffers

v12: Addressed comments, Removed patch "Fail the execbuff using stolen objects
as batchbuffers"

v13: Addressed comments, Added 2 patches to detect Intel RST and disable stolen
for persistent data if RST device found
1. acpi: Export acpi_bus_type
2. drm/i915: Disable use of stolen area by User when Intel RST is present

v14: Addressed comments, Added 2 base patches to the series
1. drm/i915: Add support for mapping an object page by page
2. drm/i915: Introduce i915_gem_object_get_dma_address()

v15: Addressed comments, Disabled stolen memory by default

v16: Addressed comments, Added low level rpm assertions, Enabled stolen
memory

v17: Addressed comments

v18: Rebased and fixed issue

v19: Rebased and added 2 more patches to report mappable and stolen size
numbers
1. drm/i915: Extend GET_APERTURE ioctl to report available map space
2. drm/i915: Extend GET_APERTURE ioctl to report size of the stolen region

This can be verified using IGT tests:
igt/gem_stolen, igt/gem_create, igt/gem_pread, igt/gem_pwrite

Ankitprasad Sharma (8):
  drm/i915: Use insert_page for pwrite_fast
  drm/i915: Clearing buffer objects via CPU/GTT
  drm/i915: Support for creating Stolen memory backed objects
  drm/i915: Propagating correct error codes to the userspace
  drm/i915: Support for pread/pwrite from/to non shmem backed objects
  drm/i915: Disable use of stolen area by User when Intel RST is present
  drm/i915: Extend GET_APERTURE ioctl to report available map space
  drm/i915: Extend GET_APERTURE ioctl to report size of the stolen
    region

Chris Wilson (4):
  drm/i915: Add support for mapping an object page by page
  drm/i915: Introduce i915_gem_object_get_dma_address()
  drm/i915: Add support for stealing purgable stolen pages
  drm/i915: Migrate stolen objects before hibernation

 drivers/char/agp/intel-gtt.c                 |   9 +
 drivers/gpu/drm/i915/i915_debugfs.c          | 149 ++++++-
 drivers/gpu/drm/i915/i915_dma.c              |   3 +
 drivers/gpu/drm/i915/i915_drv.c              |  17 +-
 drivers/gpu/drm/i915/i915_drv.h              |  61 ++-
 drivers/gpu/drm/i915/i915_gem.c              | 635 ++++++++++++++++++++++++---
 drivers/gpu/drm/i915/i915_gem_batch_pool.c   |   4 +-
 drivers/gpu/drm/i915/i915_gem_context.c      |   4 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c          |  67 +++
 drivers/gpu/drm/i915/i915_gem_gtt.h          |   5 +
 drivers/gpu/drm/i915/i915_gem_render_state.c |   7 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c       | 320 ++++++++++++--
 drivers/gpu/drm/i915/i915_guc_submission.c   |  52 ++-
 drivers/gpu/drm/i915/intel_acpi.c            |   7 +
 drivers/gpu/drm/i915/intel_display.c         |   5 +-
 drivers/gpu/drm/i915/intel_fbdev.c           |  12 +-
 drivers/gpu/drm/i915/intel_lrc.c             |  10 +-
 drivers/gpu/drm/i915/intel_overlay.c         |   4 +-
 drivers/gpu/drm/i915/intel_pm.c              |  13 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c      |  27 +-
 include/drm/intel-gtt.h                      |   3 +
 include/uapi/drm/i915_drm.h                  |  52 +++
 22 files changed, 1300 insertions(+), 166 deletions(-)

-- 
1.9.1

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

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

end of thread, other threads:[~2016-05-24  8:43 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 11:17 [PATCH v19 00/12] Support for creating/using Stolen memory backed objects ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 01/12] drm/i915: Add support for mapping an object page by page ankitprasad.r.sharma
2016-04-20 12:04   ` Chris Wilson
2016-05-24  8:17     ` Ankitprasad Sharma
2016-04-20 11:17 ` [PATCH 02/12] drm/i915: Introduce i915_gem_object_get_dma_address() ankitprasad.r.sharma
2016-04-20 12:08   ` Chris Wilson
2016-04-20 11:17 ` [PATCH 03/12] drm/i915: Use insert_page for pwrite_fast ankitprasad.r.sharma
2016-04-20 13:01   ` kbuild test robot
2016-04-20 11:17 ` [PATCH 04/12] drm/i915: Clearing buffer objects via CPU/GTT ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 05/12] drm/i915: Support for creating Stolen memory backed objects ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 06/12] drm/i915: Propagating correct error codes to the userspace ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 07/12] drm/i915: Add support for stealing purgable stolen pages ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 08/12] drm/i915: Support for pread/pwrite from/to non shmem backed objects ankitprasad.r.sharma
2016-04-20 12:19   ` Chris Wilson
2016-04-20 11:17 ` [PATCH 09/12] drm/i915: Migrate stolen objects before hibernation ankitprasad.r.sharma
2016-04-20 11:17 ` [PATCH 10/12] drm/i915: Disable use of stolen area by User when Intel RST is present ankitprasad.r.sharma
2016-04-20 23:15   ` Lukas Wunner
2016-04-20 11:17 ` [PATCH 11/12] drm/i915: Extend GET_APERTURE ioctl to report available map space ankitprasad.r.sharma
2016-04-20 13:02   ` kbuild test robot
2016-04-20 13:02   ` [PATCH] drm/i915: fix semicolon.cocci warnings kbuild test robot
2016-04-21 14:04   ` [PATCH 11/12] drm/i915: Extend GET_APERTURE ioctl to report available map space Tvrtko Ursulin
2016-04-21 14:46     ` Chris Wilson
2016-04-21 14:59       ` Tvrtko Ursulin
2016-04-25 10:35         ` Ankitprasad Sharma
2016-04-25 14:51           ` Tvrtko Ursulin
2016-04-26  9:44             ` Chris Wilson
2016-04-28  9:30               ` Tvrtko Ursulin
2016-04-28 10:24                 ` Chris Wilson
2016-04-29 10:06                   ` Tvrtko Ursulin
2016-04-29 10:18                     ` Chris Wilson
2016-04-29 10:26                       ` Tvrtko Ursulin
2016-04-29 10:39                         ` Chris Wilson
2016-04-29 10:56                           ` Tvrtko Ursulin
2016-04-29 11:03                             ` Chris Wilson
2016-04-20 11:17 ` [PATCH 12/12] drm/i915: Extend GET_APERTURE ioctl to report size of the stolen region ankitprasad.r.sharma
2016-04-21 14:17   ` Tvrtko Ursulin
2016-04-21 14:41     ` Chris Wilson
2016-04-21 14:52       ` Tvrtko Ursulin
2016-04-20 16:28 ` ✗ Fi.CI.BAT: failure for Support for creating/using Stolen memory backed objects (rev13) Patchwork
2016-04-28 10:20   ` Tvrtko Ursulin
2016-04-24 14:58 ` ✓ Fi.CI.BAT: success " Patchwork

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.