From: Vidya Srinivas <vidya.srinivas@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@intel.com, Vidya Srinivas <vidya.srinivas@intel.com>
Subject: [PATCH i-g-t 5/6] i-g-t: kms_plane_scaling: test scaler with clipping clamping
Date: Wed, 13 Dec 2017 15:20:51 +0530 [thread overview]
Message-ID: <1513158652-8912-6-git-send-email-vidya.srinivas@intel.com> (raw)
In-Reply-To: <1513158652-8912-1-git-send-email-vidya.srinivas@intel.com>
From: Jyoti Yadav <jyoti.r.yadav@intel.com>
This patch adds subtest to test scaler clipping and clamping
scenario
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>
---
tests/kms_plane_scaling.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 3725d8e..b80cafb 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -480,6 +480,71 @@ static void test_plane_scaling(data_t *d, enum pipe pipe)
igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
}
+static void
+test_scaler_with_clipping_clamping_scenario(data_t *d, enum pipe pipe)
+{
+ igt_output_t *output;
+ igt_require(d->num_scalers);
+
+ for_each_valid_output_on_pipe(&d->display, pipe, output) {
+ drmModeModeInfo *mode;
+
+ /* Gen9 has single scaler in PIPEC */
+ if (intel_gen(d->devid) == 9 && pipe == PIPE_C)
+ continue;
+
+ igt_output_set_pipe(output, pipe);
+ mode = igt_output_get_mode(output);
+ d->fb_id2 = igt_create_pattern_fb(d->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_X_TILED,
+ &d->fb2);
+ igt_assert(d->fb_id2);
+
+ d->fb_id3 = igt_create_pattern_fb(d->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_I915_FORMAT_MOD_Y_TILED,
+ &d->fb3);
+ igt_assert(d->fb_id3);
+
+ d->plane1 = igt_output_get_plane(output, 0);
+ igt_plane_set_fb(d->plane1, &d->fb2);
+ d->plane2 = igt_output_get_plane(output, 1);
+ igt_plane_set_fb(d->plane2, &d->fb3);
+
+ igt_fb_set_position(&d->fb2, d->plane1, 0, 0);
+ igt_fb_set_size(&d->fb2, d->plane1, 300, 300);
+ igt_plane_set_position(d->plane1, 100, 400);
+ igt_fb_set_position(&d->fb3, d->plane2, 0, 0);
+ igt_fb_set_size(&d->fb3, 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);
+
+ /* disable above 2 planes */
+ igt_plane_set_fb(d->plane1, NULL);
+ igt_plane_set_position(d->plane1, 0, 0);
+ igt_plane_set_fb(d->plane2, NULL);
+ igt_plane_set_position(d->plane2, 0, 0);
+ if (d->fb_id2) {
+ igt_remove_fb(d->drm_fd, &d->fb2);
+ d->fb_id2 = 0;
+ }
+ if (d->fb_id3) {
+ igt_remove_fb(d->drm_fd, &d->fb3);
+ d->fb_id3 = 0;
+ }
+ igt_output_set_pipe(output, PIPE_ANY);
+ }
+}
+
igt_main
{
data_t data = {};
@@ -512,6 +577,10 @@ igt_main
test_scaler_with_rotation(&data, pipe);
}
+ igt_subtest_f("scaler_with_clipping_clamping") {
+ test_scaler_with_clipping_clamping_scenario(&data, pipe);
+ }
+
igt_fixture {
igt_display_fini(&data.display);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-12-13 9:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 9:50 [PATCH i-g-t 0/6] kms_plane_scaling fixes and enhancement Vidya Srinivas
2017-12-13 9:50 ` [PATCH i-g-t 1/6] i-g-t: kms_plane_scaling: Fix basic scaling test Vidya Srinivas
2018-01-04 14:56 ` Maarten Lankhorst
2018-01-05 3:45 ` Srinivas, Vidya
2017-12-13 9:50 ` [PATCH i-g-t 2/6] i-g-t: lib: Add plane pixel format support Vidya Srinivas
2018-01-09 12:10 ` Maarten Lankhorst
2018-01-09 12:32 ` Maarten Lankhorst
2017-12-13 9:50 ` [PATCH i-g-t 3/6] i-g-t: lib/igt_kms: Run kms_plane for all supported pixel formats Vidya Srinivas
2018-01-09 12:24 ` Maarten Lankhorst
2017-12-13 9:50 ` [PATCH i-g-t 4/6] i-g-t kms_plane_scaling: test scaling with tiling rotation and " Vidya Srinivas
2017-12-14 10:55 ` Daniel Vetter
2017-12-14 17:41 ` Srinivas, Vidya
2018-01-09 12:33 ` Maarten Lankhorst
2017-12-13 9:50 ` Vidya Srinivas [this message]
2017-12-13 9:50 ` [PATCH i-g-t 6/6] i-g-t: kms_plane_scaling: test for multi pipe with scaling Vidya Srinivas
2018-01-09 14:00 ` Maarten Lankhorst
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=1513158652-8912-6-git-send-email-vidya.srinivas@intel.com \
--to=vidya.srinivas@intel.com \
--cc=daniel.vetter@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