public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Subject: [PATCH i-g-t v2 7/9] tests/kms_plane_scaling: test scaler with clipping clamping, v2.
Date: Fri, 12 Jan 2018 11:21:14 +0100	[thread overview]
Message-ID: <20180112102116.4670-8-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20180112102116.4670-1-maarten.lankhorst@linux.intel.com>

From: Jyoti Yadav <jyoti.r.yadav@intel.com>

This patch adds subtest to test scaler clipping and clamping
scenario.

Changes since v1:
- Modify test to work with the changes to kms_plane_scaling. (Maarten)

Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_plane_scaling.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 821d0a9c883b..a0f6db9f96f8 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -412,6 +412,48 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe pipe, igt_output_t *output)
 	}
 }
 
+static void
+test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe, igt_output_t *output)
+{
+	drmModeModeInfo *mode;
+	igt_require(d->num_scalers);
+
+	/* Gen9 has single scaler in PIPEC */
+	igt_skip_on(intel_gen(d->devid) == 9 && pipe == PIPE_C);
+
+	mode = igt_output_get_mode(output);
+	d->plane1 = &d->display.pipes[pipe].planes[0];
+	prepare_crtc(d, output, pipe, d->plane1, mode);
+
+	igt_create_pattern_fb(d->drm_fd,
+			      mode->hdisplay, mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_I915_FORMAT_MOD_X_TILED, &d->fb[1]);
+
+	igt_create_pattern_fb(d->drm_fd,
+			      mode->hdisplay, mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_I915_FORMAT_MOD_Y_TILED, &d->fb[2]);
+
+	igt_plane_set_fb(d->plane1, &d->fb[1]);
+	d->plane2 = igt_output_get_plane(output, 1);
+	igt_plane_set_fb(d->plane2, &d->fb[2]);
+
+	igt_fb_set_position(&d->fb[1], d->plane1, 0, 0);
+	igt_fb_set_size(&d->fb[1], d->plane1, 300, 300);
+	igt_plane_set_position(d->plane1, 100, 400);
+	igt_fb_set_position(&d->fb[2], d->plane2, 0, 0);
+	igt_fb_set_size(&d->fb[2], d->plane2, 400, 400);
+	igt_plane_set_position(d->plane2, 100, 100);
+
+	/* scaled window size is outside the modeset area.*/
+	igt_plane_set_size(d->plane1, mode->hdisplay + 200,
+					    mode->vdisplay + 200);
+	igt_plane_set_size(d->plane2, mode->hdisplay + 100,
+					    mode->vdisplay + 100);
+	igt_display_commit2(&d->display, COMMIT_ATOMIC);
+}
+
 igt_main
 {
 	data_t data = {};
@@ -446,6 +488,9 @@ igt_main
 			for_each_valid_output_on_pipe(&data.display, pipe, output)
 				test_scaler_with_rotation_pipe(&data, pipe, output);
 
+		igt_subtest_f("pipe-%s-scaler-with-clipping-clamping", kmstest_pipe_name(pipe))
+			for_each_valid_output_on_pipe(&data.display, pipe, output)
+				test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
 	}
 
 	igt_fixture
-- 
2.15.1

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

  parent reply	other threads:[~2018-01-12 12:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 10:21 [PATCH i-g-t v2 0/9] kms plane scaling tests Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 1/9] tests/kms_plane: Run test for all supported pixel formats, v2 Maarten Lankhorst
2018-01-12 13:52   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 2/9] tests/kms_plane_scaling: Move the actual test to its own function Maarten Lankhorst
2018-01-15  8:47   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 3/9] tests/kms_plane_scaling: Fix basic scaling test, v2 Maarten Lankhorst
2018-01-15  9:01   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 4/9] tests/kms_plane_scaling: Convert from simple test to full test Maarten Lankhorst
2018-01-15  9:10   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 5/9] tests/kms_plane_scaling: Clean up tests to work better with igt_kms Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 6/9] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2 Maarten Lankhorst
2018-01-12 10:21 ` Maarten Lankhorst [this message]
2018-01-12 10:21 ` [PATCH i-g-t v2 8/9] lib/igt_kms: Add more braces around macros Maarten Lankhorst
2018-01-15 12:01   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 9/9] tests/kms_plane_scaling: test for multi pipe with scaling Maarten Lankhorst
2018-01-12 13:09 ` ✓ Fi.CI.BAT: success for kms plane scaling tests Patchwork
2018-01-12 13:58 ` ✓ Fi.CI.IGT: " Patchwork

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=20180112102116.4670-8-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vidya.srinivas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox