All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Propose new struct drm_mem_region
@ 2019-07-29 16:54 Brian Welty
  2019-07-29 16:54 ` [RFC PATCH 1/3] drm: introduce " Brian Welty
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Brian Welty @ 2019-07-29 16:54 UTC (permalink / raw)
  To: dri-devel, Daniel Vetter, intel-gfx

This RFC series is first implementation of some ideas expressed
earlier on dri-devel [1].

Some of the goals (open for much debate) are:
  - Create common base structure (subclass) for memory regions (patch #1)
  - Create common memory region types (patch #2)
  - Create common set of memory_region function callbacks (based on
    ttm_mem_type_manager_funcs and intel_memory_regions_ops)
  - Create common helpers that operate on drm_mem_region to be leveraged
    by both TTM drivers and i915, reducing code duplication
  - Above might start with refactoring ttm_bo_manager.c as these are
    helpers for using drm_mm's range allocator and could be made to
    operate on DRM structures instead of TTM ones.
  - Larger goal might be to make LRU management of GEM objects common, and
    migrate those fields into drm_mem_region and drm_gem_object strucures.

Patches 1-2 implement the proposed struct drm_mem_region and adds
associated common set of definitions for memory region type.

Patch #3 is update to i915 and is based upon another series which is
in progress to add vram support to i915 [2].

[1] https://lists.freedesktop.org/archives/dri-devel/2019-June/224501.html
[2] https://lists.freedesktop.org/archives/intel-gfx/2019-June/203649.html

Brian Welty (3):
  drm: introduce new struct drm_mem_region
  drm: Introduce DRM_MEM defines for specifying type of drm_mem_region
  drm/i915: Update intel_memory_region to use nested drm_mem_region

 drivers/gpu/drm/i915/gem/i915_gem_object.c    |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c     |  2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c           | 10 +++---
 drivers/gpu/drm/i915/i915_gpu_error.c         |  2 +-
 drivers/gpu/drm/i915/i915_query.c             |  2 +-
 drivers/gpu/drm/i915/intel_memory_region.c    | 10 +++---
 drivers/gpu/drm/i915/intel_memory_region.h    | 19 +++-------
 drivers/gpu/drm/i915/intel_region_lmem.c      | 26 +++++++-------
 .../drm/i915/selftests/intel_memory_region.c  |  8 ++---
 drivers/gpu/drm/ttm/ttm_bo.c                  | 34 ++++++++++--------
 drivers/gpu/drm/ttm/ttm_bo_manager.c          | 14 ++++----
 drivers/gpu/drm/ttm/ttm_bo_util.c             | 11 +++---
 drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c |  8 ++---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c    |  4 +--
 include/drm/drm_mm.h                          | 35 +++++++++++++++++++
 include/drm/ttm/ttm_bo_api.h                  |  2 +-
 include/drm/ttm/ttm_bo_driver.h               | 16 ++++-----
 include/drm/ttm/ttm_placement.h               |  8 ++---
 18 files changed, 122 insertions(+), 91 deletions(-)

-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [RFC PATCH 0/3] Propose new struct drm_mem_region
@ 2019-07-30  0:32 Brian Welty
       [not found] ` <20190730003225.322-1-brian.welty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Brian Welty @ 2019-07-30  0:32 UTC (permalink / raw)
  To: dri-devel, amd-gfx, intel-gfx, Daniel Vetter,
	Christian König, Joonas Lahtinen

[ By request, resending to include amd-gfx + intel-gfx.  Since resending,
  I fixed the nit with ordering of header includes that Sam noted. ]

This RFC series is first implementation of some ideas expressed
earlier on dri-devel [1].

