linux/Documentation/DocBook
Brad Volkin 493018dcb1 drm/i915: Implement a framework for batch buffer pools
This adds a small module for managing a pool of batch buffers.
The only current use case is for the command parser, as described
in the kerneldoc in the patch. The code is simple, but separating
it out makes it easier to change the underlying algorithms and to
extend to future use cases should they arise.

The interface is simple: init to create an empty pool, fini to
clean it up, get to obtain a new buffer. Note that all buffers are
expected to be inactive before cleaning up the pool.

Locking is currently based on the caller holding the struct_mutex.
We already do that in the places where we will use the batch pool
for the command parser.

v2:
- s/BUG_ON/WARN_ON/ for locking assertions
- Remove the cap on pool size
- Switch from alloc/free to init/fini

v3:
- Idiomatic looping structure in _fini
- Correct handling of purged objects
- Don't return a buffer that's too much larger than needed

v4:
- Rebased to latest -nightly

v5:
- Remove _put() function and clean up comments to match

v6:
- Move purged check inside the loop (danvet, from v4 1/7 feedback)

v7:
- Use single list instead of two. (Chris W)
- s/active_list/cache_list
- Squashed in debug patches (Chris W)
  drm/i915: Add a batch pool debugfs file

  It provides some useful information about the buffers in
  the global command parser batch pool.

  v2: rebase on global pool instead of per-ring pools
  v3: rebase

  drm/i915: Add batch pool details to i915_gem_objects debugfs

  To better account for the potentially large memory consumption
  of the batch pool.

v8:
- Keep cache in LRU order (danvet, from v6 1/5 feedback)

Issue: VIZ-4719
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Reviewed-By: Jon Bloomfield <jon.bloomfield@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-16 10:39:08 +01:00
..
media Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6 2014-10-31 11:55:40 -07:00
.gitignore doc: Add "*.svg" to DocBook/.gitignore 2013-12-02 14:49:19 +01:00
80211.tmpl cfg80211: refactor cfg80211_can_use_iftype_chan() 2014-04-09 10:55:39 +02:00
Makefile documentation: docbook: document process of writing an musb glue layer 2014-05-12 12:34:47 -05:00
alsa-driver-api.tmpl
debugobjects.tmpl debugobjects: Extend to assert that an object is initialized 2011-11-23 18:49:22 +01:00
device-drivers.tmpl Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-05 17:46:42 -07:00
deviceiobook.tmpl docbook: change iomap source filename in deviceiobook 2012-01-23 08:44:54 -08:00
drm.tmpl drm/i915: Implement a framework for batch buffer pools 2014-12-16 10:39:08 +01:00
filesystems.tmpl htmldocs: fix bio.c location 2014-05-20 08:17:35 -06:00
gadget.tmpl usb: patches for v3.17 merge window 2014-07-21 11:33:41 -07:00
genericirq.tmpl DocBook: fix various typos 2014-07-12 11:30:36 -07:00
kernel-api.tmpl DocBook: include !Emm/util.c in kernel-api to include, kzfree and more 2013-12-02 14:42:57 +01:00
kernel-hacking.tmpl Merge branch 'akpm' (incoming from Andrew) 2014-04-07 16:38:06 -07:00
kernel-locking.tmpl locking/Documentation: Move locking related docs into Documentation/locking/ 2014-08-13 10:32:03 +02:00
kgdb.tmpl Documentation: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:03 -08:00
libata.tmpl DocBook: fix various typos 2014-07-12 11:30:36 -07:00
librs.tmpl
lsm.tmpl
media_api.tmpl DocBook: fix various typos 2014-07-12 11:30:36 -07:00
mtdnand.tmpl DocBook: fix mtdnand typos 2014-07-12 11:30:36 -07:00
networking.tmpl docbook: networking: fix file paths for uapi headers 2012-10-15 08:04:41 -07:00
rapidio.tmpl docbook: fix rapidio warning 2011-03-27 19:30:19 -07:00
regulator.tmpl DocBook: fix various typos 2014-07-12 11:30:36 -07:00
s390-drivers.tmpl
scsi.tmpl Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
sh.tmpl sh: clkfwk: Kill off unused clk_set_rate_ex(). 2010-11-15 18:25:12 +09:00
stylesheet.xsl docbook: use IDs as filenames to support multiple books 2010-08-05 13:21:24 -07:00
tracepoint.tmpl workqueue: Add a workqueue chapter to the tracepoint docbook 2010-08-27 12:27:36 +02:00
uio-howto.tmpl DocBook: fix various typos 2014-07-12 11:30:36 -07:00
usb.tmpl usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
w1.tmpl w1: format for DocBook and fixes 2014-02-07 15:40:18 -08:00
writing-an-alsa-driver.tmpl ALSA: Update document about PCM nonatomic ops 2014-09-15 15:52:41 +02:00
writing_musb_glue_layer.tmpl documentation: docbook: document process of writing an musb glue layer 2014-05-12 12:34:47 -05:00
writing_usb_driver.tmpl doc: fix misspellings with 'codespell' tool 2013-05-28 12:02:12 +02:00
z8530book.tmpl