Skip to content

Commit 6d80f43

Browse files
committed
drm/i915: s/stride/src_stride/ in the intel_remapped_plane_info struct
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 <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b05787a commit 6d80f43

File tree

5 files changed

+41
-41
lines changed

5 files changed

+41
-41
lines changed

drivers/gpu/drm/i915/display/intel_fb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ static void init_plane_view_dims(const struct intel_framebuffer *fb, int color_p
590590
}
591591

592592
static unsigned int
593-
plane_view_stride_tiles(const struct intel_framebuffer *fb, int color_plane,
594-
const struct fb_plane_view_dims *dims)
593+
plane_view_src_stride_tiles(const struct intel_framebuffer *fb, int color_plane,
594+
const struct fb_plane_view_dims *dims)
595595
{
596596
return DIV_ROUND_UP(fb->base.pitches[color_plane],
597597
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
633633
struct drm_rect r;
634634

635635
assign_chk_ovf(i915, remap_info->offset, obj_offset);
636-
assign_chk_ovf(i915, remap_info->stride, plane_view_stride_tiles(fb, color_plane, dims));
636+
assign_chk_ovf(i915, remap_info->src_stride, plane_view_src_stride_tiles(fb, color_plane, dims));
637637
assign_chk_ovf(i915, remap_info->width, plane_view_width_tiles(fb, color_plane, dims, x));
638638
assign_chk_ovf(i915, remap_info->height, plane_view_height_tiles(fb, color_plane, dims, y));
639639

@@ -699,7 +699,7 @@ calc_plane_normal_size(const struct intel_framebuffer *fb, int color_plane,
699699
x * fb->base.format->cpp[color_plane];
700700
tiles = DIV_ROUND_UP(size, intel_tile_size(i915));
701701
} else {
702-
tiles = plane_view_stride_tiles(fb, color_plane, dims) *
702+
tiles = plane_view_src_stride_tiles(fb, color_plane, dims) *
703703
plane_view_height_tiles(fb, color_plane, dims, y);
704704
/*
705705
* If the plane isn't horizontally tile aligned,

drivers/gpu/drm/i915/gt/intel_ggtt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ intel_rotate_pages(struct intel_rotation_info *rot_info,
13001300
for (i = 0 ; i < ARRAY_SIZE(rot_info->plane); i++) {
13011301
sg = rotate_pages(obj, rot_info->plane[i].offset,
13021302
rot_info->plane[i].width, rot_info->plane[i].height,
1303-
rot_info->plane[i].stride, st, sg);
1303+
rot_info->plane[i].src_stride, st, sg);
13041304
}
13051305

13061306
return st;
@@ -1384,7 +1384,7 @@ intel_remap_pages(struct intel_remapped_info *rem_info,
13841384
for (i = 0 ; i < ARRAY_SIZE(rem_info->plane); i++) {
13851385
sg = remap_pages(obj, rem_info->plane[i].offset,
13861386
rem_info->plane[i].width, rem_info->plane[i].height,
1387-
rem_info->plane[i].stride, st, sg);
1387+
rem_info->plane[i].src_stride, st, sg);
13881388
}
13891389

13901390
i915_sg_trim(st);

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,23 +176,23 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
176176
seq_printf(m, ", rotated [(%ux%u, stride=%u, offset=%u), (%ux%u, stride=%u, offset=%u)]",
177177
vma->ggtt_view.rotated.plane[0].width,
178178
vma->ggtt_view.rotated.plane[0].height,
179-
vma->ggtt_view.rotated.plane[0].stride,
179+
vma->ggtt_view.rotated.plane[0].src_stride,
180180
vma->ggtt_view.rotated.plane[0].offset,
181181
vma->ggtt_view.rotated.plane[1].width,
182182
vma->ggtt_view.rotated.plane[1].height,
183-
vma->ggtt_view.rotated.plane[1].stride,
183+
vma->ggtt_view.rotated.plane[1].src_stride,
184184
vma->ggtt_view.rotated.plane[1].offset);
185185
break;
186186

187187
case I915_GGTT_VIEW_REMAPPED:
188188
seq_printf(m, ", remapped [(%ux%u, stride=%u, offset=%u), (%ux%u, stride=%u, offset=%u)]",
189189
vma->ggtt_view.remapped.plane[0].width,
190190
vma->ggtt_view.remapped.plane[0].height,
191-
vma->ggtt_view.remapped.plane[0].stride,
191+
vma->ggtt_view.remapped.plane[0].src_stride,
192192
vma->ggtt_view.remapped.plane[0].offset,
193193
vma->ggtt_view.remapped.plane[1].width,
194194
vma->ggtt_view.remapped.plane[1].height,
195-
vma->ggtt_view.remapped.plane[1].stride,
195+
vma->ggtt_view.remapped.plane[1].src_stride,
196196
vma->ggtt_view.remapped.plane[1].offset);
197197
break;
198198

drivers/gpu/drm/i915/i915_vma_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct intel_remapped_plane_info {
100100
u32 offset;
101101
u16 width;
102102
u16 height;
103-
u16 stride;
103+
u16 src_stride;
104104
u16 unused_mbz;
105105
} __packed;
106106

drivers/gpu/drm/i915/selftests/i915_vma.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static unsigned long rotated_index(const struct intel_rotation_info *r,
361361
unsigned int x,
362362
unsigned int y)
363363
{
364-
return (r->plane[n].stride * (r->plane[n].height - y - 1) +
364+
return (r->plane[n].src_stride * (r->plane[n].height - y - 1) +
365365
r->plane[n].offset + x);
366366
}
367367

@@ -411,7 +411,7 @@ static unsigned long remapped_index(const struct intel_remapped_info *r,
411411
unsigned int x,
412412
unsigned int y)
413413
{
414-
return (r->plane[n].stride * y +
414+
return (r->plane[n].src_stride * y +
415415
r->plane[n].offset + x);
416416
}
417417

@@ -479,21 +479,21 @@ static int igt_vma_rotate_remap(void *arg)
479479
struct i915_address_space *vm = &ggtt->vm;
480480
struct drm_i915_gem_object *obj;
481481
const struct intel_remapped_plane_info planes[] = {
482-
{ .width = 1, .height = 1, .stride = 1 },
483-
{ .width = 2, .height = 2, .stride = 2 },
484-
{ .width = 4, .height = 4, .stride = 4 },
485-
{ .width = 8, .height = 8, .stride = 8 },
482+
{ .width = 1, .height = 1, .src_stride = 1 },
483+
{ .width = 2, .height = 2, .src_stride = 2 },
484+
{ .width = 4, .height = 4, .src_stride = 4 },
485+
{ .width = 8, .height = 8, .src_stride = 8 },
486486

487-
{ .width = 3, .height = 5, .stride = 3 },
488-
{ .width = 3, .height = 5, .stride = 4 },
489-
{ .width = 3, .height = 5, .stride = 5 },
487+
{ .width = 3, .height = 5, .src_stride = 3 },
488+
{ .width = 3, .height = 5, .src_stride = 4 },
489+
{ .width = 3, .height = 5, .src_stride = 5 },
490490

491-
{ .width = 5, .height = 3, .stride = 5 },
492-
{ .width = 5, .height = 3, .stride = 7 },
493-
{ .width = 5, .height = 3, .stride = 9 },
491+
{ .width = 5, .height = 3, .src_stride = 5 },
492+
{ .width = 5, .height = 3, .src_stride = 7 },
493+
{ .width = 5, .height = 3, .src_stride = 9 },
494494

495-
{ .width = 4, .height = 6, .stride = 6 },
496-
{ .width = 6, .height = 4, .stride = 6 },
495+
{ .width = 4, .height = 6, .src_stride = 6 },
496+
{ .width = 6, .height = 4, .src_stride = 6 },
497497
{ }
498498
}, *a, *b;
499499
enum i915_ggtt_view_type types[] = {
@@ -523,8 +523,8 @@ static int igt_vma_rotate_remap(void *arg)
523523
struct intel_remapped_plane_info *plane_info = view.remapped.plane;
524524
unsigned int n, max_offset;
525525

526-
max_offset = max(plane_info[0].stride * plane_info[0].height,
527-
plane_info[1].stride * plane_info[1].height);
526+
max_offset = max(plane_info[0].src_stride * plane_info[0].height,
527+
plane_info[1].src_stride * plane_info[1].height);
528528
GEM_BUG_ON(max_offset > max_pages);
529529
max_offset = max_pages - max_offset;
530530

@@ -596,11 +596,11 @@ static int igt_vma_rotate_remap(void *arg)
596596
"rotated" : "remapped", n,
597597
plane_info[0].width,
598598
plane_info[0].height,
599-
plane_info[0].stride,
599+
plane_info[0].src_stride,
600600
plane_info[0].offset,
601601
plane_info[1].width,
602602
plane_info[1].height,
603-
plane_info[1].stride,
603+
plane_info[1].src_stride,
604604
plane_info[1].offset);
605605
err = -EINVAL;
606606
goto out_object;
@@ -853,21 +853,21 @@ static int igt_vma_remapped_gtt(void *arg)
853853
{
854854
struct drm_i915_private *i915 = arg;
855855
const struct intel_remapped_plane_info planes[] = {
856-
{ .width = 1, .height = 1, .stride = 1 },
857-
{ .width = 2, .height = 2, .stride = 2 },
858-
{ .width = 4, .height = 4, .stride = 4 },
859-
{ .width = 8, .height = 8, .stride = 8 },
856+
{ .width = 1, .height = 1, .src_stride = 1 },
857+
{ .width = 2, .height = 2, .src_stride = 2 },
858+
{ .width = 4, .height = 4, .src_stride = 4 },
859+
{ .width = 8, .height = 8, .src_stride = 8 },
860860

861-
{ .width = 3, .height = 5, .stride = 3 },
862-
{ .width = 3, .height = 5, .stride = 4 },
863-
{ .width = 3, .height = 5, .stride = 5 },
861+
{ .width = 3, .height = 5, .src_stride = 3 },
862+
{ .width = 3, .height = 5, .src_stride = 4 },
863+
{ .width = 3, .height = 5, .src_stride = 5 },
864864

865-
{ .width = 5, .height = 3, .stride = 5 },
866-
{ .width = 5, .height = 3, .stride = 7 },
867-
{ .width = 5, .height = 3, .stride = 9 },
865+
{ .width = 5, .height = 3, .src_stride = 5 },
866+
{ .width = 5, .height = 3, .src_stride = 7 },
867+
{ .width = 5, .height = 3, .src_stride = 9 },
868868

869-
{ .width = 4, .height = 6, .stride = 6 },
870-
{ .width = 6, .height = 4, .stride = 6 },
869+
{ .width = 4, .height = 6, .src_stride = 6 },
870+
{ .width = 6, .height = 4, .src_stride = 6 },
871871
{ }
872872
}, *p;
873873
enum i915_ggtt_view_type types[] = {

0 commit comments

Comments
 (0)