All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Welty <brian.welty@intel.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Christian König" <christian.koenig@amd.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>
Subject: [RFC PATCH 2/3] drm: Introduce DRM_MEM defines for specifying type of drm_mem_region
Date: Mon, 29 Jul 2019 20:32:24 -0400	[thread overview]
Message-ID: <20190730003225.322-3-brian.welty@intel.com> (raw)
In-Reply-To: <20190730003225.322-1-brian.welty@intel.com>

Introduce DRM memory region types to be common for both drivers using
TTM and for i915.  For now, TTM continues to define it's own set but
uses the DRM base definitions.

Signed-off-by: Brian Welty <brian.welty@intel.com>
---
 include/drm/drm_mm.h            | 8 ++++++++
 include/drm/ttm/ttm_placement.h | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index 465f8d10d863..b78dc9284702 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -59,6 +59,14 @@
 struct drm_device;
 struct drm_mm;
 
+/*
+ * Memory types for drm_mem_region
+ */
+#define DRM_MEM_SYSTEM	0
+#define DRM_MEM_STOLEN	1
+#define DRM_MEM_VRAM	2
+#define DRM_MEM_PRIV	3
+
 /**
  * struct drm_mem_region
  *
diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
index e88a8e39767b..976cf8d2f899 100644
--- a/include/drm/ttm/ttm_placement.h
+++ b/include/drm/ttm/ttm_placement.h
@@ -37,10 +37,10 @@
  * Memory regions for data placement.
  */
 
-#define TTM_PL_SYSTEM           0
-#define TTM_PL_TT               1
-#define TTM_PL_VRAM             2
-#define TTM_PL_PRIV             3
+#define TTM_PL_SYSTEM           DRM_MEM_SYSTEM
+#define TTM_PL_TT               DRM_MEM_STOLEN
+#define TTM_PL_VRAM             DRM_MEM_VRAM
+#define TTM_PL_PRIV             DRM_MEM_PRIV
 
 #define TTM_PL_FLAG_SYSTEM      (1 << TTM_PL_SYSTEM)
 #define TTM_PL_FLAG_TT          (1 << TTM_PL_TT)
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-07-30  0:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  0:32 [RFC PATCH 0/3] Propose new struct drm_mem_region Brian Welty
2019-07-30  0:32 ` Brian Welty [this message]
     [not found] ` <20190730003225.322-1-brian.welty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-07-30  0:32   ` [RFC PATCH 1/3] drm: introduce " Brian Welty
2019-07-30  0:32   ` [RFC PATCH 3/3] drm/i915: Update intel_memory_region to use nested drm_mem_region Brian Welty
2019-07-30  8:45   ` [RFC PATCH 0/3] Propose new struct drm_mem_region 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
  -- strict thread matches above, loose matches on Subject: below --
2019-07-29 16:54 Brian Welty
2019-07-29 16:54 ` [RFC PATCH 2/3] drm: Introduce DRM_MEM defines for specifying type of drm_mem_region Brian Welty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730003225.322-3-brian.welty@intel.com \
    --to=brian.welty@intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.