Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/1] Replace shmem memory region and object backend with TTM
@ 2022-04-27 11:34 Adrian Larumbe
  2022-04-27 11:34 ` [Intel-gfx] [PATCH 1/1] drm/i915: " Adrian Larumbe
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Adrian Larumbe @ 2022-04-27 11:34 UTC (permalink / raw)
  To: daniel, thomas.hellstrom, intel-gfx; +Cc: adrian.larumbe

This patch is an attempt at eliminating the old shmem memory region and GEM
object backend, in favour of a TTM-based one that is able to manage objects
placed on both system and local memory.

Known issues:

Many GPU hungs in machines of GEN <= 5. My assumption is this has something
 to do with a caching issues, but everywhere across the TTM backend code
 I've tried to handle object creation and getting its pages with the same
 set of caching and coherency properties as in the old shmem backend.

Object passed to shmem_create_from_object somehow not being flushed after
 being written into at lrc_init_state. Seems thatwith the new backend and
 when pinning an intel_context, either i915_gem_object_pin_map is not
 creating a kernel mapping with the right caching properties or else
 flushing it afterwards doesn't do anything.

 This leads to a GPU hung because the engine's default state that is read
 with shmem_read doesn't reflect what had been written into it previously
 by vmap'ing the object's pages. The only workaround I could find was
 manually setting the shmem file's pages dirty and putting them back, but
 this looks hacky and wasteful for big BO's

Besides all this, I haven't yet implemented the pread callback for TTM
object backend, as it seems CI's BAT test list doesn't include it.

Adrian Larumbe (1):
  drm/i915: Replace shmem memory region and object backend with TTM

 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c   |  12 +-
 drivers/gpu/drm/i915/gem/i915_gem_mman.c     |  32 +-
 drivers/gpu/drm/i915/gem/i915_gem_object.h   |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_phys.c     |   5 +-
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c    | 397 +------------------
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c      | 212 +++++++++-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.h      |   3 +
 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c |  11 +-
 drivers/gpu/drm/i915/gt/shmem_utils.c        |  64 ++-
 drivers/gpu/drm/i915/intel_memory_region.c   |   7 +-
 10 files changed, 333 insertions(+), 412 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-04-29  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27 11:34 [Intel-gfx] [PATCH 0/1] Replace shmem memory region and object backend with TTM Adrian Larumbe
2022-04-27 11:34 ` [Intel-gfx] [PATCH 1/1] drm/i915: " Adrian Larumbe
2022-04-28 18:04   ` Matthew Auld
2022-04-28  8:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-04-28  9:17 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-04-29  9:14 ` [Intel-gfx] [PATCH 0/1] " Tvrtko Ursulin

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