public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Support for creating Stolen memory backed objects
@ 2015-04-11 12:23 ankitprasad.r.sharma
  2015-04-11 12:23 ` [PATCH 1/3] drm/i915: Clearing buffer objects via blitter engine ankitprasad.r.sharma
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: ankitprasad.r.sharma @ 2015-04-11 12:23 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma, akash.goel, shashidhar.hiremath

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

This patch series adds support for creating 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 also adds support for clearing buffer objects via blitter engines.
This is particularly useful for clearing out the memory from stolen
region, but can also be used for other shmem allocated objects.
Also adding support for stealing purgable stolen pages, if we run out
of stolen memory when trying to allocate an object.

This can be verified using IGT tests: igt/gem_create_stolen

Ankitprasad Sharma (2):
  drm/i915: Clearing buffer objects via blitter engine
  drm/i915: Support for creating Stolen memory backed objects

Chris Wilson (1):
  drm/i915: Add support for stealing purgable stolen pages

 drivers/gpu/drm/i915/Makefile          |   1 +
 drivers/gpu/drm/i915/i915_dma.c        |   3 +
 drivers/gpu/drm/i915/i915_drv.h        |   4 +
 drivers/gpu/drm/i915/i915_gem.c        |  31 +++++-
 drivers/gpu/drm/i915/i915_gem_exec.c   | 197 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_gem_stolen.c | 121 ++++++++++++++++++--
 drivers/gpu/drm/i915/intel_lrc.c       |   2 +-
 drivers/gpu/drm/i915/intel_lrc.h       |   2 +
 include/uapi/drm/i915_drm.h            |  15 +++
 9 files changed, 360 insertions(+), 16 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_gem_exec.c

-- 
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] 7+ messages in thread
* [PATCH 0/3] Introduce a new create ioctl for user specified
@ 2014-06-16 15:29 sourab.gupta
  2014-06-16 15:29 ` [PATCH 3/3] drm/i915: Add support for stealing purgable stolen pages sourab.gupta
  0 siblings, 1 reply; 7+ messages in thread
From: sourab.gupta @ 2014-06-16 15:29 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter, Akash Goel, Sourab Gupta

From: Sourab Gupta <sourab.gupta@intel.com>

This patch series introduces a new gem create ioctl for user specified
placement.

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.
    
This new create ioctl therefore exists to allow the user to create these
second class buffer objects from stolen memory. At the moment direct
access by the CPU through mmaps and pread/pwrite are verboten on the
objects, and so the user must be aware of the limitations of the objects
created. Yet, those limitations rarely reduce the desired functionality
in many use cases and so the user should be able to easily fill the
stolen memory and so help to reduce overall memory pressure.
    
The most obvious use case for stolen memory is for the creation of objects
for the display engine which already have very similar restrictions on
access. However, we want a reasonably general ioctl in order to cater
for diverse scenarios beyond the author's imagination.

Chris Wilson (3):
  drm/i915: Clearing buffer objects via blitter engine
  drm/i915: Introduce a new create ioctl for user specified placement
  drm/i915: Add support for stealing purgable stolen pages

 drivers/gpu/drm/i915/Makefile          |   1 +
 drivers/gpu/drm/i915/i915_dma.c        |  11 +-
 drivers/gpu/drm/i915/i915_drv.h        |  18 ++-
 drivers/gpu/drm/i915/i915_gem.c        | 208 ++++++++++++++++++++++++++++++---
 drivers/gpu/drm/i915/i915_gem_exec.c   | 120 +++++++++++++++++++
 drivers/gpu/drm/i915/i915_gem_stolen.c | 121 +++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_tiling.c | 106 +++++++++--------
 include/uapi/drm/i915_drm.h            | 107 +++++++++++++++++
 8 files changed, 607 insertions(+), 85 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_gem_exec.c

-- 
1.8.5.1

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/3] drm-intel-collector - update
@ 2014-03-24 13:29 Rodrigo Vivi
  2014-03-24 13:29 ` [PATCH 3/3] drm/i915: Add support for stealing purgable stolen pages Rodrigo Vivi
  0 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Vivi @ 2014-03-24 13:29 UTC (permalink / raw)
  To: intel-gfx


This is another drm-intel-collector updated notice:
http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=drm-intel-collector

Here goes the update list in order for better reviewers assignment:

Patch     drm/i915: Bring UP Power Wells before disabling RC6. - Reviewer:
Patch     drm/i915: dma_buf_vunmap is presumed not to fail, don't let it - Reviewer:
Patch     drm/i915: Add support for stealing purgable stolen pages - Reviewer:

Overall Process:

drm-intel-collector - review request
 1. Daniel pushs drm-intel-testing (every 2 weeks)
 2. I rebase drm-intel-collector onto drm-intel-testing
 3. Add Reviewer: tag with voluntered reviewers. If you don't believe you should be assigned on a particular patch please don't get mad just tell you wont review or volunteer someone else.
 4. I resubmit remaining patches for review without picking any new (drm-intel-collector - review request)

drm-intel-collector - updated
 5. One week later I collect all simple (1-2) patches that wasn't yet reviewed and not queued by Daniel from one testing update until another.
 6. Request automated QA's PRTS automated i-g-t tests comparing drm-intel-testing x drm-intel-collector
 7. If tests are ok I send the update notification or the patches as a series to intel-gfx mailing list for better tracking and to be reviewed. (drm-intel-collector - updated)
 8. Let me know volunteers for review new patches and also let me know if I've picked any patch that I shouldn't.

There are some reasons that some patches can be left behind:
1. Your patch didn't applied cleanly and I couldn't easily solve the conflicts.
2. Kernel didn't compiled with your patch.
3. I simply missed it. If you believe this is the case please warn me.

Please help me to get these patches reviewed and queued by Daniel.

Also, please let me know if you have further ideas how to improve this process.

Thanks in advance,
Rodrigo.


Chris Wilson (2):
  drm/i915: dma_buf_vunmap is presumed not to fail, don't let it
  drm/i915: Add support for stealing purgable stolen pages

Deepak S (1):
  drm/i915: Bring UP Power Wells before disabling RC6.

 drivers/gpu/drm/i915/i915_gem_dmabuf.c |   6 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c | 119 ++++++++++++++++++++++++++++++---
 drivers/gpu/drm/i915/intel_pm.c        |   6 ++
 3 files changed, 115 insertions(+), 16 deletions(-)

-- 
1.8.5.3

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

end of thread, other threads:[~2015-04-14  8:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-11 12:23 [PATCH 0/3] Support for creating Stolen memory backed objects ankitprasad.r.sharma
2015-04-11 12:23 ` [PATCH 1/3] drm/i915: Clearing buffer objects via blitter engine ankitprasad.r.sharma
2015-04-11 12:23 ` [PATCH 2/3] drm/i915: Support for creating Stolen memory backed objects ankitprasad.r.sharma
2015-04-11 12:23 ` [PATCH 3/3] drm/i915: Add support for stealing purgable stolen pages ankitprasad.r.sharma
2015-04-14  8:02   ` shuang.he
  -- strict thread matches above, loose matches on Subject: below --
2014-06-16 15:29 [PATCH 0/3] Introduce a new create ioctl for user specified sourab.gupta
2014-06-16 15:29 ` [PATCH 3/3] drm/i915: Add support for stealing purgable stolen pages sourab.gupta
2014-03-24 13:29 [PATCH 0/3] drm-intel-collector - update Rodrigo Vivi
2014-03-24 13:29 ` [PATCH 3/3] drm/i915: Add support for stealing purgable stolen pages Rodrigo Vivi

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