All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
@ 2020-11-18  8:14 Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property Pankaj Bharadiya
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Pankaj Bharadiya @ 2020-11-18  8:14 UTC (permalink / raw)
  To: gwan-gyeong.mun, igt-dev, jose.souza

Add new test for selective fetch

Pankaj Bharadiya (3):
  lib/kms: Add fb damage clip plane property
  lib/igt_psr: Add function to check PSR2 selective fetch
  tests: Add new PSR2 selective fetch test

 lib/igt_kms.c          |   3 +
 lib/igt_kms.h          |   1 +
 lib/igt_psr.c          |  10 +
 lib/igt_psr.h          |   1 +
 tests/Makefile.sources |   1 +
 tests/kms_psr2_sf.c    | 717 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 7 files changed, 734 insertions(+)
 create mode 100644 tests/kms_psr2_sf.c

-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property
  2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
@ 2020-11-18  8:14 ` Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch Pankaj Bharadiya
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Pankaj Bharadiya @ 2020-11-18  8:14 UTC (permalink / raw)
  To: gwan-gyeong.mun, igt-dev, jose.souza

FB_DAMAGE_CLIPS property is been in DRM for a while but was never
added to IGT.
Add support for FB_DAMAGE_CLIPS property so that kms tests can us it.

Reviewed-by: Jose Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 lib/igt_kms.c | 3 +++
 lib/igt_kms.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index e5d8e82c9..cf3b9355b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -396,6 +396,7 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_PIXEL_BLEND_MODE] = "pixel blend mode",
 	[IGT_PLANE_ALPHA] = "alpha",
 	[IGT_PLANE_ZPOS] = "zpos",
+	[IGT_PLANE_FB_DAMAGE_CLIPS] = "FB_DAMAGE_CLIPS",
 };
 
 const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
@@ -1775,6 +1776,8 @@ static void igt_plane_reset(igt_plane_t *plane)
 	if (igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
 		igt_plane_set_prop_value(plane, IGT_PLANE_ALPHA, 0xffff);
 
+	if (igt_plane_has_prop(plane, IGT_PLANE_FB_DAMAGE_CLIPS))
+		igt_plane_set_prop_value(plane, IGT_PLANE_FB_DAMAGE_CLIPS, 0);
 
 	igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD);
 	plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1fcae2436..09b10b3e0 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -281,6 +281,7 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_PIXEL_BLEND_MODE,
        IGT_PLANE_ALPHA,
        IGT_PLANE_ZPOS,
+       IGT_PLANE_FB_DAMAGE_CLIPS,
        IGT_NUM_PLANE_PROPS
 };
 
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch
  2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property Pankaj Bharadiya
@ 2020-11-18  8:14 ` Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test Pankaj Bharadiya
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Pankaj Bharadiya @ 2020-11-18  8:14 UTC (permalink / raw)
  To: gwan-gyeong.mun, igt-dev, jose.souza

Add a helper function to check whether "PSR2 selective fetch" is
enabled.
This function should be used wherever "PSR2 selective fetch"
status check needed.

Reviewed-by: Jose Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 lib/igt_psr.c | 10 ++++++++++
 lib/igt_psr.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 6cdb97bcc..d5167fbad 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -36,6 +36,16 @@ bool psr_disabled_check(int debugfs_fd)
 	return strstr(buf, "PSR mode: disabled\n");
 }
 
+bool psr2_selective_fetch_check(int debugfs_fd)
+{
+	char buf[PSR_STATUS_MAX_LEN];
+
+	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				sizeof(buf));
+
+	return strstr(buf, "PSR2 selective fetch: enabled");
+}
+
 static bool psr_active_check(int debugfs_fd, enum psr_mode mode)
 {
 	char buf[PSR_STATUS_MAX_LEN];
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 8368ecb49..25111cc2b 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -36,6 +36,7 @@ enum psr_mode {
 };
 
 bool psr_disabled_check(int debugfs_fd);
+bool psr2_selective_fetch_check(int debugfs_fd);
 bool psr_wait_entry(int debugfs_fd, enum psr_mode mode);
 bool psr_wait_update(int debugfs_fd, enum psr_mode mode);
 bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode);
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test
  2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property Pankaj Bharadiya
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch Pankaj Bharadiya
@ 2020-11-18  8:14 ` Pankaj Bharadiya
  2020-11-18 20:20   ` Souza, Jose
  2020-11-18 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Patchwork
  2020-11-18 15:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 1 reply; 11+ messages in thread
From: Pankaj Bharadiya @ 2020-11-18  8:14 UTC (permalink / raw)
  To: gwan-gyeong.mun, igt-dev, jose.souza

Selective fetch reduces display engine use of memory bandwidth
by only fetching (reading from memory) the updated regions of the frame
buffer and sending those updated regions to a panel with a PSR2 capability.

The FB_DAMAGE_CLIPS plane property provides user-space a way inform
kernel about the updated regions.

Add new test to verify selective fetch by using FB_DAMAGE_CLIPS property
to send  updated regions.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 tests/Makefile.sources |   1 +
 tests/kms_psr2_sf.c    | 717 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 719 insertions(+)
 create mode 100644 tests/kms_psr2_sf.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 96d835820..4e653c8b2 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -79,6 +79,7 @@ TESTS_progs = \
 	kms_properties \
 	kms_psr \
 	kms_psr2_su \
+	kms_psr2_sf \
 	kms_pwrite_crc \
 	kms_rmfb \
 	kms_rotation_crc \
