A collection of cleanups, revisited

Submitted by Dave Gordon on Feb. 5, 2016, 6:33 p.m.

Details

Reviewer None
Submitted Feb. 5, 2016, 6:33 p.m.
Last Updated Feb. 8, 2016, 12:58 p.m.
Revision 1

Cover Letter(s)

Revision 1
      Various things can go wrong during initialisation and teardown, but they
usually don't, so the error-handling paths go largely untested.  This
collection of patches fixes some things I recently noticed. Some might
lead to a kernel OOPS, but mostly they're leaks and other inconsistencies.

Includes Nick Hoath's patch to swap context/engine teardown, because that
helps make setup & teardown more consistent too; but more importantly, that
patch [10/11] is dependent on patch [9/11] of this set to work correctly.
Applying [10/11] without at least [9/11] as well may cause a fault on
driver unload!

v2:
    Patches reordered and the previous [1/4] split into [4..6/6],
    so that the bugs that it's fixing are more clearly visible
    (Mika Kuoppala, although he said it wasn't actually *necessary*).

v3:
    Patches reordered again; the bug fixes are now in patches 3 and 5.
    The former could stand alone; the latter depends on patch 4 and is
    a prerequisite for Nick's patch [6/6] to function.

v4:
    Rebased

v5:
    Patches repartitioned, reordered, and rebased again.
    The first two are now the ones that have already been reviewed
    (R-b: Chris Wilson), the remaining ones have been broken up
    into smaller more digestible chunks.

Dave Gordon (9):
  drm/i915: unmap the correct page in intel_logical_ring_cleanup()
  drm/i915: consolidate LRC mode HWSP setup & teardown
  drm/i915: remove useless copypasted code
  drm/i915: tidy up initialisation failure paths (GEM)
  drm/i915: tidy initialisation failure paths (legacy, part 1)
  drm/i915: tidy initialisation failure paths (legacy, part 2)
  drm/i915: tidy initialisation failure paths (legacy, part 3)
  drm/i915: tear down hardware status page mappings earlier
  drm/i915: make LRC status page teardown code a bit more robust

Nick Hoath (2):
  drm/i915: two small moves towards more consistency
  drm/i915: interchange context/engine cleanup order

 drivers/gpu/drm/i915/i915_dma.c         |  4 +-
 drivers/gpu/drm/i915/i915_drv.h         |  2 +-
 drivers/gpu/drm/i915/i915_gem.c         | 28 ++++++++------
 drivers/gpu/drm/i915/intel_lrc.c        | 65 ++++++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_ringbuffer.c | 40 ++++++++------------
 5 files changed, 75 insertions(+), 64 deletions(-)
    

Revisions

Patches download mbox

Tests

Series 3129v1 A collection of cleanups, revisited
http://patchwork.freedesktop.org/api/1.0/series/3129/revisions/1/mbox/


bdw-nuci7        total:161  pass:152  dwarn:0   dfail:0   fail:0   skip:9  
bdw-ultra        total:164  pass:152  dwarn:0   dfail:0   fail:0   skip:12 
bsw-nuc-2        total:164  pass:136  dwarn:0   dfail:0   fail:0   skip:28 
byt-nuc          total:164  pass:141  dwarn:0   dfail:0   fail:0   skip:23 
hsw-brixbox      total:164  pass:151  dwarn:0   dfail:0   fail:0   skip:13 
hsw-gt2          total:164  pass:154  dwarn:0   dfail:0   fail:0   skip:10 
hsw-xps12        total:161  pass:151  dwarn:0   dfail:0   fail:0   skip:10 
ilk-hp8440p      total:164  pass:116  dwarn:0   dfail:0   fail:0   skip:48 
ivb-t430s        total:164  pass:150  dwarn:0   dfail:0   fail:0   skip:14 
snb-dellxps      total:164  pass:142  dwarn:0   dfail:0   fail:0   skip:22 
snb-x220t        total:164  pass:142  dwarn:0   dfail:0   fail:1   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1373/

9ae71c139227311e70dcc91d16d5acba34ce9a71 drm-intel-nightly: 2016y-02m-08d-09h-39m-29s UTC integration manifest
c6e46d42282341054b3183736b63c9dc4f96c431 drm/i915: make LRC status page teardown code a bit more robust
80b1f268aab94610ff05e3ac3765f7fba4404a5f drm/i915: interchange context/engine cleanup order
17415233d212f9220d65d946eacbacc3d365c927 drm/i915: tear down hardware status page mappings earlier
22a820bb751fbec8fdf30cd6adb06c70ca7033b7 drm/i915: two small moves towards more consistency
79462059fa840146f741ac3802670597127249a5 drm/i915: tidy initialisation failure paths (legacy, part 3)
86b8561e262d4fa88c32047e7274d324d7e841c6 drm/i915: tidy initialisation failure paths (legacy, part 2)
afee40fb6f764b0d4e68652711586d94000076de drm/i915: tidy initialisation failure paths (legacy, part 1)
a9a4abe918dc8772ecf29dac0a28ea538fa64e02 drm/i915: tidy up initialisation failure paths (GEM)
82cbb0a772f12b08d55371da2b380e313aa102f4 drm/i915: remove useless copypasted code
2c935ea952dafcb9374782354c778eee264eac7e drm/i915: consolidate LRC mode HWSP setup & teardown
2be18abe529bc5d6a5611ae27cedd3bcd1a3e6d7 drm/i915: unmap the correct page in intel_logical_ring_cleanup()