summaryrefslogtreecommitdiff
path: root/tests/i915/kms_flip_tiling.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-13 17:15:09 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-18 16:47:47 +0300
commit2c211c624f98768bea2d3373a88f9ac2a27aade8 (patch)
tree4faab87a70e2804e653a1493fe9727acb037942f /tests/i915/kms_flip_tiling.c
parent49d242f2a3024432e2d24c488e7e5d9bb940c693 (diff)
tests/i915/kms_flip_tiling: Drop ancient stride change restriction
The restriction on page flips not being able to change the stride was only relevant when i915 was still using CS flips. Ever since we switched to pure mmio there is no limitation on what a page flip can do (though the drm core still disallows pixel format changes). Reviewed-by: Karthik B S <karthik.b.s@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/i915/kms_flip_tiling.c')
-rw-r--r--tests/i915/kms_flip_tiling.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/tests/i915/kms_flip_tiling.c b/tests/i915/kms_flip_tiling.c
index 49ed7cb4..0ed08f78 100644
--- a/tests/i915/kms_flip_tiling.c
+++ b/tests/i915/kms_flip_tiling.c
@@ -72,7 +72,7 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t mo
igt_plane_t *primary;
igt_pipe_crc_t *pipe_crc;
igt_crc_t reference_crc, crc;
- int fb_id, ret, width;
+ int fb_id, ret;
pipe_crc = pipe_crc_new(data, pipe);
igt_output_set_pipe(output, pipe);
@@ -88,30 +88,17 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t mo
primary = igt_output_get_plane(output, 0);
- width = mode->hdisplay;
-
- if (modifier[0] != modifier[1] &&
- (modifier[0] != DRM_FORMAT_MOD_LINEAR ||
- modifier[1] != DRM_FORMAT_MOD_LINEAR)) {
- /*
- * Since a page flip to a buffer with different stride
- * doesn't work, choose width so that the stride of both
- * buffers is the same.
- */
- width = 512;
- while (width < mode->hdisplay)
- width *= 2;
- }
-
- fb_id = igt_create_pattern_fb(data->drm_fd, width, mode->vdisplay,
+ fb_id = igt_create_pattern_fb(data->drm_fd,
+ mode->hdisplay, mode->vdisplay,
data->testformat, modifier[0],
&data->fb[0]);
igt_assert(fb_id);
/* Second fb has different background so CRC does not match. */
- fb_id = igt_create_color_pattern_fb(data->drm_fd, width, mode->vdisplay,
- data->testformat, modifier[1],
- 0.5, 0.5, 0.5, &data->fb[1]);
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ data->testformat, modifier[1],
+ 0.5, 0.5, 0.5, &data->fb[1]);
igt_assert(fb_id);
/* Set the crtc and generate a reference CRC. */