diff mbox

[RFC] drm/i915: s/i915_gem_obj_to_ggtt_view/i915_ggtt_view_to_vma/

Message ID 1459424767-29694-1-git-send-email-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matthew Auld March 31, 2016, 11:46 a.m. UTC
This seems to be more in-line with what the function actually does, this
also makes it more consistent with i915_gem_obj_to_vma.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h      | 6 +++---
 drivers/gpu/drm/i915/i915_gem.c      | 8 ++++----
 drivers/gpu/drm/i915/i915_gem_gtt.c  | 2 +-
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

Comments

Chris Wilson March 31, 2016, 12:03 p.m. UTC | #1
On Thu, Mar 31, 2016 at 12:46:07PM +0100, Matthew Auld wrote:
> This seems to be more in-line with what the function actually does, this
> also makes it more consistent with i915_gem_obj_to_vma.

All of these functions have been deleted in patches on the list that fix
the bugs in partial vma and full vma handling.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 820c91f5..1cb38e6 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3136,8 +3136,8 @@  struct i915_vma *
 i915_gem_obj_to_vma(struct drm_i915_gem_object *obj,
 		    struct i915_address_space *vm);
 struct i915_vma *
-i915_gem_obj_to_ggtt_view(struct drm_i915_gem_object *obj,
-			  const struct i915_ggtt_view *view);
+i915_ggtt_view_to_vma(struct drm_i915_gem_object *obj,
+		      const struct i915_ggtt_view *view);
 
 struct i915_vma *
 i915_gem_obj_lookup_or_create_vma(struct drm_i915_gem_object *obj,
@@ -3149,7 +3149,7 @@  i915_gem_obj_lookup_or_create_ggtt_vma(struct drm_i915_gem_object *obj,
 static inline struct i915_vma *
 i915_gem_obj_to_ggtt(struct drm_i915_gem_object *obj)
 {
-	return i915_gem_obj_to_ggtt_view(obj, &i915_ggtt_view_normal);
+	return i915_ggtt_view_to_vma(obj, &i915_ggtt_view_normal);
 }
 bool i915_gem_obj_is_pinned(struct drm_i915_gem_object *obj);
 
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 11a6ccd..96d0265 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4232,7 +4232,7 @@  i915_gem_object_do_pin(struct drm_i915_gem_object *obj,
 	if (WARN_ON(i915_is_ggtt(vm) != !!ggtt_view))
 		return -EINVAL;
 
-	vma = ggtt_view ? i915_gem_obj_to_ggtt_view(obj, ggtt_view) :
+	vma = ggtt_view ? i915_ggtt_view_to_vma(obj, ggtt_view) :
 			  i915_gem_obj_to_vma(obj, vm);
 
 	if (vma) {
@@ -4307,7 +4307,7 @@  void
 i915_gem_object_ggtt_unpin_view(struct drm_i915_gem_object *obj,
 				const struct i915_ggtt_view *view)
 {
-	struct i915_vma *vma = i915_gem_obj_to_ggtt_view(obj, view);
+	struct i915_vma *vma = i915_ggtt_view_to_vma(obj, view);
 
 	BUG_ON(!vma);
 	WARN_ON(vma->pin_count == 0);
@@ -4608,8 +4608,8 @@  struct i915_vma *i915_gem_obj_to_vma(struct drm_i915_gem_object *obj,
 	return NULL;
 }
 
-struct i915_vma *i915_gem_obj_to_ggtt_view(struct drm_i915_gem_object *obj,
-					   const struct i915_ggtt_view *view)
+struct i915_vma *i915_ggtt_view_to_vma(struct drm_i915_gem_object *obj,
+				       const struct i915_ggtt_view *view)
 {
 	struct i915_address_space *ggtt = i915_obj_to_ggtt(obj);
 	struct i915_vma *vma;
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index f8f09d1..288cf1c 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -3353,7 +3353,7 @@  i915_gem_obj_lookup_or_create_ggtt_vma(struct drm_i915_gem_object *obj,
 				       const struct i915_ggtt_view *view)
 {
 	struct i915_address_space *ggtt = i915_obj_to_ggtt(obj);
-	struct i915_vma *vma = i915_gem_obj_to_ggtt_view(obj, view);
+	struct i915_vma *vma = i915_ggtt_view_to_vma(obj, view);
 
 	if (!vma)
 		vma = __i915_gem_vma_create(obj, ggtt, view);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 60bb486..394403c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2854,7 +2854,7 @@  u32 intel_plane_obj_offset(struct intel_plane *intel_plane,
 	intel_fill_fb_ggtt_view(&view, intel_plane->base.state->fb,
 				intel_plane->base.state->rotation);
 
-	vma = i915_gem_obj_to_ggtt_view(obj, &view);
+	vma = i915_ggtt_view_to_vma(obj, &view);
 	if (WARN(!vma, "ggtt vma for display object not found! (view=%u)\n",
 		view.type))
 		return -1;