Some of the goals (open for much debate) are:
  - Create common base structure (subclass) for memory regions (patch #1)
  - Create common memory region types (patch #2)
  - Create common set of memory_region function callbacks (based on
    ttm_mem_type_manager_funcs and intel_memory_regions_ops)
  - Create common helpers that operate on drm_mem_region to be leveraged
    by both TTM drivers and i915, reducing code duplication
  - Above might start with refactoring ttm_bo_manager.c as these are
    helpers for using drm_mm's range allocator and could be made to
    operate on DRM structures instead of TTM ones.
  - Larger goal might be to make LRU management of GEM objects common, and
    migrate those fields into drm_mem_region and drm_gem_object strucures.

Patches 1-2 implement the proposed struct drm_mem_region and adds
associated common set of definitions for memory region type.

Patch #3 is update to i915 and is based upon another series which is
in progress to add vram support to i915 [2].

[1] https://lists.freedesktop.org/archives/dri-devel/2019-June/224501.html
[2] https://lists.freedesktop.org/archives/intel-gfx/2019-June/203649.html

Brian Welty (3):
  drm: introduce new struct drm_mem_region
  drm: Introduce DRM_MEM defines for specifying type of drm_mem_region
  drm/i915: Update intel_memory_region to use nested drm_mem_region

 drivers/gpu/drm/i915/gem/i915_gem_object.c    |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c     |  2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c           | 10 ++---
 drivers/gpu/drm/i915/i915_gpu_error.c         |  2 +-
 drivers/gpu/drm/i915/i915_query.c             |  2 +-
 drivers/gpu/drm/i915/intel_memory_region.c    | 10 +++--
 drivers/gpu/drm/i915/intel_memory_region.h    | 19 +++------
 drivers/gpu/drm/i915/intel_region_lmem.c      | 26 ++++++-------
 .../drm/i915/selftests/intel_memory_region.c  |  8 ++--
 drivers/gpu/drm/ttm/ttm_bo.c                  | 34 +++++++++-------
 drivers/gpu/drm/ttm/ttm_bo_manager.c          | 14 +++----
 drivers/gpu/drm/ttm/ttm_bo_util.c             | 11 +++---
 drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c |  8 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c    |  4 +-
 include/drm/drm_mm.h                          | 39 ++++++++++++++++++-
 include/drm/ttm/ttm_bo_api.h                  |  2 +-
 include/drm/ttm/ttm_bo_driver.h               | 16 ++++----
 include/drm/ttm/ttm_placement.h               |  8 ++--
 18 files changed, 124 insertions(+), 93 deletions(-)

-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-07-31  8:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 16:54 [RFC PATCH 0/3] Propose new struct drm_mem_region Brian Welty
2019-07-29 16:54 ` [RFC PATCH 1/3] drm: introduce " Brian Welty
2019-07-29 17:55   ` Sam Ravnborg
2019-07-29 16:54 ` [RFC PATCH 2/3] drm: Introduce DRM_MEM defines for specifying type of drm_mem_region Brian Welty
2019-07-29 16:54 ` [RFC PATCH 3/3] drm/i915: Update intel_memory_region to use nested drm_mem_region Brian Welty
2019-07-30  0:32 [RFC PATCH 0/3] Propose new struct drm_mem_region Brian Welty
     [not found] ` <20190730003225.322-1-brian.welty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-07-30  8:45   ` Koenig, Christian
2019-07-30  9:34     ` Daniel Vetter
     [not found]       ` <20190730093421.GN15868-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-07-31  1:19         ` Brian Welty
2019-07-30  9:38     ` Daniel Vetter
     [not found]       ` <20190730093847.GP15868-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-07-30 10:24         ` Koenig, Christian
2019-07-30 10:45           ` Daniel Vetter
     [not found]             ` <CAKMK7uHrGgn7FqSBD+qDYYHxyPLvv5OqzwLTACWuqbjANKFuQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-07-30 14:30               ` Michel Dänzer
2019-07-30 14:33                 ` Daniel Vetter
2019-07-31  0:51             ` Brian Welty
     [not found]               ` <54163ae1-68fc-93c4-c19a-e30d31de3961@amd.com>
2019-07-31  8:05                 ` Daniel Vetter
     [not found]                   ` <CAKMK7uFU-Ub4Bj7F9K=S-XQM26PO+ctMNATvrh_OuK9px0X=yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-07-31  8:25                     ` Christian König
2019-07-31  8:33                       ` Daniel Vetter

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.