diff --git a/tests/kms_psr2_sf.c b/tests/kms_psr2_sf.c
new file mode 100644
index 000000000..baa640851
--- /dev/null
+++ b/tests/kms_psr2_sf.c
@@ -0,0 +1,717 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "igt.h"
+#include "igt_sysfs.h"
+#include "igt_psr.h"
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include "intel_bufmgr.h"
+
+IGT_TEST_DESCRIPTION("Test PSR2 selective fetch");
+
+#define SQUARE_SIZE 100
+
+#define CUR_SIZE 64
+
+enum operations {
+	PLANE_UPDATE,
+	PLANE_MOVE,
+	OVERLAY_PRIM_UPDATE
+};
+
+enum plane_move_postion {
+	POS_TOP_LEFT,
+	POS_TOP_RIGHT,
+	POS_BOTTOM_LEFT,
+	POS_BOTTOM_RIGHT
+};
+
+typedef struct {
+	int drm_fd;
+	int debugfs_fd;
+	igt_display_t display;
+	drm_intel_bufmgr *bufmgr;
+	drmModeModeInfo *mode;
+	igt_output_t *output;
+	struct igt_fb fb[3];
+	int damage_area_count;
+	enum operations op;
+	enum plane_move_postion pos;
+	int test_plane_id;
+	igt_plane_t *test_plane;
+	cairo_t *cr;
+} data_t;
+
+static const char *op_str(enum operations op)
+{
+	static const char * const name[] = {
+		[PLANE_UPDATE] = "plane-update",
+		[PLANE_MOVE] = "plane-move",
+		[OVERLAY_PRIM_UPDATE] = "overlay-primary-update",
+	};
+
+	return name[op];
+}
+
+static void setup_output(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	igt_output_t *output;
+	enum pipe pipe;
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeConnectorPtr c = output->config.connector;
+
+		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+
+		igt_output_set_pipe(output, pipe);
+		data->output = output;
+		data->mode = igt_output_get_mode(output);
+
+		return;
+	}
+}
+
+static void display_init(data_t *data)
+{
+	igt_display_require(&data->display, data->drm_fd);
+	setup_output(data);
+}
+
+static void display_fini(data_t *data)
+{
+	igt_display_fini(&data->display);
+}
+
+static void draw_rect(data_t *data, igt_fb_t *fb, int x, int y, int w, int h,
+			double r, double g, double b, double a)
+{
+	cairo_t *cr;
+
+	cr = igt_get_cairo_ctx(data->drm_fd, fb);
+	igt_paint_color_alpha(cr, x, y, w, h, r, g, b, a);
+	igt_put_cairo_ctx(cr);
+}
+
+static void plane_update_paint_squares(data_t *data, igt_fb_t *fb, uint32_t h,
+				       uint32_t v)
+{
+
+	switch (data->damage_area_count) {
+	case 5:
+		/*Bottom right corner*/
+		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+	case 4:
+		/*Bottom left corner*/
+		draw_rect(data, fb, h - SQUARE_SIZE, 0,
+			  SQUARE_SIZE, SQUARE_SIZE,
+			  1.0, 1.0, 1.0, 1.0);
+	case 3:
+		/*Top right corner*/
+		draw_rect(data, fb, 0, v - SQUARE_SIZE,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+	case 2:
+		/*Top left corner*/
+		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
+			  1.0, 1.0, 1.0, 1.0);
+
+	case 1:
+		/*Center*/
+		draw_rect(data, fb, h/2 - SQUARE_SIZE/2, v/2 - SQUARE_SIZE/2,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+	}
+}
+
+static void plane_move_paint_square(data_t *data, igt_fb_t *fb, uint32_t h,
+				       uint32_t v)
+{
+
+	switch (data->pos) {
+	case POS_TOP_LEFT:
+		/*Bottom right corner*/
+		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+		break;
+	case POS_TOP_RIGHT:
+		/*Bottom left corner*/
+		draw_rect(data, fb, 0, v - SQUARE_SIZE,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+		break;
+	case POS_BOTTOM_LEFT:
+		/*Top right corner*/
+		draw_rect(data, fb, h - SQUARE_SIZE, 0,
+			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
+		break;
+	case POS_BOTTOM_RIGHT:
+		/*Top left corner*/
+		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
+			  1.0, 1.0, 1.0, 1.0);
+		break;
+	}
+}
+
+static struct drm_mode_rect *plane_update_setup_damage_areas(data_t *data,
+							     uint32_t h,
+							     uint32_t v)
+{
+	struct drm_mode_rect *clip;
+
+	if (data->test_plane_id == DRM_PLANE_TYPE_CURSOR) {
+		clip = (struct drm_mode_rect *) malloc(sizeof(struct
+							      drm_mode_rect));
+		igt_assert(clip);
+
+		clip->x1 = clip->y1 = 0;
+		clip->x2 = clip->y2 = CUR_SIZE;
+
+	} else {
+		clip = (struct drm_mode_rect *) malloc(sizeof(struct
+							      drm_mode_rect) *
+						       data->damage_area_count);
+		igt_assert(clip);
+
+		switch (data->damage_area_count) {
+		case 5:
+			/*Bottom right corner*/
+			clip[4].x1 = h - SQUARE_SIZE;
+			clip[4].y1 = v - SQUARE_SIZE;
+			clip[4].x2 = clip[4].x1 + SQUARE_SIZE;
+			clip[4].y2 = clip[4].y1 + SQUARE_SIZE;
+		case 4:
+			/*Bottom left corner*/
+			clip[3].x1 = h - SQUARE_SIZE;
+			clip[3].y1 = 0;
+			clip[3].x2 = clip[3].x1 + SQUARE_SIZE;
+			clip[3].y2 = clip[3].y1 + SQUARE_SIZE;
+		case 3:
+			/*Top right corner*/
+			clip[2].x1 = 0;
+			clip[2].y1 = v - SQUARE_SIZE;
+			clip[2].x2 = clip[2].x1 + SQUARE_SIZE;
+			clip[2].y2 = clip[2].y1 + SQUARE_SIZE;
+		case 2:
+			/*Top left corner*/
+			clip[1].x1 = 0;
+			clip[1].y1 = 0;
+			clip[1].x2 = clip[1].x1 + SQUARE_SIZE;
+			clip[1].y2 = clip[1].y1 + SQUARE_SIZE;
+
+		case 1:
+			/*Center*/
+			clip[0].x1 = h/2 - SQUARE_SIZE/2;
+			clip[0].y1 = v/2 - SQUARE_SIZE/2;
+			clip[0].x2 = clip[0].x1 + SQUARE_SIZE;
+			clip[0].y2 = clip[0].y1 + SQUARE_SIZE;
+		}
+	}
+
+	return clip;
+}
+
+static struct drm_mode_rect *plane_move_setup_damage_area(data_t *data,
+							  uint32_t h,
+							  uint32_t v)
+{
+	struct drm_mode_rect *clip;
+
+	clip = (struct drm_mode_rect *) malloc(sizeof(struct drm_mode_rect));
+	igt_assert(clip);
+
+	switch (data->pos) {
+	case POS_TOP_LEFT:
+		/*Bottom right corner*/
+		clip->x1 = h - SQUARE_SIZE;
+		clip->y1 = v - SQUARE_SIZE;
+		clip->x2 = clip->x1 + SQUARE_SIZE;
+		clip->y2 = clip->y1 + SQUARE_SIZE;
+
+		break;
+	case POS_TOP_RIGHT:
+		/*Bottom left corner*/
+		clip->x1 = h - SQUARE_SIZE;
+		clip->y1 = 0;
+		clip->x2 = clip->x1 + SQUARE_SIZE;
+		clip->y2 = clip->y1 + SQUARE_SIZE;
+
+		break;
+	case POS_BOTTOM_LEFT:
+		/*Top right corner*/
+		clip->x1 = 0;
+		clip->y1 = v - SQUARE_SIZE;
+		clip->x2 = clip->x1 + SQUARE_SIZE;
+		clip->y2 = clip->y1 + SQUARE_SIZE;
+
+		break;
+	case POS_BOTTOM_RIGHT:
+		/*Top left corner*/
+		clip->x1 = 0;
+		clip->y1 = 0;
+		clip->x2 = clip->x1 + SQUARE_SIZE;
+		clip->y2 = clip->y1 + SQUARE_SIZE;
+	}
+
+	return clip;
+}
+
+static void free_damage_areas(struct drm_mode_rect *clip)
+{
+	if (!clip)
+		return;
+
+	free(clip);
+}
+
+static void prepare(data_t *data)
+{
+	igt_plane_t *primary, *sprite = NULL, *cursor = NULL;
+
+	/* all green frame */
+	igt_create_color_fb(data->drm_fd,
+			    data->mode->hdisplay, data->mode->vdisplay,
+			    DRM_FORMAT_XRGB8888,
+			    LOCAL_DRM_FORMAT_MOD_NONE,
+			    0.0, 1.0, 0.0,
+			    &data->fb[0]);
+
+	primary = igt_output_get_plane_type(data->output,
+			DRM_PLANE_TYPE_PRIMARY);
+
+	switch (data->test_plane_id) {
+	case DRM_PLANE_TYPE_OVERLAY:
+		sprite = igt_output_get_plane_type(data->output,
+						   DRM_PLANE_TYPE_OVERLAY);
+		/*All blue plane*/
+		igt_create_color_fb(data->drm_fd,
+				    data->mode->hdisplay/2,
+				    data->mode->vdisplay/2,
+				    DRM_FORMAT_XRGB8888,
+				    LOCAL_DRM_FORMAT_MOD_NONE,
+				    0.0, 0.0, 1.0,
+				    &data->fb[1]);
+
+		igt_create_color_fb(data->drm_fd,
+				    data->mode->hdisplay/2,
+				    data->mode->vdisplay/2,
+				    DRM_FORMAT_XRGB8888,
+				    LOCAL_DRM_FORMAT_MOD_NONE,
+				    0.0, 0.0, 1.0,
+				    &data->fb[2]);
+
+		if (data->op == PLANE_MOVE) {
+			plane_move_paint_square(data, &data->fb[2],
+					   data->mode->hdisplay/2,
+					   data->mode->vdisplay/2);
+
+		} else {
+			plane_update_paint_squares(data, &data->fb[2],
+					   data->mode->hdisplay/2,
+					   data->mode->vdisplay/2);
+		}
+
+		igt_plane_set_fb(sprite, &data->fb[1]);
+		data->test_plane = sprite;
+		break;
+
+	case DRM_PLANE_TYPE_PRIMARY:
+		igt_create_color_fb(data->drm_fd,
+			    data->mode->hdisplay, data->mode->vdisplay,
+			    DRM_FORMAT_XRGB8888,
+			    LOCAL_DRM_FORMAT_MOD_NONE,
+			    0.0, 1.0, 0.0,
+			    &data->fb[2]);
+
+		plane_update_paint_squares(data, &data->fb[2],
+					   data->mode->hdisplay,
+					   data->mode->vdisplay);
+		data->test_plane = primary;
+
+		if (data->op == OVERLAY_PRIM_UPDATE) {
+			sprite = igt_output_get_plane_type(data->output,
+						   DRM_PLANE_TYPE_OVERLAY);
+
+			igt_create_color_fb(data->drm_fd,
+					    data->mode->hdisplay,
+					    data->mode->vdisplay,
+					    DRM_FORMAT_XRGB8888,
+					    LOCAL_DRM_FORMAT_MOD_NONE,
+					    0.0, 0.0, 1.0,
+					    &data->fb[1]);
+
+			igt_plane_set_fb(sprite, &data->fb[1]);
+			igt_plane_set_prop_value(sprite, IGT_PLANE_ALPHA,
+						 0x6060);
+		}
+		break;
+
+	case DRM_PLANE_TYPE_CURSOR:
+		cursor = igt_output_get_plane_type(data->output,
+						   DRM_PLANE_TYPE_CURSOR);
+		igt_plane_set_position(cursor, 0, 0);
+
+		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
+			      DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb[1]);
+
+		draw_rect(data, &data->fb[1], 0, 0, CUR_SIZE, CUR_SIZE,
+			    0.0, 0.0, 1.0, 1.0);
+
+		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
+			      DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb[2]);
+
+		draw_rect(data, &data->fb[2], 0, 0, CUR_SIZE, CUR_SIZE,
+			    1.0, 1.0, 1.0, 1.0);
+
+		igt_plane_set_fb(cursor, &data->fb[1]);
+		data->test_plane = cursor;
+		break;
+	}
+
+	igt_plane_set_fb(primary, &data->fb[0]);
+
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+}
+
+static inline void manual(const char *expected)
+{
+	igt_debug_manual_check("all", expected);
+}
+
+static void plane_update_expected_output(int plane_type, int box_count)
+{
+	char expected[64] = {};
+
+	switch (plane_type) {
+	case DRM_PLANE_TYPE_PRIMARY:
+		sprintf(expected, "screen Green with %d White box(es)",
+			box_count);
+		break;
+	case DRM_PLANE_TYPE_OVERLAY:
+		sprintf(expected,
+			"screen Green with Blue box and %d White box(es)",
+			box_count);
+		break;
+	case DRM_PLANE_TYPE_CURSOR:
+		sprintf(expected, "screen Green with %d White box(es)",
+			box_count);
+		break;
+	}
+
+	manual(expected);
+}
+
+static void plane_move_expected_output(enum plane_move_postion pos)
+{
+	char expected[64] = {};
+
+	switch (pos) {
+	case POS_TOP_LEFT:
+		sprintf(expected,
+			"screen Green with Blue box on top left corner and White box");
+		break;
+	case POS_TOP_RIGHT:
+		sprintf(expected,
+			"screen Green with Blue box on top right corner and White box");
+		break;
+	case POS_BOTTOM_LEFT:
+		sprintf(expected,
+			"screen Green with Blue box on bottom left corner and White box");
+		break;
+	case POS_BOTTOM_RIGHT:
+		sprintf(expected,
+			"screen Green with Blue box on bottom right corner and White box");
+		break;
+	}
+
+	manual(expected);
+}
+
+static void overlay_prim_update_expected_output(int box_count)
+{
+	char expected[64] = {};
+
+	sprintf(expected,
+		"screen Green with Blue overlay, %d light Blue box(es)",
+		box_count);
+
+	manual(expected);
+
+}
+
+static void expected_output(data_t *data)
+{
+	switch (data->op) {
+	case PLANE_MOVE:
+		plane_move_expected_output(data->pos);
+		break;
+	case PLANE_UPDATE:
+		plane_update_expected_output(data->test_plane_id,
+					     data->damage_area_count);
+		break;
+	case OVERLAY_PRIM_UPDATE:
+		overlay_prim_update_expected_output(data->damage_area_count);
+		break;
+	}
+}
+
+static void damaged_plane_move(data_t *data)
+{
+	igt_plane_t *test_plane = data->test_plane;
+	struct drm_mode_rect *clip;
+	uint32_t h = data->mode->hdisplay;
+	uint32_t v = data->mode->vdisplay;
+
+	igt_plane_set_fb(test_plane, &data->fb[2]);
+
+	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
+		h = h/2;
+		v = v/2;
+	}
+
+	clip = plane_move_setup_damage_area(data, h, v);
+	igt_plane_replace_prop_blob(test_plane, IGT_PLANE_FB_DAMAGE_CLIPS, clip,
+				    sizeof(struct drm_mode_rect));
+
+	switch (data->pos) {
+	case POS_TOP_LEFT:
+		igt_plane_set_position(data->test_plane, 0, 0);
+		break;
+	case POS_TOP_RIGHT:
+		igt_plane_set_position(data->test_plane,
+				       data->mode->hdisplay/2, 0);
+		break;
+	case POS_BOTTOM_LEFT:
+		igt_plane_set_position(data->test_plane, 0,
+				       data->mode->vdisplay/2);
+		break;
+	case POS_BOTTOM_RIGHT:
+		igt_plane_set_position(data->test_plane,
+				       data->mode->hdisplay/2,
+				       data->mode->vdisplay/2);
+		break;
+	}
+
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
+
+	expected_output(data);
+
+	free_damage_areas(clip);
+}
+
+static void damaged_plane_update(data_t *data)
+{
+	igt_plane_t *test_plane = data->test_plane;
+	struct drm_mode_rect *clip;
+	uint32_t h = data->mode->hdisplay;
+	uint32_t v = data->mode->vdisplay;
+
+	igt_plane_set_fb(test_plane, &data->fb[2]);
+
+	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
+		h = h/2;
+		v = v/2;
+	}
+
+	clip = plane_update_setup_damage_areas(data, h, v);
+	igt_plane_replace_prop_blob(test_plane, IGT_PLANE_FB_DAMAGE_CLIPS, clip,
+				    sizeof(struct drm_mode_rect)*
+				    data->damage_area_count);
+	igt_plane_set_position(data->test_plane, 0, 0);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
+
+	expected_output(data);
+
+	free_damage_areas(clip);
+}
+
+static void update_screen_and_test(data_t *data)
+{
+	switch (data->op) {
+	case PLANE_UPDATE:
+	case OVERLAY_PRIM_UPDATE:
+		damaged_plane_update(data);
+		break;
+	case PLANE_MOVE:
+		damaged_plane_move(data);
+		break;
+	}
+}
+
+static void screen_reset(data_t  *data)
+{
+	igt_plane_t *test_plane = data->test_plane;
+
+	if (data->test_plane_id == DRM_PLANE_TYPE_PRIMARY)
+		igt_plane_set_fb(test_plane, &data->fb[0]);
+	else
+		igt_plane_set_fb(test_plane, &data->fb[1]);
+
+	igt_plane_set_position(data->test_plane, 0, 0);
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+}
+
+static void run(data_t *data)
+{
+	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
+
+	screen_reset(data);
+	update_screen_and_test(data);
+}
+
+static void cleanup(data_t *data)
+{
+	igt_plane_t *primary;
+	igt_plane_t *sprite;
+
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+
+	igt_plane_set_fb(primary, NULL);
+
+	if (data->test_plane_id != DRM_PLANE_TYPE_PRIMARY) {
+		igt_plane_set_position(data->test_plane, 0, 0);
+		igt_plane_set_fb(data->test_plane, NULL);
+	}
+
+	if (data->op == OVERLAY_PRIM_UPDATE) {
+		sprite = igt_output_get_plane_type(data->output,
+				DRM_PLANE_TYPE_OVERLAY);
+		igt_plane_set_position(sprite, 0, 0);
+		igt_plane_set_fb(sprite, NULL);
+	}
+
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+	igt_remove_fb(data->drm_fd, &data->fb[0]);
+	igt_remove_fb(data->drm_fd, &data->fb[1]);
+	igt_remove_fb(data->drm_fd, &data->fb[2]);
+}
+
+igt_main
+{
+	data_t data = {};
+	int i;
+
+	igt_fixture {
+		int r;
+
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
+		kmstest_set_vt_graphics_mode();
+
+		igt_require_f(psr_sink_support(data.drm_fd,
+					       data.debugfs_fd, PSR_MODE_2),
+			      "Sink does not support PSR2\n");
+
+		igt_require_f(psr2_selective_fetch_check(data.debugfs_fd),
+			      "PSR2 selective fetch not enabled\n");
+
+		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
+		igt_assert(data.bufmgr);
+		drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
+
+		display_init(&data);
+
+		/* Test if PSR2 can be enabled */
+		igt_require_f(psr_enable(data.drm_fd,
+					 data.debugfs_fd, PSR_MODE_2),
+			      "Error enabling PSR2\n");
+
+		data.damage_area_count = 5;
+		data.op = PLANE_UPDATE;
+		data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+		prepare(&data);
+		r = psr_wait_entry(data.debugfs_fd, PSR_MODE_2);
+		cleanup(&data);
+		if (!r)
+			psr_print_debugfs(data.debugfs_fd);
+		igt_require_f(r, "PSR2 can not be enabled\n");
+	}
+
+	for (i = 1; i <= 5; i++) {
+		igt_subtest_f("primary-%s-sf-%d", op_str(data.op), i) {
+			data.damage_area_count = i;
+			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+			prepare(&data);
+			run(&data);
+			cleanup(&data);
+		}
+	}
+
+	for (i = 1; i <= 5; i++) {
+		igt_subtest_f("overlay-%s-sf-%d", op_str(data.op), i) {
+			data.damage_area_count = i;
+			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+			prepare(&data);
+			run(&data);
+			cleanup(&data);
+		}
+	}
+
+	igt_subtest_f("cursor-%s-sf", op_str(data.op)) {
+		data.damage_area_count = 1;
+		data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
+		prepare(&data);
+		run(&data);
+		cleanup(&data);
+	}
+
+	/* Only for overlay plane */
+	data.op = PLANE_MOVE;
+	for (i = POS_TOP_LEFT; i <= POS_BOTTOM_RIGHT ; i++) {
+		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
+			data.pos = i;
+			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
+			prepare(&data);
+			run(&data);
+			cleanup(&data);
+		}
+	}
+
+	data.op = OVERLAY_PRIM_UPDATE;
+	for (i = 1; i <= 5; i++) {
+		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
+			data.damage_area_count = i;
+			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
+			prepare(&data);
+			run(&data);
+			cleanup(&data);
+		}
+	}
+
+	igt_fixture {
+		close(data.debugfs_fd);
+		drm_intel_bufmgr_destroy(data.bufmgr);
+		display_fini(&data);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index cc79ac228..b33cfb63f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -63,6 +63,7 @@ test_progs = [
 	'kms_properties',
 	'kms_psr',
 	'kms_psr2_su',
+	'kms_psr2_sf',
 	'kms_pwrite_crc',
 	'kms_rmfb',
 	'kms_rotation_crc',
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
  2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
                   ` (2 preceding siblings ...)
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test Pankaj Bharadiya
@ 2020-11-18 10:10 ` Patchwork
  2020-11-18 15:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-11-18 10:10 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 6229 bytes --]

== Series Details ==

Series: Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
URL   : https://patchwork.freedesktop.org/series/84014/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9350 -> IGTPW_5184
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html

Known issues
------------

  Here are the changes found in IGTPW_5184 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-tgl-u2:          [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html

  * igt@gem_exec_suspend@basic-s0:
    - fi-bsw-kefka:       [PASS][3] -> [INCOMPLETE][4] ([i915#2539])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-bsw-kefka/igt@gem_exec_suspend@basic-s0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-bsw-kefka/igt@gem_exec_suspend@basic-s0.html

  * igt@gem_linear_blits@basic:
    - fi-tgl-y:           [PASS][5] -> [DMESG-WARN][6] ([i915#402])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-tgl-y/igt@gem_linear_blits@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-tgl-y/igt@gem_linear_blits@basic.html

  * igt@kms_busy@basic@flip:
    - fi-kbl-soraka:      [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-kbl-soraka/igt@kms_busy@basic@flip.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-kbl-soraka/igt@kms_busy@basic@flip.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
    - fi-icl-u2:          [PASS][9] -> [DMESG-WARN][10] ([i915#1982]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html

  
#### Possible fixes ####

  * igt@kms_busy@basic@flip:
    - {fi-kbl-7560u}:     [DMESG-WARN][11] ([i915#1982]) -> [PASS][12] +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-kbl-7560u/igt@kms_busy@basic@flip.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-kbl-7560u/igt@kms_busy@basic@flip.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-cml-u2:          [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-cml-u2/igt@kms_chamelium@dp-crc-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-cml-u2/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-byt-j1900:       [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-byt-j1900/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-byt-j1900/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
    - fi-icl-u2:          [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-c:
    - fi-tgl-y:           [DMESG-WARN][19] ([i915#1982]) -> [PASS][20] +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-tgl-y/igt@kms_pipe_crc_basic@read-crc-pipe-c.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-tgl-y/igt@kms_pipe_crc_basic@read-crc-pipe-c.html

  * igt@vgem_basic@setversion:
    - fi-tgl-y:           [DMESG-WARN][21] ([i915#402]) -> [PASS][22] +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/fi-tgl-y/igt@vgem_basic@setversion.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/fi-tgl-y/igt@vgem_basic@setversion.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2539]: https://gitlab.freedesktop.org/drm/intel/issues/2539
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (45 -> 41)
------------------------------

  Missing    (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5855 -> IGTPW_5184

  CI-20190529: 20190529
  CI_DRM_9350: 3161d1b26b7e1a7cb9146e3f8bd613f901ff5b38 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5184: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html
  IGT_5855: d9b3c7058efe41e5224dd1e43fac05dc6d049380 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_psr2_sf@cursor-plane-update-sf
+igt@kms_psr2_sf@overlay-plane-update-sf-1
+igt@kms_psr2_sf@overlay-plane-update-sf-2
+igt@kms_psr2_sf@overlay-plane-update-sf-3
+igt@kms_psr2_sf@overlay-plane-update-sf-4
+igt@kms_psr2_sf@overlay-plane-update-sf-5
+igt@kms_psr2_sf@overlay-primary-update-sf-1
+igt@kms_psr2_sf@overlay-primary-update-sf-2
+igt@kms_psr2_sf@overlay-primary-update-sf-3
+igt@kms_psr2_sf@overlay-primary-update-sf-4
+igt@kms_psr2_sf@overlay-primary-update-sf-5
+igt@kms_psr2_sf@plane-move-sf-0
+igt@kms_psr2_sf@plane-move-sf-1
+igt@kms_psr2_sf@plane-move-sf-2
+igt@kms_psr2_sf@plane-move-sf-3
+igt@kms_psr2_sf@primary-plane-update-sf-1
+igt@kms_psr2_sf@primary-plane-update-sf-2
+igt@kms_psr2_sf@primary-plane-update-sf-3
+igt@kms_psr2_sf@primary-plane-update-sf-4
+igt@kms_psr2_sf@primary-plane-update-sf-5

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html

[-- Attachment #1.2: Type: text/html, Size: 7770 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
  2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
                   ` (3 preceding siblings ...)
  2020-11-18 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Patchwork
@ 2020-11-18 15:33 ` Patchwork
  4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-11-18 15:33 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 30275 bytes --]

== Series Details ==

Series: Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
URL   : https://patchwork.freedesktop.org/series/84014/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9350_full -> IGTPW_5184_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_5184_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_psr2_sf@cursor-plane-update-sf} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][1] +19 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb1/igt@kms_psr2_sf@cursor-plane-update-sf.html

  * {igt@kms_psr2_sf@overlay-plane-update-sf-1} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][2] +19 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb7/igt@kms_psr2_sf@overlay-plane-update-sf-1.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9350_full and IGTPW_5184_full:

### New IGT tests (20) ###

  * igt@kms_psr2_sf@cursor-plane-update-sf:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-plane-update-sf-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-plane-update-sf-2:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-plane-update-sf-3:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-plane-update-sf-4:
    - Statuses : 6 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-plane-update-sf-5:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-primary-update-sf-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-primary-update-sf-2:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-primary-update-sf-3:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-primary-update-sf-4:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@overlay-primary-update-sf-5:
    - Statuses : 6 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@plane-move-sf-0:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@plane-move-sf-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@plane-move-sf-2:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@plane-move-sf-3:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@primary-plane-update-sf-1:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@primary-plane-update-sf-2:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@primary-plane-update-sf-3:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@primary-plane-update-sf-4:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_psr2_sf@primary-plane-update-sf-5:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in IGTPW_5184_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@hotrebind-lateclose:
    - shard-snb:          [PASS][3] -> [INCOMPLETE][4] ([i915#1037])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-snb6/igt@core_hotunplug@hotrebind-lateclose.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-snb2/igt@core_hotunplug@hotrebind-lateclose.html

  * igt@core_hotunplug@unbind-rebind:
    - shard-tglb:         [PASS][5] -> [DMESG-WARN][6] ([i915#1982]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb6/igt@core_hotunplug@unbind-rebind.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb7/igt@core_hotunplug@unbind-rebind.html

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-hsw:          [PASS][7] -> [FAIL][8] ([i915#2389])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw8/igt@gem_exec_reloc@basic-many-active@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw2/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_exec_whisper@basic-forked-all:
    - shard-hsw:          [PASS][9] -> [FAIL][10] ([i915#1888])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw7/igt@gem_exec_whisper@basic-forked-all.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw7/igt@gem_exec_whisper@basic-forked-all.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-glk:          [PASS][11] -> [FAIL][12] ([i915#644])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk6/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk5/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([i915#579])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb8/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb6/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen:
    - shard-kbl:          [PASS][15] -> [FAIL][16] ([i915#54])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl2/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl7/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
    - shard-apl:          [PASS][17] -> [FAIL][18] ([i915#1635] / [i915#54])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl4/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl4/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
    - shard-glk:          [PASS][19] -> [FAIL][20] ([i915#54])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk8/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk7/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html

  * igt@kms_cursor_edge_walk@pipe-b-256x256-left-edge:
    - shard-glk:          [PASS][21] -> [DMESG-WARN][22] ([i915#1982]) +5 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk3/igt@kms_cursor_edge_walk@pipe-b-256x256-left-edge.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk9/igt@kms_cursor_edge_walk@pipe-b-256x256-left-edge.html

  * igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
    - shard-apl:          [PASS][23] -> [DMESG-WARN][24] ([i915#1635] / [i915#1982]) +8 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl8/igt@kms_cursor_legacy@basic-flip-before-cursor-atomic.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl6/igt@kms_cursor_legacy@basic-flip-before-cursor-atomic.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-tglb:         [PASS][25] -> [FAIL][26] ([i915#2598])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb8/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb5/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu:
    - shard-kbl:          [PASS][27] -> [DMESG-WARN][28] ([i915#1982]) +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl4/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-iclb:         [PASS][29] -> [INCOMPLETE][30] ([i915#1185] / [i915#250])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
    - shard-apl:          [PASS][31] -> [INCOMPLETE][32] ([i915#1635] / [i915#2635])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
    - shard-glk:          [PASS][33] -> [INCOMPLETE][34] ([i915#2635])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk9/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk8/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
    - shard-hsw:          [PASS][35] -> [INCOMPLETE][36] ([i915#2055] / [i915#2637])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
    - shard-kbl:          [PASS][37] -> [INCOMPLETE][38] ([i915#155])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [PASS][39] -> [SKIP][40] ([fdo#109642] / [fdo#111068])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb6/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][41] -> [SKIP][42] ([fdo#109441])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb1/igt@kms_psr@psr2_cursor_render.html

  * igt@perf@gen12-oa-tlb-invalidate:
    - shard-tglb:         [PASS][43] -> [SKIP][44] ([i915#1354]) +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb8/igt@perf@gen12-oa-tlb-invalidate.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb8/igt@perf@gen12-oa-tlb-invalidate.html

  * igt@perf@low-oa-exponent-permissions:
    - shard-apl:          [PASS][45] -> [SKIP][46] ([fdo#109271] / [i915#1354] / [i915#1635])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl1/igt@perf@low-oa-exponent-permissions.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl3/igt@perf@low-oa-exponent-permissions.html
    - shard-iclb:         [PASS][47] -> [SKIP][48] ([i915#1354])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb3/igt@perf@low-oa-exponent-permissions.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb3/igt@perf@low-oa-exponent-permissions.html
    - shard-kbl:          [PASS][49] -> [SKIP][50] ([fdo#109271] / [i915#1354])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl6/igt@perf@low-oa-exponent-permissions.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl4/igt@perf@low-oa-exponent-permissions.html
    - shard-hsw:          [PASS][51] -> [SKIP][52] ([fdo#109271])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw7/igt@perf@low-oa-exponent-permissions.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw7/igt@perf@low-oa-exponent-permissions.html
    - shard-glk:          [PASS][53] -> [SKIP][54] ([fdo#109271] / [i915#1354])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk1/igt@perf@low-oa-exponent-permissions.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk4/igt@perf@low-oa-exponent-permissions.html

  * igt@perf_pmu@module-unload:
    - shard-iclb:         [PASS][55] -> [DMESG-WARN][56] ([i915#1982] / [i915#262])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb7/igt@perf_pmu@module-unload.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb5/igt@perf_pmu@module-unload.html

  
#### Possible fixes ####

  * igt@gem_eio@kms:
    - shard-hsw:          [INCOMPLETE][57] ([i915#1888] / [i915#2244]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw2/igt@gem_eio@kms.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw7/igt@gem_eio@kms.html

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-glk:          [FAIL][59] ([i915#2389]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk3/igt@gem_exec_reloc@basic-many-active@rcs0.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk2/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_exec_suspend@basic-s3:
    - shard-glk:          [FAIL][61] -> [PASS][62] +1 similar issue
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk6/igt@gem_exec_suspend@basic-s3.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk5/igt@gem_exec_suspend@basic-s3.html
    - shard-kbl:          [DMESG-WARN][63] ([i915#180]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl2/igt@gem_exec_suspend@basic-s3.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl6/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_softpin@noreloc-s3:
    - shard-iclb:         [INCOMPLETE][65] ([i915#1373] / [i915#2405]) -> [PASS][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb4/igt@gem_softpin@noreloc-s3.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb3/igt@gem_softpin@noreloc-s3.html
    - shard-apl:          [INCOMPLETE][67] ([i915#1635] / [i915#2405] / [i915#2635]) -> [PASS][68]
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl4/igt@gem_softpin@noreloc-s3.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl8/igt@gem_softpin@noreloc-s3.html
    - shard-glk:          [INCOMPLETE][69] ([i915#2199] / [i915#2405] / [i915#2635]) -> [PASS][70]
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk6/igt@gem_softpin@noreloc-s3.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk5/igt@gem_softpin@noreloc-s3.html
    - shard-hsw:          [INCOMPLETE][71] ([i915#2405] / [i915#2637]) -> [PASS][72]
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw1/igt@gem_softpin@noreloc-s3.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw1/igt@gem_softpin@noreloc-s3.html
    - shard-kbl:          [INCOMPLETE][73] ([i915#2405]) -> [PASS][74]
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl1/igt@gem_softpin@noreloc-s3.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl6/igt@gem_softpin@noreloc-s3.html

  * {igt@kms_async_flips@test-time-stamp}:
    - shard-tglb:         [FAIL][75] ([i915#2597]) -> [PASS][76]
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb1/igt@kms_async_flips@test-time-stamp.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb3/igt@kms_async_flips@test-time-stamp.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-0:
    - shard-kbl:          [DMESG-WARN][77] ([i915#1982]) -> [PASS][78]
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl1/igt@kms_big_fb@y-tiled-64bpp-rotate-0.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl3/igt@kms_big_fb@y-tiled-64bpp-rotate-0.html

  * igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions:
    - shard-snb:          [FAIL][79] -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-snb6/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-snb7/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html

  * igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled:
    - shard-apl:          [DMESG-WARN][81] ([i915#1635] / [i915#1982]) -> [PASS][82] +5 similar issues
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl7/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl8/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled.html
    - shard-glk:          [DMESG-WARN][83] ([i915#1982]) -> [PASS][84] +4 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk6/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled.html
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk2/igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled.html

  * igt@kms_flip@dpms-off-confusion@a-vga1:
    - shard-hsw:          [DMESG-WARN][85] ([i915#1982]) -> [PASS][86] +1 similar issue
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw6/igt@kms_flip@dpms-off-confusion@a-vga1.html
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw2/igt@kms_flip@dpms-off-confusion@a-vga1.html

  * igt@kms_frontbuffer_tracking@fbc-badstride:
    - shard-iclb:         [DMESG-WARN][87] ([i915#1982]) -> [PASS][88] +1 similar issue
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-badstride.html
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-badstride.html

  * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
    - shard-tglb:         [DMESG-WARN][89] ([i915#1982]) -> [PASS][90] +3 similar issues
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb2/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb3/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt.html

  * igt@kms_plane@plane-position-hole-dpms-pipe-b-planes:
    - shard-kbl:          [FAIL][91] ([i915#2472]) -> [PASS][92]
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl3/igt@kms_plane@plane-position-hole-dpms-pipe-b-planes.html
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl6/igt@kms_plane@plane-position-hole-dpms-pipe-b-planes.html
    - shard-apl:          [FAIL][93] ([i915#1635] / [i915#2472]) -> [PASS][94]
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl3/igt@kms_plane@plane-position-hole-dpms-pipe-b-planes.html
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl8/igt@kms_plane@plane-position-hole-dpms-pipe-b-planes.html

  * igt@perf@oa-exponents:
    - shard-tglb:         [SKIP][95] ([i915#1354]) -> [PASS][96]
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb8/igt@perf@oa-exponents.html
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb2/igt@perf@oa-exponents.html
    - shard-glk:          [SKIP][97] ([fdo#109271] / [i915#1354]) -> [PASS][98]
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk5/igt@perf@oa-exponents.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk7/igt@perf@oa-exponents.html
    - shard-apl:          [SKIP][99] ([fdo#109271] / [i915#1354] / [i915#1635]) -> [PASS][100]
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl8/igt@perf@oa-exponents.html
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl4/igt@perf@oa-exponents.html
    - shard-kbl:          [SKIP][101] ([fdo#109271] / [i915#1354]) -> [PASS][102]
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl1/igt@perf@oa-exponents.html
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl7/igt@perf@oa-exponents.html
    - shard-iclb:         [SKIP][103] ([i915#1354]) -> [PASS][104]
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb5/igt@perf@oa-exponents.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb7/igt@perf@oa-exponents.html
    - shard-hsw:          [SKIP][105] ([fdo#109271]) -> [PASS][106]
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw6/igt@perf@oa-exponents.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw1/igt@perf@oa-exponents.html

  
#### Warnings ####

  * igt@gem_softpin@noreloc-s3:
    - shard-tglb:         [DMESG-WARN][107] ([i915#1436]) -> [DMESG-WARN][108] ([i915#2411])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb7/igt@gem_softpin@noreloc-s3.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb2/igt@gem_softpin@noreloc-s3.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - shard-tglb:         [DMESG-WARN][109] ([i915#2411]) -> [SKIP][110] ([i915#579])
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb8/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb1/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         [DMESG-WARN][111] ([i915#1226]) -> [SKIP][112] ([fdo#109349])
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb8/igt@kms_dp_dsc@basic-dsc-enable-edp.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-tglb:         [DMESG-WARN][113] ([i915#2411]) -> [INCOMPLETE][114] ([i915#1436] / [i915#1798] / [i915#1982] / [i915#456])
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@perf@gen12-oa-tlb-invalidate:
    - shard-kbl:          [SKIP][115] ([fdo#109271]) -> [SKIP][116] ([fdo#109271] / [i915#1354])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-kbl6/igt@perf@gen12-oa-tlb-invalidate.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-kbl4/igt@perf@gen12-oa-tlb-invalidate.html
    - shard-glk:          [SKIP][117] ([fdo#109271]) -> [SKIP][118] ([fdo#109271] / [i915#1354])
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk3/igt@perf@gen12-oa-tlb-invalidate.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk4/igt@perf@gen12-oa-tlb-invalidate.html
    - shard-apl:          [SKIP][119] ([fdo#109271] / [i915#1635]) -> [SKIP][120] ([fdo#109271] / [i915#1354] / [i915#1635])
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl2/igt@perf@gen12-oa-tlb-invalidate.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl3/igt@perf@gen12-oa-tlb-invalidate.html
    - shard-iclb:         [SKIP][121] ([fdo#109289]) -> [SKIP][122] ([i915#1354])
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb8/igt@perf@gen12-oa-tlb-invalidate.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb3/igt@perf@gen12-oa-tlb-invalidate.html

  * igt@runner@aborted:
    - shard-hsw:          [FAIL][123] ([i915#2295] / [i915#2439] / [i915#483]) -> [FAIL][124] ([i915#2295] / [i915#483])
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-hsw1/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-hsw1/igt@runner@aborted.html
    - shard-iclb:         ([FAIL][125], [FAIL][126]) ([i915#2295] / [i915#2439] / [i915#483]) -> ([FAIL][127], [FAIL][128]) ([i915#1814] / [i915#2295] / [i915#2439] / [i915#483])
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb5/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-iclb4/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb6/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-iclb4/igt@runner@aborted.html
    - shard-apl:          ([FAIL][129], [FAIL][130]) ([i915#1611] / [i915#1635] / [i915#2295] / [i915#2439]) -> ([FAIL][131], [FAIL][132]) ([i915#1611] / [i915#1635] / [i915#1814] / [i915#2295] / [i915#2439])
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl2/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-apl4/igt@runner@aborted.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl2/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-apl6/igt@runner@aborted.html
    - shard-glk:          ([FAIL][133], [FAIL][134]) ([i915#1611] / [i915#2295] / [i915#2439] / [i915#86] / [k.org#202321]) -> ([FAIL][135], [FAIL][136]) ([i915#1611] / [i915#1814] / [i915#2295] / [i915#2439] / [k.org#202321])
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk2/igt@runner@aborted.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-glk6/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk8/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-glk6/igt@runner@aborted.html
    - shard-tglb:         ([FAIL][137], [FAIL][138]) ([i915#2295] / [i915#2439]) -> ([FAIL][139], [FAIL][140]) ([i915#1814] / [i915#2295] / [i915#2439])
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb7/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9350/shard-tglb2/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb3/igt@runner@aborted.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/shard-tglb1/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [i915#1037]: https://gitlab.freedesktop.org/drm/intel/issues/1037
  [i915#1185]: https://gitlab.freedesktop.org/drm/intel/issues/1185
  [i915#1226]: https://gitlab.freedesktop.org/drm/intel/issues/1226
  [i915#1354]: https://gitlab.freedesktop.org/drm/intel/issues/1354
  [i915#1373]: https://gitlab.freedesktop.org/drm/intel/issues/1373
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#1611]: https://gitlab.freedesktop.org/drm/intel/issues/1611
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#1798]: https://gitlab.freedesktop.org/drm/intel/issues/1798
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2055]: https://gitlab.freedesktop.org/drm/intel/issues/2055
  [i915#2199]: https://gitlab.freedesktop.org/drm/intel/issues/2199
  [i915#2244]: https://gitlab.freedesktop.org/drm/intel/issues/2244
  [i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
  [i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
  [i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
  [i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
  [i915#2439]: https://gitlab.freedesktop.org/drm/intel/issues/2439
  [i915#2472]: https://gitlab.freedesktop.org/drm/intel/issues/2472
  [i915#250]: https://gitlab.freedesktop.org/drm/intel/issues/250
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#2597]: https://gitlab.freedesktop.org/drm/intel/issues/2597
  [i915#2598]: https://gitlab.freedesktop.org/drm/intel/issues/2598
  [i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
  [i915#2635]: https://gitlab.freedesktop.org/drm/intel/issues/2635
  [i915#2637]: https://gitlab.freedesktop.org/drm/intel/issues/2637
  [i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
  [i915#483]: https://gitlab.freedesktop.org/drm/intel/issues/483
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
  [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
  [i915#86]: https://gitlab.freedesktop.org/drm/intel/issues/86
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


Participating hosts (10 -> 8)
------------------------------

  Missing    (2): pig-skl-6260u pig-glk-j5005 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5855 -> IGTPW_5184
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_9350: 3161d1b26b7e1a7cb9146e3f8bd613f901ff5b38 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5184: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html
  IGT_5855: d9b3c7058efe41e5224dd1e43fac05dc6d049380 @ git://anongit.freed

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5184/index.html

[-- Attachment #1.2: Type: text/html, Size: 39247 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test
  2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test Pankaj Bharadiya
@ 2020-11-18 20:20   ` Souza, Jose
  2020-11-19 18:36     ` Laxminarayan Bharadiya, Pankaj
  0 siblings, 1 reply; 11+ messages in thread
From: Souza, Jose @ 2020-11-18 20:20 UTC (permalink / raw)
  To: Laxminarayan Bharadiya, Pankaj, Mun, Gwan-gyeong, igt-dev

On Wed, 2020-11-18 at 13:44 +0530, Pankaj Bharadiya wrote:
> Selective fetch reduces display engine use of memory bandwidth
> by only fetching (reading from memory) the updated regions of the frame
> buffer and sending those updated regions to a panel with a PSR2 capability.
> 
> The FB_DAMAGE_CLIPS plane property provides user-space a way inform
> kernel about the updated regions.
> 
> Add new test to verify selective fetch by using FB_DAMAGE_CLIPS property
> to send  updated regions.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  tests/Makefile.sources |   1 +
>  tests/kms_psr2_sf.c    | 717 +++++++++++++++++++++++++++++++++++++++++
>  tests/meson.build      |   1 +
>  3 files changed, 719 insertions(+)
>  create mode 100644 tests/kms_psr2_sf.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 96d835820..4e653c8b2 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -79,6 +79,7 @@ TESTS_progs = \
>  	kms_properties \
>  	kms_psr \
>  	kms_psr2_su \
> +	kms_psr2_sf \
>  	kms_pwrite_crc \
>  	kms_rmfb \
>  	kms_rotation_crc \
> diff --git a/tests/kms_psr2_sf.c b/tests/kms_psr2_sf.c
> new file mode 100644
> index 000000000..baa640851
> --- /dev/null
> +++ b/tests/kms_psr2_sf.c
> @@ -0,0 +1,717 @@
> +/*
> + * Copyright © 2020 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include "igt.h"
> +#include "igt_sysfs.h"
> +#include "igt_psr.h"
> +#include <errno.h>
> +#include <stdbool.h>
> +#include <stdio.h>
> +#include <string.h>
> +#include "intel_bufmgr.h"
> +
> +IGT_TEST_DESCRIPTION("Test PSR2 selective fetch");
> +
> +#define SQUARE_SIZE 100
> +
> +#define CUR_SIZE 64
> +
> +enum operations {
> +	PLANE_UPDATE,
> +	PLANE_MOVE,
> +	OVERLAY_PRIM_UPDATE
> +};
> +
> +enum plane_move_postion {
> +	POS_TOP_LEFT,
> +	POS_TOP_RIGHT,
> +	POS_BOTTOM_LEFT,
> +	POS_BOTTOM_RIGHT
> +};
> +
> +typedef struct {
> +	int drm_fd;
> +	int debugfs_fd;
> +	igt_display_t display;
> +	drm_intel_bufmgr *bufmgr;
> +	drmModeModeInfo *mode;
> +	igt_output_t *output;
> +	struct igt_fb fb[3];
> +	int damage_area_count;
> +	enum operations op;
> +	enum plane_move_postion pos;
> +	int test_plane_id;
> +	igt_plane_t *test_plane;
> +	cairo_t *cr;
> +} data_t;
> +
> +static const char *op_str(enum operations op)
> +{
> +	static const char * const name[] = {
> +		[PLANE_UPDATE] = "plane-update",
> +		[PLANE_MOVE] = "plane-move",
> +		[OVERLAY_PRIM_UPDATE] = "overlay-primary-update",
> +	};
> +
> +	return name[op];
> +}
> +
> +static void setup_output(data_t *data)
> +{
> +	igt_display_t *display = &data->display;
> +	igt_output_t *output;
> +	enum pipe pipe;
> +
> +	for_each_pipe_with_valid_output(display, pipe, output) {
> +		drmModeConnectorPtr c = output->config.connector;
> +
> +		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> +			continue;
> +
> +		igt_output_set_pipe(output, pipe);
> +		data->output = output;
> +		data->mode = igt_output_get_mode(output);
> +
> +		return;
> +	}
> +}
> +
> +static void display_init(data_t *data)
> +{
> +	igt_display_require(&data->display, data->drm_fd);
> +	setup_output(data);
> +}
> +
> +static void display_fini(data_t *data)
> +{
> +	igt_display_fini(&data->display);
> +}
> +
> +static void draw_rect(data_t *data, igt_fb_t *fb, int x, int y, int w, int h,
> +			double r, double g, double b, double a)
> +{
> +	cairo_t *cr;
> +
> +	cr = igt_get_cairo_ctx(data->drm_fd, fb);
> +	igt_paint_color_alpha(cr, x, y, w, h, r, g, b, a);
> +	igt_put_cairo_ctx(cr);
> +}
> +
> +static void plane_update_paint_squares(data_t *data, igt_fb_t *fb, uint32_t h,
> +				       uint32_t v)
> +{
> +
> +	switch (data->damage_area_count) {
> +	case 5:
> +		/*Bottom right corner*/
> +		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +	case 4:
> +		/*Bottom left corner*/
> +		draw_rect(data, fb, h - SQUARE_SIZE, 0,
> +			  SQUARE_SIZE, SQUARE_SIZE,
> +			  1.0, 1.0, 1.0, 1.0);
> +	case 3:
> +		/*Top right corner*/
> +		draw_rect(data, fb, 0, v - SQUARE_SIZE,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +	case 2:
> +		/*Top left corner*/
> +		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
> +			  1.0, 1.0, 1.0, 1.0);
> +
> +	case 1:
> +		/*Center*/
> +		draw_rect(data, fb, h/2 - SQUARE_SIZE/2, v/2 - SQUARE_SIZE/2,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +	}

Want to see a damage clip being set every time you draw in the fb, together calls. Even better if you set int x, y, w and h variables and reuse to it
to call draw_rect() and set clips(clip[x].x2 = clip[x].x1 + w);

Also you are only setting the damage area of the places you are drawing to, you need also to mark the regions of the previous fb that was draw and in
the new fb have the background color, example:

FB0
|------|
|O     |
|      |
--------

FB1
|------|
|      |
|      |
--------

When flipping to FB1 you need to mark as damaged the region that had a 0 but now is only background.

> +}
> +
> +static void plane_move_paint_square(data_t *data, igt_fb_t *fb, uint32_t h,
> +				       uint32_t v)
> +{
> +
> +	switch (data->pos) {
> +	case POS_TOP_LEFT:
> +		/*Bottom right corner*/
> +		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +		break;
> +	case POS_TOP_RIGHT:
> +		/*Bottom left corner*/
> +		draw_rect(data, fb, 0, v - SQUARE_SIZE,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +		break;
> +	case POS_BOTTOM_LEFT:
> +		/*Top right corner*/
> +		draw_rect(data, fb, h - SQUARE_SIZE, 0,
> +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> +		break;
> +	case POS_BOTTOM_RIGHT:
> +		/*Top left corner*/
> +		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
> +			  1.0, 1.0, 1.0, 1.0);
> +		break;
> +	}
> +}
> +
> +static struct drm_mode_rect *plane_update_setup_damage_areas(data_t *data,
> +							     uint32_t h,
> +							     uint32_t v)
> +{
> +	struct drm_mode_rect *clip;
> +
> +	if (data->test_plane_id == DRM_PLANE_TYPE_CURSOR) {
> +		clip = (struct drm_mode_rect *) malloc(sizeof(struct
> +							      drm_mode_rect));
> +		igt_assert(clip);
> +
> +		clip->x1 = clip->y1 = 0;
> +		clip->x2 = clip->y2 = CUR_SIZE;
> +
> +	} else {
> +		clip = (struct drm_mode_rect *) malloc(sizeof(struct
> +							      drm_mode_rect) *
> +						       data->damage_area_count);

alloc enough clips for all tests in stack and reuse in every update.


> +		igt_assert(clip);
> +
> +		switch (data->damage_area_count) {
> +		case 5:
> +			/*Bottom right corner*/
> +			clip[4].x1 = h - SQUARE_SIZE;
> +			clip[4].y1 = v - SQUARE_SIZE;
> +			clip[4].x2 = clip[4].x1 + SQUARE_SIZE;
> +			clip[4].y2 = clip[4].y1 + SQUARE_SIZE;
> +		case 4:
> +			/*Bottom left corner*/
> +			clip[3].x1 = h - SQUARE_SIZE;
> +			clip[3].y1 = 0;
> +			clip[3].x2 = clip[3].x1 + SQUARE_SIZE;
> +			clip[3].y2 = clip[3].y1 + SQUARE_SIZE;
> +		case 3:
> +			/*Top right corner*/
> +			clip[2].x1 = 0;
> +			clip[2].y1 = v - SQUARE_SIZE;
> +			clip[2].x2 = clip[2].x1 + SQUARE_SIZE;
> +			clip[2].y2 = clip[2].y1 + SQUARE_SIZE;
> +		case 2:
> +			/*Top left corner*/
> +			clip[1].x1 = 0;
> +			clip[1].y1 = 0;
> +			clip[1].x2 = clip[1].x1 + SQUARE_SIZE;
> +			clip[1].y2 = clip[1].y1 + SQUARE_SIZE;
> +
> +		case 1:
> +			/*Center*/
> +			clip[0].x1 = h/2 - SQUARE_SIZE/2;
> +			clip[0].y1 = v/2 - SQUARE_SIZE/2;
> +			clip[0].x2 = clip[0].x1 + SQUARE_SIZE;
> +			clip[0].y2 = clip[0].y1 + SQUARE_SIZE;
> +		}
> +	}
> +
> +	return clip;
> +}
> +
> +static struct drm_mode_rect *plane_move_setup_damage_area(data_t *data,
> +							  uint32_t h,
> +							  uint32_t v)
> +{
> +	struct drm_mode_rect *clip;
> +
> +	clip = (struct drm_mode_rect *) malloc(sizeof(struct drm_mode_rect));
> +	igt_assert(clip);
> +
> +	switch (data->pos) {
> +	case POS_TOP_LEFT:
> +		/*Bottom right corner*/
> +		clip->x1 = h - SQUARE_SIZE;
> +		clip->y1 = v - SQUARE_SIZE;
> +		clip->x2 = clip->x1 + SQUARE_SIZE;
> +		clip->y2 = clip->y1 + SQUARE_SIZE;
> +
> +		break;
> +	case POS_TOP_RIGHT:
> +		/*Bottom left corner*/
> +		clip->x1 = h - SQUARE_SIZE;
> +		clip->y1 = 0;
> +		clip->x2 = clip->x1 + SQUARE_SIZE;
> +		clip->y2 = clip->y1 + SQUARE_SIZE;
> +
> +		break;
> +	case POS_BOTTOM_LEFT:
> +		/*Top right corner*/
> +		clip->x1 = 0;
> +		clip->y1 = v - SQUARE_SIZE;
> +		clip->x2 = clip->x1 + SQUARE_SIZE;
> +		clip->y2 = clip->y1 + SQUARE_SIZE;
> +
> +		break;
> +	case POS_BOTTOM_RIGHT:
> +		/*Top left corner*/
> +		clip->x1 = 0;
> +		clip->y1 = 0;
> +		clip->x2 = clip->x1 + SQUARE_SIZE;
> +		clip->y2 = clip->y1 + SQUARE_SIZE;
> +	}
> +
> +	return clip;
> +}
> +
> +static void free_damage_areas(struct drm_mode_rect *clip)
> +{
> +	if (!clip)
> +		return;
> +
> +	free(clip);
> +}
> +
> +static void prepare(data_t *data)
> +{
> +	igt_plane_t *primary, *sprite = NULL, *cursor = NULL;
> +
> +	/* all green frame */
> +	igt_create_color_fb(data->drm_fd,
> +			    data->mode->hdisplay, data->mode->vdisplay,
> +			    DRM_FORMAT_XRGB8888,
> +			    LOCAL_DRM_FORMAT_MOD_NONE,
> +			    0.0, 1.0, 0.0,
> +			    &data->fb[0]);
> +
> +	primary = igt_output_get_plane_type(data->output,
> +			DRM_PLANE_TYPE_PRIMARY);
> +
> +	switch (data->test_plane_id) {
> +	case DRM_PLANE_TYPE_OVERLAY:
> +		sprite = igt_output_get_plane_type(data->output,
> +						   DRM_PLANE_TYPE_OVERLAY);
> +		/*All blue plane*/
> +		igt_create_color_fb(data->drm_fd,
> +				    data->mode->hdisplay/2,
> +				    data->mode->vdisplay/2,
> +				    DRM_FORMAT_XRGB8888,
> +				    LOCAL_DRM_FORMAT_MOD_NONE,
> +				    0.0, 0.0, 1.0,
> +				    &data->fb[1]);

Kinda of confusing data->fb, add data->fb_primary[], data->fb_overlay[] and data->fb_cursor[].

> +
> +		igt_create_color_fb(data->drm_fd,
> +				    data->mode->hdisplay/2,
> +				    data->mode->vdisplay/2,
> +				    DRM_FORMAT_XRGB8888,
> +				    LOCAL_DRM_FORMAT_MOD_NONE,
> +				    0.0, 0.0, 1.0,
> +				    &data->fb[2]);
> +
> +		if (data->op == PLANE_MOVE) {
> +			plane_move_paint_square(data, &data->fb[2],
> +					   data->mode->hdisplay/2,
> +					   data->mode->vdisplay/2);
> +
> +		} else {
> +			plane_update_paint_squares(data, &data->fb[2],
> +					   data->mode->hdisplay/2,
> +					   data->mode->vdisplay/2);
> +		}
> +
> +		igt_plane_set_fb(sprite, &data->fb[1]);
> +		data->test_plane = sprite;
> +		break;
> +
> +	case DRM_PLANE_TYPE_PRIMARY:
> +		igt_create_color_fb(data->drm_fd,
> +			    data->mode->hdisplay, data->mode->vdisplay,
> +			    DRM_FORMAT_XRGB8888,
> +			    LOCAL_DRM_FORMAT_MOD_NONE,
> +			    0.0, 1.0, 0.0,
> +			    &data->fb[2]);
> +
> +		plane_update_paint_squares(data, &data->fb[2],
> +					   data->mode->hdisplay,
> +					   data->mode->vdisplay);
> +		data->test_plane = primary;
> +
> +		if (data->op == OVERLAY_PRIM_UPDATE) {
> +			sprite = igt_output_get_plane_type(data->output,
> +						   DRM_PLANE_TYPE_OVERLAY);
> +
> +			igt_create_color_fb(data->drm_fd,
> +					    data->mode->hdisplay,
> +					    data->mode->vdisplay,
> +					    DRM_FORMAT_XRGB8888,
> +					    LOCAL_DRM_FORMAT_MOD_NONE,
> +					    0.0, 0.0, 1.0,
> +					    &data->fb[1]);
> +
> +			igt_plane_set_fb(sprite, &data->fb[1]);
> +			igt_plane_set_prop_value(sprite, IGT_PLANE_ALPHA,
> +						 0x6060);
> +		}
> +		break;
> +
> +	case DRM_PLANE_TYPE_CURSOR:
> +		cursor = igt_output_get_plane_type(data->output,
> +						   DRM_PLANE_TYPE_CURSOR);
> +		igt_plane_set_position(cursor, 0, 0);
> +
> +		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
> +			      DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb[1]);
> +
> +		draw_rect(data, &data->fb[1], 0, 0, CUR_SIZE, CUR_SIZE,
> +			    0.0, 0.0, 1.0, 1.0);
> +
> +		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
> +			      DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb[2]);
> +
> +		draw_rect(data, &data->fb[2], 0, 0, CUR_SIZE, CUR_SIZE,
> +			    1.0, 1.0, 1.0, 1.0);
> +
> +		igt_plane_set_fb(cursor, &data->fb[1]);
> +		data->test_plane = cursor;
> +		break;
> +	}
> +
> +	igt_plane_set_fb(primary, &data->fb[0]);
> +
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +}
> +
> +static inline void manual(const char *expected)
> +{
> +	igt_debug_manual_check("all", expected);
> +}
> +
> +static void plane_update_expected_output(int plane_type, int box_count)
> +{
> +	char expected[64] = {};
> +
> +	switch (plane_type) {
> +	case DRM_PLANE_TYPE_PRIMARY:
> +		sprintf(expected, "screen Green with %d White box(es)",
> +			box_count);
> +		break;
> +	case DRM_PLANE_TYPE_OVERLAY:
> +		sprintf(expected,
> +			"screen Green with Blue box and %d White box(es)",
> +			box_count);
> +		break;
> +	case DRM_PLANE_TYPE_CURSOR:
> +		sprintf(expected, "screen Green with %d White box(es)",
> +			box_count);
> +		break;
> +	}
> +
> +	manual(expected);
> +}
> +
> +static void plane_move_expected_output(enum plane_move_postion pos)
> +{
> +	char expected[64] = {};
> +
> +	switch (pos) {
> +	case POS_TOP_LEFT:
> +		sprintf(expected,
> +			"screen Green with Blue box on top left corner and White box");
> +		break;
> +	case POS_TOP_RIGHT:
> +		sprintf(expected,
> +			"screen Green with Blue box on top right corner and White box");
> +		break;
> +	case POS_BOTTOM_LEFT:
> +		sprintf(expected,
> +			"screen Green with Blue box on bottom left corner and White box");
> +		break;
> +	case POS_BOTTOM_RIGHT:
> +		sprintf(expected,
> +			"screen Green with Blue box on bottom right corner and White box");
> +		break;
> +	}
> +
> +	manual(expected);
> +}
> +
> +static void overlay_prim_update_expected_output(int box_count)
> +{
> +	char expected[64] = {};
> +
> +	sprintf(expected,
> +		"screen Green with Blue overlay, %d light Blue box(es)",
> +		box_count);
> +
> +	manual(expected);
> +
> +}
> +
> +static void expected_output(data_t *data)
> +{
> +	switch (data->op) {
> +	case PLANE_MOVE:
> +		plane_move_expected_output(data->pos);
> +		break;
> +	case PLANE_UPDATE:
> +		plane_update_expected_output(data->test_plane_id,
> +					     data->damage_area_count);
> +		break;
> +	case OVERLAY_PRIM_UPDATE:
> +		overlay_prim_update_expected_output(data->damage_area_count);
> +		break;
> +	}
> +}
> +
> +static void damaged_plane_move(data_t *data)
> +{
> +	igt_plane_t *test_plane = data->test_plane;
> +	struct drm_mode_rect *clip;
> +	uint32_t h = data->mode->hdisplay;
> +	uint32_t v = data->mode->vdisplay;
> +
> +	igt_plane_set_fb(test_plane, &data->fb[2]);
> +
> +	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
> +		h = h/2;
> +		v = v/2;
> +	}
> +
> +	clip = plane_move_setup_damage_area(data, h, v);

This property is in relation to the plane, this damage areas you are setting in the function makes no sense.
When moving a plane or set the whole visible plane area as damaged or nothing(it should be one of the cases handled by driver).

> +	igt_plane_replace_prop_blob(test_plane, IGT_PLANE_FB_DAMAGE_CLIPS, clip,
> +				    sizeof(struct drm_mode_rect));
> +
> +	switch (data->pos) {
> +	case POS_TOP_LEFT:
> +		igt_plane_set_position(data->test_plane, 0, 0);
> +		break;
> +	case POS_TOP_RIGHT:
> +		igt_plane_set_position(data->test_plane,
> +				       data->mode->hdisplay/2, 0);
> +		break;
> +	case POS_BOTTOM_LEFT:
> +		igt_plane_set_position(data->test_plane, 0,
> +				       data->mode->vdisplay/2);
> +		break;
> +	case POS_BOTTOM_RIGHT:
> +		igt_plane_set_position(data->test_plane,
> +				       data->mode->hdisplay/2,
> +				       data->mode->vdisplay/2);
> +		break;
> +	}
> +
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> +
> +	expected_output(data);
> +
> +	free_damage_areas(clip);
> +}
> +
> +static void damaged_plane_update(data_t *data)
> +{
> +	igt_plane_t *test_plane = data->test_plane;
> +	struct drm_mode_rect *clip;
> +	uint32_t h = data->mode->hdisplay;
> +	uint32_t v = data->mode->vdisplay;
> +
> +	igt_plane_set_fb(test_plane, &data->fb[2]);
> +
> +	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
> +		h = h/2;
> +		v = v/2;
> +	}
> +
> +	clip = plane_update_setup_damage_areas(data, h, v);
> +	igt_plane_replace_prop_blob(test_plane, IGT_PLANE_FB_DAMAGE_CLIPS, clip,
> +				    sizeof(struct drm_mode_rect)*
> +				    data->damage_area_count);
> +	igt_plane_set_position(data->test_plane, 0, 0);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> +
> +	expected_output(data);
> +
> +	free_damage_areas(clip);
> +}
> +
> +static void update_screen_and_test(data_t *data)
> +{
> +	switch (data->op) {
> +	case PLANE_UPDATE:
> +	case OVERLAY_PRIM_UPDATE:
> +		damaged_plane_update(data);
> +		break;
> +	case PLANE_MOVE:
> +		damaged_plane_move(data);
> +		break;
> +	}
> +}
> +
> +static void screen_reset(data_t  *data)
> +{
> +	igt_plane_t *test_plane = data->test_plane;
> +
> +	if (data->test_plane_id == DRM_PLANE_TYPE_PRIMARY)
> +		igt_plane_set_fb(test_plane, &data->fb[0]);
> +	else
> +		igt_plane_set_fb(test_plane, &data->fb[1]);
> +
> +	igt_plane_set_position(data->test_plane, 0, 0);
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +}
> +
> +static void run(data_t *data)
> +{
> +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> +
> +	screen_reset(data);

why you need this if you have committed already in the prepare()?

> +	update_screen_and_test(data);

Content of this function could be moved to here.


> +}
> +
> +static void cleanup(data_t *data)
> +{
> +	igt_plane_t *primary;
> +	igt_plane_t *sprite;
> +
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +
> +	igt_plane_set_fb(primary, NULL);
> +
> +	if (data->test_plane_id != DRM_PLANE_TYPE_PRIMARY) {
> +		igt_plane_set_position(data->test_plane, 0, 0);
> +		igt_plane_set_fb(data->test_plane, NULL);
> +	}
> +
> +	if (data->op == OVERLAY_PRIM_UPDATE) {
> +		sprite = igt_output_get_plane_type(data->output,
> +				DRM_PLANE_TYPE_OVERLAY);
> +		igt_plane_set_position(sprite, 0, 0);
> +		igt_plane_set_fb(sprite, NULL);
> +	}
> +
> +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> +	igt_remove_fb(data->drm_fd, &data->fb[0]);
> +	igt_remove_fb(data->drm_fd, &data->fb[1]);
> +	igt_remove_fb(data->drm_fd, &data->fb[2]);
> +}
> +
> +igt_main
> +{
> +	data_t data = {};
> +	int i;
> +
> +	igt_fixture {
> +		int r;
> +
> +		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> +		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> +		kmstest_set_vt_graphics_mode();
> +
> +		igt_require_f(psr_sink_support(data.drm_fd,
> +					       data.debugfs_fd, PSR_MODE_2),
> +			      "Sink does not support PSR2\n");
> +
> +		igt_require_f(psr2_selective_fetch_check(data.debugfs_fd),
> +			      "PSR2 selective fetch not enabled\n");
> +
> +		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> +		igt_assert(data.bufmgr);
> +		drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
> +
> +		display_init(&data);
> +
> +		/* Test if PSR2 can be enabled */
> +		igt_require_f(psr_enable(data.drm_fd,
> +					 data.debugfs_fd, PSR_MODE_2),
> +			      "Error enabling PSR2\n");
> +
> +		data.damage_area_count = 5;
> +		data.op = PLANE_UPDATE;
> +		data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +		prepare(&data);
> +		r = psr_wait_entry(data.debugfs_fd, PSR_MODE_2);
> +		cleanup(&data);
> +		if (!r)
> +			psr_print_debugfs(data.debugfs_fd);
> +		igt_require_f(r, "PSR2 can not be enabled\n");
> +	}
> +

Missing some description of what each subtest will, also a better name.
What we will see in CI would be: primary-plane-update-sf-5, 5 what?

> +	for (i = 1; i <= 5; i++) {
> +		igt_subtest_f("primary-%s-sf-%d", op_str(data.op), i) {
> +			data.damage_area_count = i;
> +			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +			prepare(&data);
> +			run(&data);
> +			cleanup(&data);
> +		}
> +	}
> +
> +	for (i = 1; i <= 5; i++) {
> +		igt_subtest_f("overlay-%s-sf-%d", op_str(data.op), i) {
> +			data.damage_area_count = i;
> +			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> +			prepare(&data);
> +			run(&data);
> +			cleanup(&data);
> +		}
> +	}
> +
> +	igt_subtest_f("cursor-%s-sf", op_str(data.op)) {
> +		data.damage_area_count = 1;
> +		data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
> +		prepare(&data);
> +		run(&data);
> +		cleanup(&data);
> +	}
> +
> +	/* Only for overlay plane */
> +	data.op = PLANE_MOVE;
> +	for (i = POS_TOP_LEFT; i <= POS_BOTTOM_RIGHT ; i++) {
> +		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
> +			data.pos = i;
> +			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> +			prepare(&data);
> +			run(&data);
> +			cleanup(&data);
> +		}
> +	}
> +
> +	data.op = OVERLAY_PRIM_UPDATE;
> +	for (i = 1; i <= 5; i++) {
> +		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
> +			data.damage_area_count = i;
> +			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> +			prepare(&data);
> +			run(&data);
> +			cleanup(&data);
> +		}
> +	}
> +
> +	igt_fixture {
> +		close(data.debugfs_fd);
> +		drm_intel_bufmgr_destroy(data.bufmgr);
> +		display_fini(&data);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index cc79ac228..b33cfb63f 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -63,6 +63,7 @@ test_progs = [
>  	'kms_properties',
>  	'kms_psr',
>  	'kms_psr2_su',
> +	'kms_psr2_sf',
>  	'kms_pwrite_crc',
>  	'kms_rmfb',
>  	'kms_rotation_crc',

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test
  2020-11-18 20:20   ` Souza, Jose
@ 2020-11-19 18:36     ` Laxminarayan Bharadiya, Pankaj
  0 siblings, 0 replies; 11+ messages in thread
From: Laxminarayan Bharadiya, Pankaj @ 2020-11-19 18:36 UTC (permalink / raw)
  To: Souza, Jose, Mun, Gwan-gyeong, igt-dev



> -----Original Message-----
> From: Souza, Jose <jose.souza@intel.com>
> Sent: 19 November 2020 01:50
> To: Laxminarayan Bharadiya, Pankaj
> <pankaj.laxminarayan.bharadiya@intel.com>; Mun, Gwan-gyeong <gwan-
> gyeong.mun@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test
> 
> On Wed, 2020-11-18 at 13:44 +0530, Pankaj Bharadiya wrote:
> > Selective fetch reduces display engine use of memory bandwidth by only
> > fetching (reading from memory) the updated regions of the frame buffer
> > and sending those updated regions to a panel with a PSR2 capability.
> >
> > The FB_DAMAGE_CLIPS plane property provides user-space a way inform
> > kernel about the updated regions.
> >
> > Add new test to verify selective fetch by using FB_DAMAGE_CLIPS
> > property to send  updated regions.
> >
> > Signed-off-by: Pankaj Bharadiya
> > <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> >  tests/Makefile.sources |   1 +
> >  tests/kms_psr2_sf.c    | 717
> +++++++++++++++++++++++++++++++++++++++++
> >  tests/meson.build      |   1 +
> >  3 files changed, 719 insertions(+)
> >  create mode 100644 tests/kms_psr2_sf.c
> >
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources index
> > 96d835820..4e653c8b2 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -79,6 +79,7 @@ TESTS_progs = \
> >  	kms_properties \
> >  	kms_psr \
> >  	kms_psr2_su \
> > +	kms_psr2_sf \
> >  	kms_pwrite_crc \
> >  	kms_rmfb \
> >  	kms_rotation_crc \
> > diff --git a/tests/kms_psr2_sf.c b/tests/kms_psr2_sf.c new file mode
> > 100644 index 000000000..baa640851
> > --- /dev/null
> > +++ b/tests/kms_psr2_sf.c
> > @@ -0,0 +1,717 @@
> > +/*
> > + * Copyright © 2020 Intel Corporation
> > + *
> > + * Permission is hereby granted, free of charge, to any person
> > +obtaining a
> > + * copy of this software and associated documentation files (the
> > +"Software"),
> > + * to deal in the Software without restriction, including without
> > +limitation
> > + * the rights to use, copy, modify, merge, publish, distribute,
> > +sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom
> > +the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice (including
> > +the next
> > + * paragraph) shall be included in all copies or substantial portions
> > +of the
> > + * Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > +EXPRESS OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > +MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
> EVENT
> > +SHALL
> > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
> DAMAGES
> > +OR OTHER
> > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > +ARISING
> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > +OTHER DEALINGS
> > + * IN THE SOFTWARE.
> > + *
> > + */
> > +
> > +#include "igt.h"
> > +#include "igt_sysfs.h"
> > +#include "igt_psr.h"
> > +#include <errno.h>
> > +#include <stdbool.h>
> > +#include <stdio.h>
> > +#include <string.h>
> > +#include "intel_bufmgr.h"
> > +
> > +IGT_TEST_DESCRIPTION("Test PSR2 selective fetch");
> > +
> > +#define SQUARE_SIZE 100
> > +
> > +#define CUR_SIZE 64
> > +
> > +enum operations {
> > +	PLANE_UPDATE,
> > +	PLANE_MOVE,
> > +	OVERLAY_PRIM_UPDATE
> > +};
> > +
> > +enum plane_move_postion {
> > +	POS_TOP_LEFT,
> > +	POS_TOP_RIGHT,
> > +	POS_BOTTOM_LEFT,
> > +	POS_BOTTOM_RIGHT
> > +};
> > +
> > +typedef struct {
> > +	int drm_fd;
> > +	int debugfs_fd;
> > +	igt_display_t display;
> > +	drm_intel_bufmgr *bufmgr;
> > +	drmModeModeInfo *mode;
> > +	igt_output_t *output;
> > +	struct igt_fb fb[3];
> > +	int damage_area_count;
> > +	enum operations op;
> > +	enum plane_move_postion pos;
> > +	int test_plane_id;
> > +	igt_plane_t *test_plane;
> > +	cairo_t *cr;
> > +} data_t;
> > +
> > +static const char *op_str(enum operations op) {
> > +	static const char * const name[] = {
> > +		[PLANE_UPDATE] = "plane-update",
> > +		[PLANE_MOVE] = "plane-move",
> > +		[OVERLAY_PRIM_UPDATE] = "overlay-primary-update",
> > +	};
> > +
> > +	return name[op];
> > +}
> > +
> > +static void setup_output(data_t *data) {
> > +	igt_display_t *display = &data->display;
> > +	igt_output_t *output;
> > +	enum pipe pipe;
> > +
> > +	for_each_pipe_with_valid_output(display, pipe, output) {
> > +		drmModeConnectorPtr c = output->config.connector;
> > +
> > +		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> > +			continue;
> > +
> > +		igt_output_set_pipe(output, pipe);
> > +		data->output = output;
> > +		data->mode = igt_output_get_mode(output);
> > +
> > +		return;
> > +	}
> > +}
> > +
> > +static void display_init(data_t *data) {
> > +	igt_display_require(&data->display, data->drm_fd);
> > +	setup_output(data);
> > +}
> > +
> > +static void display_fini(data_t *data) {
> > +	igt_display_fini(&data->display);
> > +}
> > +
> > +static void draw_rect(data_t *data, igt_fb_t *fb, int x, int y, int w, int h,
> > +			double r, double g, double b, double a) {
> > +	cairo_t *cr;
> > +
> > +	cr = igt_get_cairo_ctx(data->drm_fd, fb);
> > +	igt_paint_color_alpha(cr, x, y, w, h, r, g, b, a);
> > +	igt_put_cairo_ctx(cr);
> > +}
> > +
> > +static void plane_update_paint_squares(data_t *data, igt_fb_t *fb, uint32_t
> h,
> > +				       uint32_t v)
> > +{
> > +
> > +	switch (data->damage_area_count) {
> > +	case 5:
> > +		/*Bottom right corner*/
> > +		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +	case 4:
> > +		/*Bottom left corner*/
> > +		draw_rect(data, fb, h - SQUARE_SIZE, 0,
> > +			  SQUARE_SIZE, SQUARE_SIZE,
> > +			  1.0, 1.0, 1.0, 1.0);
> > +	case 3:
> > +		/*Top right corner*/
> > +		draw_rect(data, fb, 0, v - SQUARE_SIZE,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +	case 2:
> > +		/*Top left corner*/
> > +		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
> > +			  1.0, 1.0, 1.0, 1.0);
> > +
> > +	case 1:
> > +		/*Center*/
> > +		draw_rect(data, fb, h/2 - SQUARE_SIZE/2, v/2 -
> SQUARE_SIZE/2,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +	}
> 
> Want to see a damage clip being set every time you draw in the fb, together
> calls. Even better if you set int x, y, w and h variables and reuse to it to call
> draw_rect() and set clips(clip[x].x2 = clip[x].x1 + w);
> 
> Also you are only setting the damage area of the places you are drawing to, you
> need also to mark the regions of the previous fb that was draw and in the new fb
> have the background color, example:
> 
> FB0
> |------|
> |O     |
> |      |
> --------
> 
> FB1
> |------|
> |      |
> |      |
> --------
> 
> When flipping to FB1 you need to mark as damaged the region that had a 0 but
> now is only background.

This scenario will not occur as new areas are drawn along with the previous ones.
Previous areas are also part of new damaged FB update.

Did I miss anything?

> 
> > +}
> > +
> > +static void plane_move_paint_square(data_t *data, igt_fb_t *fb, uint32_t h,
> > +				       uint32_t v)
> > +{
> > +
> > +	switch (data->pos) {
> > +	case POS_TOP_LEFT:
> > +		/*Bottom right corner*/
> > +		draw_rect(data, fb, h - SQUARE_SIZE, v - SQUARE_SIZE,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +		break;
> > +	case POS_TOP_RIGHT:
> > +		/*Bottom left corner*/
> > +		draw_rect(data, fb, 0, v - SQUARE_SIZE,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +		break;
> > +	case POS_BOTTOM_LEFT:
> > +		/*Top right corner*/
> > +		draw_rect(data, fb, h - SQUARE_SIZE, 0,
> > +			  SQUARE_SIZE, SQUARE_SIZE, 1.0, 1.0, 1.0, 1.0);
> > +		break;
> > +	case POS_BOTTOM_RIGHT:
> > +		/*Top left corner*/
> > +		draw_rect(data, fb, 0, 0, SQUARE_SIZE, SQUARE_SIZE,
> > +			  1.0, 1.0, 1.0, 1.0);
> > +		break;
> > +	}
> > +}
> > +
> > +static struct drm_mode_rect *plane_update_setup_damage_areas(data_t
> *data,
> > +							     uint32_t h,
> > +							     uint32_t v)
> > +{
> > +	struct drm_mode_rect *clip;
> > +
> > +	if (data->test_plane_id == DRM_PLANE_TYPE_CURSOR) {
> > +		clip = (struct drm_mode_rect *) malloc(sizeof(struct
> > +							      drm_mode_rect));
> > +		igt_assert(clip);
> > +
> > +		clip->x1 = clip->y1 = 0;
> > +		clip->x2 = clip->y2 = CUR_SIZE;
> > +
> > +	} else {
> > +		clip = (struct drm_mode_rect *) malloc(sizeof(struct
> > +							      drm_mode_rect) *
> > +						       data-
> >damage_area_count);
> 
> alloc enough clips for all tests in stack and reuse in every update.
> 
> 
> > +		igt_assert(clip);
> > +
> > +		switch (data->damage_area_count) {
> > +		case 5:
> > +			/*Bottom right corner*/
> > +			clip[4].x1 = h - SQUARE_SIZE;
> > +			clip[4].y1 = v - SQUARE_SIZE;
> > +			clip[4].x2 = clip[4].x1 + SQUARE_SIZE;
> > +			clip[4].y2 = clip[4].y1 + SQUARE_SIZE;
> > +		case 4:
> > +			/*Bottom left corner*/
> > +			clip[3].x1 = h - SQUARE_SIZE;
> > +			clip[3].y1 = 0;
> > +			clip[3].x2 = clip[3].x1 + SQUARE_SIZE;
> > +			clip[3].y2 = clip[3].y1 + SQUARE_SIZE;
> > +		case 3:
> > +			/*Top right corner*/
> > +			clip[2].x1 = 0;
> > +			clip[2].y1 = v - SQUARE_SIZE;
> > +			clip[2].x2 = clip[2].x1 + SQUARE_SIZE;
> > +			clip[2].y2 = clip[2].y1 + SQUARE_SIZE;
> > +		case 2:
> > +			/*Top left corner*/
> > +			clip[1].x1 = 0;
> > +			clip[1].y1 = 0;
> > +			clip[1].x2 = clip[1].x1 + SQUARE_SIZE;
> > +			clip[1].y2 = clip[1].y1 + SQUARE_SIZE;
> > +
> > +		case 1:
> > +			/*Center*/
> > +			clip[0].x1 = h/2 - SQUARE_SIZE/2;
> > +			clip[0].y1 = v/2 - SQUARE_SIZE/2;
> > +			clip[0].x2 = clip[0].x1 + SQUARE_SIZE;
> > +			clip[0].y2 = clip[0].y1 + SQUARE_SIZE;
> > +		}
> > +	}
> > +
> > +	return clip;
> > +}
> > +
> > +static struct drm_mode_rect *plane_move_setup_damage_area(data_t
> *data,
> > +							  uint32_t h,
> > +							  uint32_t v)
> > +{
> > +	struct drm_mode_rect *clip;
> > +
> > +	clip = (struct drm_mode_rect *) malloc(sizeof(struct drm_mode_rect));
> > +	igt_assert(clip);
> > +
> > +	switch (data->pos) {
> > +	case POS_TOP_LEFT:
> > +		/*Bottom right corner*/
> > +		clip->x1 = h - SQUARE_SIZE;
> > +		clip->y1 = v - SQUARE_SIZE;
> > +		clip->x2 = clip->x1 + SQUARE_SIZE;
> > +		clip->y2 = clip->y1 + SQUARE_SIZE;
> > +
> > +		break;
> > +	case POS_TOP_RIGHT:
> > +		/*Bottom left corner*/
> > +		clip->x1 = h - SQUARE_SIZE;
> > +		clip->y1 = 0;
> > +		clip->x2 = clip->x1 + SQUARE_SIZE;
> > +		clip->y2 = clip->y1 + SQUARE_SIZE;
> > +
> > +		break;
> > +	case POS_BOTTOM_LEFT:
> > +		/*Top right corner*/
> > +		clip->x1 = 0;
> > +		clip->y1 = v - SQUARE_SIZE;
> > +		clip->x2 = clip->x1 + SQUARE_SIZE;
> > +		clip->y2 = clip->y1 + SQUARE_SIZE;
> > +
> > +		break;
> > +	case POS_BOTTOM_RIGHT:
> > +		/*Top left corner*/
> > +		clip->x1 = 0;
> > +		clip->y1 = 0;
> > +		clip->x2 = clip->x1 + SQUARE_SIZE;
> > +		clip->y2 = clip->y1 + SQUARE_SIZE;
> > +	}
> > +
> > +	return clip;
> > +}
> > +
> > +static void free_damage_areas(struct drm_mode_rect *clip) {
> > +	if (!clip)
> > +		return;
> > +
> > +	free(clip);
> > +}
> > +
> > +static void prepare(data_t *data)
> > +{
> > +	igt_plane_t *primary, *sprite = NULL, *cursor = NULL;
> > +
> > +	/* all green frame */
> > +	igt_create_color_fb(data->drm_fd,
> > +			    data->mode->hdisplay, data->mode->vdisplay,
> > +			    DRM_FORMAT_XRGB8888,
> > +			    LOCAL_DRM_FORMAT_MOD_NONE,
> > +			    0.0, 1.0, 0.0,
> > +			    &data->fb[0]);
> > +
> > +	primary = igt_output_get_plane_type(data->output,
> > +			DRM_PLANE_TYPE_PRIMARY);
> > +
> > +	switch (data->test_plane_id) {
> > +	case DRM_PLANE_TYPE_OVERLAY:
> > +		sprite = igt_output_get_plane_type(data->output,
> > +
> DRM_PLANE_TYPE_OVERLAY);
> > +		/*All blue plane*/
> > +		igt_create_color_fb(data->drm_fd,
> > +				    data->mode->hdisplay/2,
> > +				    data->mode->vdisplay/2,
> > +				    DRM_FORMAT_XRGB8888,
> > +				    LOCAL_DRM_FORMAT_MOD_NONE,
> > +				    0.0, 0.0, 1.0,
> > +				    &data->fb[1]);
> 
> Kinda of confusing data->fb, add data->fb_primary[], data->fb_overlay[] and
> data->fb_cursor[].
> 
> > +
> > +		igt_create_color_fb(data->drm_fd,
> > +				    data->mode->hdisplay/2,
> > +				    data->mode->vdisplay/2,
> > +				    DRM_FORMAT_XRGB8888,
> > +				    LOCAL_DRM_FORMAT_MOD_NONE,
> > +				    0.0, 0.0, 1.0,
> > +				    &data->fb[2]);
> > +
> > +		if (data->op == PLANE_MOVE) {
> > +			plane_move_paint_square(data, &data->fb[2],
> > +					   data->mode->hdisplay/2,
> > +					   data->mode->vdisplay/2);
> > +
> > +		} else {
> > +			plane_update_paint_squares(data, &data->fb[2],
> > +					   data->mode->hdisplay/2,
> > +					   data->mode->vdisplay/2);
> > +		}
> > +
> > +		igt_plane_set_fb(sprite, &data->fb[1]);
> > +		data->test_plane = sprite;
> > +		break;
> > +
> > +	case DRM_PLANE_TYPE_PRIMARY:
> > +		igt_create_color_fb(data->drm_fd,
> > +			    data->mode->hdisplay, data->mode->vdisplay,
> > +			    DRM_FORMAT_XRGB8888,
> > +			    LOCAL_DRM_FORMAT_MOD_NONE,
> > +			    0.0, 1.0, 0.0,
> > +			    &data->fb[2]);
> > +
> > +		plane_update_paint_squares(data, &data->fb[2],
> > +					   data->mode->hdisplay,
> > +					   data->mode->vdisplay);
> > +		data->test_plane = primary;
> > +
> > +		if (data->op == OVERLAY_PRIM_UPDATE) {
> > +			sprite = igt_output_get_plane_type(data->output,
> > +
> DRM_PLANE_TYPE_OVERLAY);
> > +
> > +			igt_create_color_fb(data->drm_fd,
> > +					    data->mode->hdisplay,
> > +					    data->mode->vdisplay,
> > +					    DRM_FORMAT_XRGB8888,
> > +					    LOCAL_DRM_FORMAT_MOD_NONE,
> > +					    0.0, 0.0, 1.0,
> > +					    &data->fb[1]);
> > +
> > +			igt_plane_set_fb(sprite, &data->fb[1]);
> > +			igt_plane_set_prop_value(sprite, IGT_PLANE_ALPHA,
> > +						 0x6060);
> > +		}
> > +		break;
> > +
> > +	case DRM_PLANE_TYPE_CURSOR:
> > +		cursor = igt_output_get_plane_type(data->output,
> > +
> DRM_PLANE_TYPE_CURSOR);
> > +		igt_plane_set_position(cursor, 0, 0);
> > +
> > +		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
> > +			      DRM_FORMAT_ARGB8888,
> LOCAL_DRM_FORMAT_MOD_NONE,
> > +			      &data->fb[1]);
> > +
> > +		draw_rect(data, &data->fb[1], 0, 0, CUR_SIZE, CUR_SIZE,
> > +			    0.0, 0.0, 1.0, 1.0);
> > +
> > +		igt_create_fb(data->drm_fd, CUR_SIZE, CUR_SIZE,
> > +			      DRM_FORMAT_ARGB8888,
> LOCAL_DRM_FORMAT_MOD_NONE,
> > +			      &data->fb[2]);
> > +
> > +		draw_rect(data, &data->fb[2], 0, 0, CUR_SIZE, CUR_SIZE,
> > +			    1.0, 1.0, 1.0, 1.0);
> > +
> > +		igt_plane_set_fb(cursor, &data->fb[1]);
> > +		data->test_plane = cursor;
> > +		break;
> > +	}
> > +
> > +	igt_plane_set_fb(primary, &data->fb[0]);
> > +
> > +	igt_display_commit2(&data->display, COMMIT_ATOMIC); }
> > +
> > +static inline void manual(const char *expected) {
> > +	igt_debug_manual_check("all", expected); }
> > +
> > +static void plane_update_expected_output(int plane_type, int
> > +box_count) {
> > +	char expected[64] = {};
> > +
> > +	switch (plane_type) {
> > +	case DRM_PLANE_TYPE_PRIMARY:
> > +		sprintf(expected, "screen Green with %d White box(es)",
> > +			box_count);
> > +		break;
> > +	case DRM_PLANE_TYPE_OVERLAY:
> > +		sprintf(expected,
> > +			"screen Green with Blue box and %d White box(es)",
> > +			box_count);
> > +		break;
> > +	case DRM_PLANE_TYPE_CURSOR:
> > +		sprintf(expected, "screen Green with %d White box(es)",
> > +			box_count);
> > +		break;
> > +	}
> > +
> > +	manual(expected);
> > +}
> > +
> > +static void plane_move_expected_output(enum plane_move_postion pos) {
> > +	char expected[64] = {};
> > +
> > +	switch (pos) {
> > +	case POS_TOP_LEFT:
> > +		sprintf(expected,
> > +			"screen Green with Blue box on top left corner and
> White box");
> > +		break;
> > +	case POS_TOP_RIGHT:
> > +		sprintf(expected,
> > +			"screen Green with Blue box on top right corner and
> White box");
> > +		break;
> > +	case POS_BOTTOM_LEFT:
> > +		sprintf(expected,
> > +			"screen Green with Blue box on bottom left corner and
> White box");
> > +		break;
> > +	case POS_BOTTOM_RIGHT:
> > +		sprintf(expected,
> > +			"screen Green with Blue box on bottom right corner
> and White box");
> > +		break;
> > +	}
> > +
> > +	manual(expected);
> > +}
> > +
> > +static void overlay_prim_update_expected_output(int box_count) {
> > +	char expected[64] = {};
> > +
> > +	sprintf(expected,
> > +		"screen Green with Blue overlay, %d light Blue box(es)",
> > +		box_count);
> > +
> > +	manual(expected);
> > +
> > +}
> > +
> > +static void expected_output(data_t *data) {
> > +	switch (data->op) {
> > +	case PLANE_MOVE:
> > +		plane_move_expected_output(data->pos);
> > +		break;
> > +	case PLANE_UPDATE:
> > +		plane_update_expected_output(data->test_plane_id,
> > +					     data->damage_area_count);
> > +		break;
> > +	case OVERLAY_PRIM_UPDATE:
> > +		overlay_prim_update_expected_output(data-
> >damage_area_count);
> > +		break;
> > +	}
> > +}
> > +
> > +static void damaged_plane_move(data_t *data) {
> > +	igt_plane_t *test_plane = data->test_plane;
> > +	struct drm_mode_rect *clip;
> > +	uint32_t h = data->mode->hdisplay;
> > +	uint32_t v = data->mode->vdisplay;
> > +
> > +	igt_plane_set_fb(test_plane, &data->fb[2]);
> > +
> > +	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
> > +		h = h/2;
> > +		v = v/2;
> > +	}
> > +
> > +	clip = plane_move_setup_damage_area(data, h, v);
> 
> This property is in relation to the plane, this damage areas you are setting in the
> function makes no sense.

If I understood correctly after discussion with GG,  we can setup the damaged 
areas in plane w.r.t plane co-ordinates irrespective  set the plane position

Is this correct?

> When moving a plane or set the whole visible plane area as damaged or
> nothing(it should be one of the cases handled by driver).

I did not quite get it. Are you saying to setup damage area for the entire
overplay plane where it is being moved?  Will you please share example.

> 
> > +	igt_plane_replace_prop_blob(test_plane,
> IGT_PLANE_FB_DAMAGE_CLIPS, clip,
> > +				    sizeof(struct drm_mode_rect));
> > +
> > +	switch (data->pos) {
> > +	case POS_TOP_LEFT:
> > +		igt_plane_set_position(data->test_plane, 0, 0);
> > +		break;
> > +	case POS_TOP_RIGHT:
> > +		igt_plane_set_position(data->test_plane,
> > +				       data->mode->hdisplay/2, 0);
> > +		break;
> > +	case POS_BOTTOM_LEFT:
> > +		igt_plane_set_position(data->test_plane, 0,
> > +				       data->mode->vdisplay/2);
> > +		break;
> > +	case POS_BOTTOM_RIGHT:
> > +		igt_plane_set_position(data->test_plane,
> > +				       data->mode->hdisplay/2,
> > +				       data->mode->vdisplay/2);
> > +		break;
> > +	}
> > +
> > +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> > +
> > +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> > +
> > +	expected_output(data);
> > +
> > +	free_damage_areas(clip);
> > +}
> > +
> > +static void damaged_plane_update(data_t *data) {
> > +	igt_plane_t *test_plane = data->test_plane;
> > +	struct drm_mode_rect *clip;
> > +	uint32_t h = data->mode->hdisplay;
> > +	uint32_t v = data->mode->vdisplay;
> > +
> > +	igt_plane_set_fb(test_plane, &data->fb[2]);
> > +
> > +	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
> > +		h = h/2;
> > +		v = v/2;
> > +	}
> > +
> > +	clip = plane_update_setup_damage_areas(data, h, v);
> > +	igt_plane_replace_prop_blob(test_plane,
> IGT_PLANE_FB_DAMAGE_CLIPS, clip,
> > +				    sizeof(struct drm_mode_rect)*
> > +				    data->damage_area_count);
> > +	igt_plane_set_position(data->test_plane, 0, 0);
> > +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> > +
> > +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> > +
> > +	expected_output(data);
> > +
> > +	free_damage_areas(clip);
> > +}
> > +
> > +static void update_screen_and_test(data_t *data) {
> > +	switch (data->op) {
> > +	case PLANE_UPDATE:
> > +	case OVERLAY_PRIM_UPDATE:
> > +		damaged_plane_update(data);
> > +		break;
> > +	case PLANE_MOVE:
> > +		damaged_plane_move(data);
> > +		break;
> > +	}
> > +}
> > +
> > +static void screen_reset(data_t  *data) {
> > +	igt_plane_t *test_plane = data->test_plane;
> > +
> > +	if (data->test_plane_id == DRM_PLANE_TYPE_PRIMARY)
> > +		igt_plane_set_fb(test_plane, &data->fb[0]);
> > +	else
> > +		igt_plane_set_fb(test_plane, &data->fb[1]);
> > +
> > +	igt_plane_set_position(data->test_plane, 0, 0);
> > +	igt_display_commit2(&data->display, COMMIT_ATOMIC); }
> > +
> > +static void run(data_t *data)
> > +{
> > +	igt_assert(psr_wait_entry(data->debugfs_fd, PSR_MODE_2));
> > +
> > +	screen_reset(data);
> 
> why you need this if you have committed already in the prepare()?

Yeah will remove it.
Was experimenting with loop for with multiple screen changes.

> 
> > +	update_screen_and_test(data);
> 
> Content of this function could be moved to here.

Yes.

> 
> 
> > +}
> > +
> > +static void cleanup(data_t *data)
> > +{
> > +	igt_plane_t *primary;
> > +	igt_plane_t *sprite;
> > +
> > +	primary = igt_output_get_plane_type(data->output,
> > +					    DRM_PLANE_TYPE_PRIMARY);
> > +
> > +	igt_plane_set_fb(primary, NULL);
> > +
> > +	if (data->test_plane_id != DRM_PLANE_TYPE_PRIMARY) {
> > +		igt_plane_set_position(data->test_plane, 0, 0);
> > +		igt_plane_set_fb(data->test_plane, NULL);
> > +	}
> > +
> > +	if (data->op == OVERLAY_PRIM_UPDATE) {
> > +		sprite = igt_output_get_plane_type(data->output,
> > +				DRM_PLANE_TYPE_OVERLAY);
> > +		igt_plane_set_position(sprite, 0, 0);
> > +		igt_plane_set_fb(sprite, NULL);
> > +	}
> > +
> > +	igt_display_commit2(&data->display, COMMIT_ATOMIC);
> > +
> > +	igt_remove_fb(data->drm_fd, &data->fb[0]);
> > +	igt_remove_fb(data->drm_fd, &data->fb[1]);
> > +	igt_remove_fb(data->drm_fd, &data->fb[2]); }
> > +
> > +igt_main
> > +{
> > +	data_t data = {};
> > +	int i;
> > +
> > +	igt_fixture {
> > +		int r;
> > +
> > +		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> > +		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> > +		kmstest_set_vt_graphics_mode();
> > +
> > +		igt_require_f(psr_sink_support(data.drm_fd,
> > +					       data.debugfs_fd, PSR_MODE_2),
> > +			      "Sink does not support PSR2\n");
> > +
> > +		igt_require_f(psr2_selective_fetch_check(data.debugfs_fd),
> > +			      "PSR2 selective fetch not enabled\n");
> > +
> > +		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> > +		igt_assert(data.bufmgr);
> > +		drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
> > +
> > +		display_init(&data);
> > +
> > +		/* Test if PSR2 can be enabled */
> > +		igt_require_f(psr_enable(data.drm_fd,
> > +					 data.debugfs_fd, PSR_MODE_2),
> > +			      "Error enabling PSR2\n");
> > +
> > +		data.damage_area_count = 5;
> > +		data.op = PLANE_UPDATE;
> > +		data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> > +		prepare(&data);
> > +		r = psr_wait_entry(data.debugfs_fd, PSR_MODE_2);
> > +		cleanup(&data);
> > +		if (!r)
> > +			psr_print_debugfs(data.debugfs_fd);
> > +		igt_require_f(r, "PSR2 can not be enabled\n");
> > +	}
> > +
> 
> Missing some description of what each subtest will, also a better name.
> What we will see in CI would be: primary-plane-update-sf-5, 5 what?

Any suggestions here?

Thanks,
Pankaj

> 
> > +	for (i = 1; i <= 5; i++) {
> > +		igt_subtest_f("primary-%s-sf-%d", op_str(data.op), i) {
> > +			data.damage_area_count = i;
> > +			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> > +			prepare(&data);
> > +			run(&data);
> > +			cleanup(&data);
> > +		}
> > +	}
> > +
> > +	for (i = 1; i <= 5; i++) {
> > +		igt_subtest_f("overlay-%s-sf-%d", op_str(data.op), i) {
> > +			data.damage_area_count = i;
> > +			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> > +			prepare(&data);
> > +			run(&data);
> > +			cleanup(&data);
> > +		}
> > +	}
> > +
> > +	igt_subtest_f("cursor-%s-sf", op_str(data.op)) {
> > +		data.damage_area_count = 1;
> > +		data.test_plane_id = DRM_PLANE_TYPE_CURSOR;
> > +		prepare(&data);
> > +		run(&data);
> > +		cleanup(&data);
> > +	}
> > +
> > +	/* Only for overlay plane */
> > +	data.op = PLANE_MOVE;
> > +	for (i = POS_TOP_LEFT; i <= POS_BOTTOM_RIGHT ; i++) {
> > +		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
> > +			data.pos = i;
> > +			data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
> > +			prepare(&data);
> > +			run(&data);
> > +			cleanup(&data);
> > +		}
> > +	}
> > +
> > +	data.op = OVERLAY_PRIM_UPDATE;
> > +	for (i = 1; i <= 5; i++) {
> > +		igt_subtest_f("%s-sf-%d", op_str(data.op), i) {
> > +			data.damage_area_count = i;
> > +			data.test_plane_id = DRM_PLANE_TYPE_PRIMARY;
> > +			prepare(&data);
> > +			run(&data);
> > +			cleanup(&data);
> > +		}
> > +	}
> > +
> > +	igt_fixture {
> > +		close(data.debugfs_fd);
> > +		drm_intel_bufmgr_destroy(data.bufmgr);
> > +		display_fini(&data);
> > +	}
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build index
> > cc79ac228..b33cfb63f 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -63,6 +63,7 @@ test_progs = [
> >  	'kms_properties',
> >  	'kms_psr',
> >  	'kms_psr2_su',
> > +	'kms_psr2_sf',
> >  	'kms_pwrite_crc',
> >  	'kms_rmfb',
> >  	'kms_rotation_crc',

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
  2020-12-08 17:01 [igt-dev] [PATCH i-g-t 0/3] " Pankaj Bharadiya
  2020-12-08 17:22 ` Souza, Jose
@ 2021-01-08 12:21 ` Petri Latvala
  1 sibling, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2021-01-08 12:21 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: igt-dev

On Tue, Dec 08, 2020 at 10:31:06PM +0530, Pankaj Bharadiya wrote:
> Add new test for selective fetch
>  
> Pankaj Bharadiya (3):
>   lib/kms: Add fb damage clip plane property
>   lib/igt_psr: Add function to check PSR2 selective fetch
>   tests: Add new PSR2 selective fetch test
> 
>  lib/igt_kms.c          |   3 +
>  lib/igt_kms.h          |   1 +
>  lib/igt_psr.c          |  10 +
>  lib/igt_psr.h          |   1 +
>  tests/Makefile.sources |   1 +
>  tests/kms_psr2_sf.c    | 649 +++++++++++++++++++++++++++++++++++++++++
>  tests/meson.build      |   1 +
>  7 files changed, 666 insertions(+)
>  create mode 100644 tests/kms_psr2_sf.c

Merged the series btw.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
  2020-12-08 17:01 [igt-dev] [PATCH i-g-t 0/3] " Pankaj Bharadiya
@ 2020-12-08 17:22 ` Souza, Jose
  2021-01-08 12:21 ` Petri Latvala
  1 sibling, 0 replies; 11+ messages in thread
From: Souza, Jose @ 2020-12-08 17:22 UTC (permalink / raw)
  To: Laxminarayan Bharadiya, Pankaj, Mun, Gwan-gyeong, igt-dev

Please go ahead and merge the first 2 patches that are already reviewed.
Send it separated just to make sure that it do not causes any regressions, what I doubt it will.

On Tue, 2020-12-08 at 22:31 +0530, Pankaj Bharadiya wrote:
> Add new test for selective fetch
>  
> 
> Pankaj Bharadiya (3):
>   lib/kms: Add fb damage clip plane property
>   lib/igt_psr: Add function to check PSR2 selective fetch
>   tests: Add new PSR2 selective fetch test
> 
>  lib/igt_kms.c          |   3 +
>  lib/igt_kms.h          |   1 +
>  lib/igt_psr.c          |  10 +
>  lib/igt_psr.h          |   1 +
>  tests/Makefile.sources |   1 +
>  tests/kms_psr2_sf.c    | 649 +++++++++++++++++++++++++++++++++++++++++
>  tests/meson.build      |   1 +
>  7 files changed, 666 insertions(+)
>  create mode 100644 tests/kms_psr2_sf.c
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch
@ 2020-12-08 17:01 Pankaj Bharadiya
  2020-12-08 17:22 ` Souza, Jose
  2021-01-08 12:21 ` Petri Latvala
  0 siblings, 2 replies; 11+ messages in thread
From: Pankaj Bharadiya @ 2020-12-08 17:01 UTC (permalink / raw)
  To: gwan-gyeong.mun, igt-dev, jose.souza

Add new test for selective fetch
 
Pankaj Bharadiya (3):
  lib/kms: Add fb damage clip plane property
  lib/igt_psr: Add function to check PSR2 selective fetch
  tests: Add new PSR2 selective fetch test

 lib/igt_kms.c          |   3 +
 lib/igt_kms.h          |   1 +
 lib/igt_psr.c          |  10 +
 lib/igt_psr.h          |   1 +
 tests/Makefile.sources |   1 +
 tests/kms_psr2_sf.c    | 649 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 7 files changed, 666 insertions(+)
 create mode 100644 tests/kms_psr2_sf.c

-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-08 12:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  8:14 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property Pankaj Bharadiya
2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch Pankaj Bharadiya
2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test Pankaj Bharadiya
2020-11-18 20:20   ` Souza, Jose
2020-11-19 18:36     ` Laxminarayan Bharadiya, Pankaj
2020-11-18 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Patchwork
2020-11-18 15:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-12-08 17:01 [igt-dev] [PATCH i-g-t 0/3] " Pankaj Bharadiya
2020-12-08 17:22 ` Souza, Jose
2021-01-08 12:21 ` Petri Latvala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.