Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 22/25] drm/i915: s/stride/src_stride/ in the intel_remapped_plane_info struct
Date: Thu, 25 Mar 2021 23:48:05 +0200	[thread overview]
Message-ID: <20210325214808.2071517-23-imre.deak@intel.com> (raw)
In-Reply-To: <20210325214808.2071517-1-imre.deak@intel.com>

An upcoming patch adds a new dst_stride field to the
intel_remapped_plane_info struct, so for clarity rename the current
stride field to src_stride.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb.c   |  8 +--
 drivers/gpu/drm/i915/gt/intel_ggtt.c      |  4 +-
 drivers/gpu/drm/i915/i915_debugfs.c       |  8 +--
 drivers/gpu/drm/i915/i915_vma_types.h     |  2 +-
 drivers/gpu/drm/i915/selftests/i915_vma.c | 60 +++++++++++------------
 5 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index e153f6ae1298c..dcf7e811d1425 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -590,8 +590,8 @@ static void init_plane_view_dims(const struct intel_framebuffer *fb, int color_p
 }
 
 static unsigned int
-plane_view_stride_tiles(const struct intel_framebuffer *fb, int color_plane,
-			const struct fb_plane_view_dims *dims)
+plane_view_src_stride_tiles(const struct intel_framebuffer *fb, int color_plane,
+			    const struct fb_plane_view_dims *dims)
 {
 	return DIV_ROUND_UP(fb->base.pitches[color_plane],
 			    dims->tile_width * fb->base.format->cpp[color_plane]);
@@ -633,7 +633,7 @@ static u32 calc_plane_remap_info(const struct intel_framebuffer *fb, int color_p
 	struct drm_rect r;
 
 	assign_chk_ovf(i915, remap_info->offset, obj_offset);
-	assign_chk_ovf(i915, remap_info->stride, plane_view_stride_tiles(fb, color_plane, dims));
+	assign_chk_ovf(i915, remap_info->src_stride, plane_view_src_stride_tiles(fb, color_plane, dims));
 	assign_chk_ovf(i915, remap_info->width, plane_view_width_tiles(fb, color_plane, dims, x));
 	assign_chk_ovf(i915, remap_info->height, plane_view_height_tiles(fb, color_plane, dims, y));
 
@@ -699,7 +699,7 @@ calc_plane_normal_size(const struct intel_framebuffer *fb, int color_plane,
 		       x * fb->base.format->cpp[color_plane];
 		tiles = DIV_ROUND_UP(size, intel_tile_size(i915));
 	} else {
-		tiles = plane_view_stride_tiles(fb, color_plane, dims) *
+		tiles = plane_view_src_stride_tiles(fb, color_plane, dims) *
 			plane_view_height_tiles(fb, color_plane, dims, y);
 		/*
 		 * If the plane isn't horizontally tile aligned,
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index c2fc49495029b..cb048d0e369ce 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -1320,7 +1320,7 @@ intel_rotate_pages(struct intel_rotation_info *rot_info,
 	for (i = 0 ; i < ARRAY_SIZE(rot_info->plane); i++) {
 		sg = rotate_pages(obj, rot_info->plane[i].offset,
 				  rot_info->plane[i].width, rot_info->plane[i].height,
-				  rot_info->plane[i].stride, st, sg);
+				  rot_info->plane[i].src_stride, st, sg);
 	}
 
 	return st;
@@ -1404,7 +1404,7 @@ intel_remap_pages(struct intel_remapped_info *rem_info,
 	for (i = 0 ; i < ARRAY_SIZE(rem_info->plane); i++) {
 		sg = remap_pages(obj, rem_info->plane[i].offset,
 				 rem_info->plane[i].width, rem_info->plane[i].height,
-				 rem_info->plane[i].stride, st, sg);
+				 rem_info->plane[i].src_stride, st, sg);
 	}
 
 	i915_sg_trim(st);
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index b00c828f90a7f..9c4b9d475793b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -176,11 +176,11 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 				seq_printf(m, ", rotated [(%ux%u, stride=%u, offset=%u), (%ux%u, stride=%u, offset=%u)]",
 					   vma->ggtt_view.rotated.plane[0].width,
 					   vma->ggtt_view.rotated.plane[0].height,
-					   vma->ggtt_view.rotated.plane[0].stride,
+					   vma->ggtt_view.rotated.plane[0].src_stride,
 					   vma->ggtt_view.rotated.plane[0].offset,
 					   vma->ggtt_view.rotated.plane[1].width,
 					   vma->ggtt_view.rotated.plane[1].height,
-					   vma->ggtt_view.rotated.plane[1].stride,
+					   vma->ggtt_view.rotated.plane[1].src_stride,
 					   vma->ggtt_view.rotated.plane[1].offset);
 				break;
 
@@ -188,11 +188,11 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 				seq_printf(m, ", remapped [(%ux%u, stride=%u, offset=%u), (%ux%u, stride=%u, offset=%u)]",
 					   vma->ggtt_view.remapped.plane[0].width,
 					   vma->ggtt_view.remapped.plane[0].height,
-					   vma->ggtt_view.remapped.plane[0].stride,
+					   vma->ggtt_view.remapped.plane[0].src_stride,
 					   vma->ggtt_view.remapped.plane[0].offset,
 					   vma->ggtt_view.remapped.plane[1].width,
 					   vma->ggtt_view.remapped.plane[1].height,
-					   vma->ggtt_view.remapped.plane[1].stride,
+					   vma->ggtt_view.remapped.plane[1].src_stride,
 					   vma->ggtt_view.remapped.plane[1].offset);
 				break;
 
diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h
index 358b4306fc002..f7f2aa168c9ef 100644
--- a/drivers/gpu/drm/i915/i915_vma_types.h
+++ b/drivers/gpu/drm/i915/i915_vma_types.h
@@ -100,7 +100,7 @@ struct intel_remapped_plane_info {
 	u32 offset;
 	u16 width;
 	u16 height;
-	u16 stride;
+	u16 src_stride;
 	u16 unused_mbz;
 } __packed;
 
diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
index 95dd6712ac905..9aaf7201e2421 100644
--- a/drivers/gpu/drm/i915/selftests/i915_vma.c
+++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
@@ -361,7 +361,7 @@ static unsigned long rotated_index(const struct intel_rotation_info *r,
 				   unsigned int x,
 				   unsigned int y)
 {
-	return (r->plane[n].stride * (r->plane[n].height - y - 1) +
+	return (r->plane[n].src_stride * (r->plane[n].height - y - 1) +
 		r->plane[n].offset + x);
 }
 
@@ -411,7 +411,7 @@ static unsigned long remapped_index(const struct intel_remapped_info *r,
 				    unsigned int x,
 				    unsigned int y)
 {
-	return (r->plane[n].stride * y +
+	return (r->plane[n].src_stride * y +
 		r->plane[n].offset + x);
 }
 
@@ -479,21 +479,21 @@ static int igt_vma_rotate_remap(void *arg)
 	struct i915_address_space *vm = &ggtt->vm;
 	struct drm_i915_gem_object *obj;
 	const struct intel_remapped_plane_info planes[] = {
-		{ .width = 1, .height = 1, .stride = 1 },
-		{ .width = 2, .height = 2, .stride = 2 },
-		{ .width = 4, .height = 4, .stride = 4 },
-		{ .width = 8, .height = 8, .stride = 8 },
+		{ .width = 1, .height = 1, .src_stride = 1 },
+		{ .width = 2, .height = 2, .src_stride = 2 },
+		{ .width = 4, .height = 4, .src_stride = 4 },
+		{ .width = 8, .height = 8, .src_stride = 8 },
 
-		{ .width = 3, .height = 5, .stride = 3 },
-		{ .width = 3, .height = 5, .stride = 4 },
-		{ .width = 3, .height = 5, .stride = 5 },
+		{ .width = 3, .height = 5, .src_stride = 3 },
+		{ .width = 3, .height = 5, .src_stride = 4 },
+		{ .width = 3, .height = 5, .src_stride = 5 },
 
-		{ .width = 5, .height = 3, .stride = 5 },
-		{ .width = 5, .height = 3, .stride = 7 },
-		{ .width = 5, .height = 3, .stride = 9 },
+		{ .width = 5, .height = 3, .src_stride = 5 },
+		{ .width = 5, .height = 3, .src_stride = 7 },
+		{ .width = 5, .height = 3, .src_stride = 9 },
 
-		{ .width = 4, .height = 6, .stride = 6 },
-		{ .width = 6, .height = 4, .stride = 6 },
+		{ .width = 4, .height = 6, .src_stride = 6 },
+		{ .width = 6, .height = 4, .src_stride = 6 },
 		{ }
 	}, *a, *b;
 	enum i915_ggtt_view_type types[] = {
@@ -523,8 +523,8 @@ static int igt_vma_rotate_remap(void *arg)
 			struct intel_remapped_plane_info *plane_info = view.remapped.plane;
 			unsigned int n, max_offset;
 
-			max_offset = max(plane_info[0].stride * plane_info[0].height,
-					 plane_info[1].stride * plane_info[1].height);
+			max_offset = max(plane_info[0].src_stride * plane_info[0].height,
+					 plane_info[1].src_stride * plane_info[1].height);
 			GEM_BUG_ON(max_offset > max_pages);
 			max_offset = max_pages - max_offset;
 
@@ -596,11 +596,11 @@ static int igt_vma_rotate_remap(void *arg)
 							       "rotated" : "remapped", n,
 							       plane_info[0].width,
 							       plane_info[0].height,
-							       plane_info[0].stride,
+							       plane_info[0].src_stride,
 							       plane_info[0].offset,
 							       plane_info[1].width,
 							       plane_info[1].height,
-							       plane_info[1].stride,
+							       plane_info[1].src_stride,
 							       plane_info[1].offset);
 							err = -EINVAL;
 							goto out_object;
@@ -853,21 +853,21 @@ static int igt_vma_remapped_gtt(void *arg)
 {
 	struct drm_i915_private *i915 = arg;
 	const struct intel_remapped_plane_info planes[] = {
-		{ .width = 1, .height = 1, .stride = 1 },
-		{ .width = 2, .height = 2, .stride = 2 },
-		{ .width = 4, .height = 4, .stride = 4 },
-		{ .width = 8, .height = 8, .stride = 8 },
+		{ .width = 1, .height = 1, .src_stride = 1 },
+		{ .width = 2, .height = 2, .src_stride = 2 },
+		{ .width = 4, .height = 4, .src_stride = 4 },
+		{ .width = 8, .height = 8, .src_stride = 8 },
 
-		{ .width = 3, .height = 5, .stride = 3 },
-		{ .width = 3, .height = 5, .stride = 4 },
-		{ .width = 3, .height = 5, .stride = 5 },
+		{ .width = 3, .height = 5, .src_stride = 3 },
+		{ .width = 3, .height = 5, .src_stride = 4 },
+		{ .width = 3, .height = 5, .src_stride = 5 },
 
-		{ .width = 5, .height = 3, .stride = 5 },
-		{ .width = 5, .height = 3, .stride = 7 },
-		{ .width = 5, .height = 3, .stride = 9 },
+		{ .width = 5, .height = 3, .src_stride = 5 },
+		{ .width = 5, .height = 3, .src_stride = 7 },
+		{ .width = 5, .height = 3, .src_stride = 9 },
 
-		{ .width = 4, .height = 6, .stride = 6 },
-		{ .width = 6, .height = 4, .stride = 6 },
+		{ .width = 4, .height = 6, .src_stride = 6 },
+		{ .width = 6, .height = 4, .src_stride = 6 },
 		{ }
 	}, *p;
 	enum i915_ggtt_view_type types[] = {
-- 
2.25.1

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

  parent reply	other threads:[~2021-03-25 21:48 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 21:47 [Intel-gfx] [PATCH v2 00/25] drm/i915: Add support for FBs requiring a POT stride padding Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 01/25] drm/i915: Fix rotation setup during plane HW readout Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 02/25] drm/i915/selftest: Fix error handling in igt_vma_remapped_gtt() Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 03/25] drm/i915/selftest: Fix debug message " Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 04/25] drm/i915: Make sure i915_ggtt_view is inited when creating an FB Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 05/25] drm/i915/selftest: Make sure to init i915_ggtt_view in igt_vma_rotate_remap() Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 06/25] drm/i915/intel_fb: Pull FB plane functions from intel_display_types.h Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 07/25] drm/i915/intel_fb: Pull FB plane functions from skl_universal_plane.c Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 08/25] drm/i915/intel_fb: Pull is_surface_linear() from intel_display.c/skl_universal_plane.c Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 09/25] drm/i915/intel_fb: Pull FB plane functions from intel_sprite.c Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 10/25] drm/i915/intel_fb: Pull FB plane functions from intel_display.c Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 11/25] drm/i915/intel_fb: Unexport intel_fb_check_stride() Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 12/25] drm/i915/intel_fb: s/dev_priv/i915/ Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 13/25] drm/i915/intel_fb: Factor out convert_plane_offset_to_xy() Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 14/25] drm/i915/intel_fb: Factor out calc_plane_aligned_offset() Imre Deak
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 15/25] drm/i915/intel_fb: Factor out calc_plane_normal_size() Imre Deak
2021-03-26 16:22   ` Ville Syrjälä
2021-03-25 21:47 ` [Intel-gfx] [PATCH v2 16/25] drm/i915: Unify the FB and plane state view information into one struct Imre Deak
2021-03-26 16:33   ` Ville Syrjälä
2021-03-26 16:37     ` Imre Deak
2021-03-27 22:09   ` [Intel-gfx] [PATCH v3 " Imre Deak
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 17/25] drm/i915: Store the normal view FB pitch in FB's intel_fb_view Imre Deak
2021-03-26 16:34   ` Ville Syrjälä
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 18/25] drm/i915: Simplify copying the FB view state to the plane state Imre Deak
2021-03-26 16:42   ` Ville Syrjälä
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 19/25] drm/i915/intel_fb: Factor out calc_plane_remap_info() Imre Deak
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 20/25] drm/i915: Shrink the size of intel_remapped_plane_info struct Imre Deak
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 21/25] drm/i915/selftest: Unify use of intel_remapped_plane_info in igt_vma_rotate_remap() Imre Deak
2021-03-25 21:48 ` Imre Deak [this message]
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 23/25] drm/i915: Add support for FBs requiring a POT stride alignment Imre Deak
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 24/25] drm/i915/selftest: Add remap/rotate vma subtests when dst_stride!=width/height Imre Deak
2021-03-25 21:48 ` [Intel-gfx] [PATCH v2 25/25] drm/i915: For-CI: Force remapping the FB with a POT aligned stride Imre Deak
2021-03-26 22:35   ` [Intel-gfx] [PATCH v3 " Imre Deak
2021-03-26  1:31 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for FBs requiring a POT stride padding (rev2) Patchwork
2021-03-26  1:32 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-03-26  1:36 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-03-26  2:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-26  7:41 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-26 22:27   ` Imre Deak
2021-03-26 23:18 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for FBs requiring a POT stride padding (rev3) Patchwork
2021-03-26 23:20 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-03-26 23:23 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-03-26 23:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-27  2:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-27 22:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for FBs requiring a POT stride padding (rev4) Patchwork
2021-03-27 22:35 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-03-27 22:38 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-03-27 23:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-28  0:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-29 15:46   ` Imre Deak
2021-03-29 18:01     ` Vudum, Lakshminarayana
2021-03-29 16:28 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2021-03-29 20:48   ` Imre Deak

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=20210325214808.2071517-23-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox