All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support
@ 2020-05-07 10:22 Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 1/5] tests/i915_pm_lpsp: Nuke the panel-fitter test Anshuman Gupta
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

This series adds lpsp igt val platform agnostic support.

v7 has fixed review comment provided by Animesh
combine the [patch v6 4/6] to [patch v6 3/6].

Anshuman Gupta (5):
  tests/i915_pm_lpsp: Nuke the panel-fitter test
  lib/igt_pm: Add lib func to get lpsp capability
  tests/i915_pm_lpsp: lpsp platform agnostic support
  tests/i915_pm_lpsp: screens-disabled subtest use igt_wait
  tests/i915_pm_rpm: lpsp/non-lpsp screen mode_set_data

 lib/igt_pm.c              |  29 ++++
 lib/igt_pm.h              |   1 +
 tests/i915/i915_pm_lpsp.c | 317 ++++++++++++++++++--------------------
 tests/i915/i915_pm_rpm.c  |  53 ++++---
 4 files changed, 209 insertions(+), 191 deletions(-)

-- 
2.26.0

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

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

* [igt-dev] [PATCH i-g-t v7 1/5] tests/i915_pm_lpsp: Nuke the panel-fitter test
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
@ 2020-05-07 10:22 ` Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 2/5] lib/igt_pm: Add lib func to get lpsp capability Anshuman Gupta
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

panel-fitter subtest is only applicable to HASWELL/BROADWELL.
It just tests non-lpsp(lpsp disabled) when panel fitter is
enforced by std 1024x768 mode.
There is no ROI to test non-lpsp kind of thing,
If HSW_GLOBAL power well is not enabled we would see
other display issues in other display tests.

Gen9+ platform has display scaling feature in built per
pipe, as lpsp is all about low power single pipe (PIPE A)
usage, gen9+ platforms also don't require panel-fitter subtest.
This should save some CI cycles.

Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_lpsp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 42938e10..08f82e7c 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -219,8 +219,6 @@ igt_main
 		screens_disabled_subtest(drm_fd, drm_res);
 	igt_subtest("edp-native")
 		edp_subtest(drm_fd, drm_res, drm_connectors, devid, false);
-	igt_subtest("edp-panel-fitter")
-		edp_subtest(drm_fd, drm_res, drm_connectors, devid, true);
 	igt_subtest("non-edp")
 		non_edp_subtest(drm_fd, drm_res, drm_connectors);
 
-- 
2.26.0

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

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

* [igt-dev] [PATCH i-g-t v7 2/5] lib/igt_pm: Add lib func to get lpsp capability
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 1/5] tests/i915_pm_lpsp: Nuke the panel-fitter test Anshuman Gupta
@ 2020-05-07 10:22 ` Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support Anshuman Gupta
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

This lib function evaluate the lpsp capability from
the connector specific debugfs attribute i915_lpsp_info.

v2:
- changed the lib function prefix igt_output_is_lpsp_capable
  to i915_output_is_lpsp_capable. [Martin]
v3:
- early return for the connector which doesn't support
  lpsp on any platform.
v4:
- debugfs entry changed from i915_lpsp_info to i915_lpsp_capability.
v5:
- return lpsp capability false if i915_lpsp_capability debugfs is not
  present. [Animesh]

Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 lib/igt_pm.c | 29 +++++++++++++++++++++++++++++
 lib/igt_pm.h |  1 +
 2 files changed, 30 insertions(+)

diff --git a/lib/igt_pm.c b/lib/igt_pm.c
index 9d441e1b..b409ec46 100644
--- a/lib/igt_pm.c
+++ b/lib/igt_pm.c
@@ -37,6 +37,7 @@
 #include <dirent.h>
 
 #include "drmtest.h"
+#include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_aux.h"
 #include "igt_sysfs.h"
@@ -827,3 +828,31 @@ bool igt_pm_pc8_plus_residencies_enabled(int msr_fd)
 
 	return true;
 }
+
+/**
+ * i915_output_is_lpsp_capable:
+ * @drm_fd: fd to drm device
+ * @output: igt output for which lpsp capability need to be evaluated
+ * Check lpsp capability for a given output.
+ *
+ * Returns:
+ * True if given output is lpsp capable otherwise false.
+ */
+bool i915_output_is_lpsp_capable(int drm_fd, igt_output_t *output)
+{
+	char buf[256];
+	int fd, len;
+
+	fd = igt_debugfs_connector_dir(drm_fd, output->name, O_RDONLY);
+	igt_require(fd >= 0);
+	len = igt_debugfs_simple_read(fd, "i915_lpsp_capability",
+				      buf, sizeof(buf));
+
+	/* if i915_lpsp_capability not present return the capability as false */
+	if (len < 0)
+		return false;
+
+	close(fd);
+
+	return strstr(buf, "LPSP: capable");
+}
diff --git a/lib/igt_pm.h b/lib/igt_pm.h
index 5e438452..162d3ca3 100644
--- a/lib/igt_pm.h
+++ b/lib/igt_pm.h
@@ -53,5 +53,6 @@ enum igt_runtime_pm_status igt_get_runtime_pm_status(void);
 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status);
 bool igt_pm_dmc_loaded(int debugfs);
 bool igt_pm_pc8_plus_residencies_enabled(int msr_fd);
+bool i915_output_is_lpsp_capable(int drm_fd, igt_output_t *output);
 
 #endif /* IGT_PM_H */
-- 
2.26.0

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

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

* [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 1/5] tests/i915_pm_lpsp: Nuke the panel-fitter test Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 2/5] lib/igt_pm: Add lib func to get lpsp capability Anshuman Gupta
@ 2020-05-07 10:22 ` Anshuman Gupta
  2020-05-11  8:28   ` Manna, Animesh
  2020-05-11 11:57   ` Nautiyal, Ankit K
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 4/5] tests/i915_pm_lpsp: screens-disabled subtest use igt_wait Anshuman Gupta
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

Current implementation of lpsp igt test, assumed that every non-edp
panel isn't a lpsp panel but it is not true on TGL anymore,
any HDMI/DP/DSI panel connected on pipe A and connected to PORT_{A,B,C}
can drive LPSP.
Even on older Gen9 platform a DP panel can drive lpsp on Port A.
This requires complete design change in current lpsp igt for a platform
agnostic support.

The new igt approach is relies on connector specific
i915_lpsp_capability and i915_lpsp_status debugfs attributes,
these debugfs exposes whether an output is capable of driving lpsp
and lpsp is enabled.

Nuking edp-native and non-edp test, introducing a new dynamic
igt subtest kms-lpsp, which validates lpsp on each connected output
and skip the subtest if output is not lpsp capable.

Skip screens-disabled test for platform which support DC states.
screens-disabled test is only valid for the platforms like HSW/BDW
where PG1 is Always-ON power domain, so these platform test lpsp
with all screen disabled i.e validate PG2 when all screen are
disabled.
DC state i.e DMC f/w supported platforms don't have any ROI to validate
screens-disabled subtest as existing dc*-dpms i915_pm_dc
subtest already validate it implicitly.

v2:
- CI failures fixup.
v3:
- removed unloading of snd_modules. [Martin]
v4:
- Don't test non-lpsp(if lpsp disabled), no ROI to test that.
- nuke panel-fitter test.
v5:
- Added dynamic subtest and igt changes according to kernel
  debugfs i915_lpsp_status changes.
v6:
- Avoided pipe big joiner by using 4k or lesser mode,
  so igt will not fail when pipe big joiner patches will
  land to kernel.
v7:
- Combined [v6 4/6] patch to this patch, skip the screens-disabled
  subtest for DC state supported platforms. [Animesh]

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_lpsp.c | 313 ++++++++++++++++++--------------------
 1 file changed, 147 insertions(+), 166 deletions(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 08f82e7c..46937efb 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -25,210 +25,191 @@
  */
 
 #include "igt.h"
+#include "igt_kmod.h"
+#include "igt_pm.h"
+#include "igt_sysfs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 
+#define MAX_SINK_LPSP_INFO_BUF_LEN	4096
 
-static bool supports_lpsp(uint32_t devid)
-{
-	return IS_HASWELL(devid) || IS_BROADWELL(devid);
-}
+#define PWR_DOMAIN_INFO "i915_power_domain_info"
 
-static bool lpsp_is_enabled(int drm_fd)
+typedef struct {
+	int drm_fd;
+	int debugfs_fd;
+	uint32_t devid;
+	char *pwr_dmn_info;
+	igt_display_t display;
+	struct igt_fb fb;
+	drmModeModeInfo *mode;
+	igt_output_t *output;
+} data_t;
+
+static bool lpsp_is_enabled(data_t *data)
 {
-	uint32_t val;
+	char buf[MAX_SINK_LPSP_INFO_BUF_LEN];
+	int len;
 
-	val = INREG(HSW_PWR_WELL_CTL2);
-	return !(val & HSW_PWR_WELL_STATE_ENABLED);
-}
+	len = igt_debugfs_simple_read(data->debugfs_fd, "i915_lpsp_status",
+				      buf, sizeof(buf));
+	if (len < 0)
+		igt_assert_eq(len, -ENODEV);
 
-/* The LPSP mode is all about an enabled pipe, but we expect to also be in the
- * low power mode when no pipes are enabled, so do this check anyway. */
-static void screens_disabled_subtest(int drm_fd, drmModeResPtr drm_res)
-{
-	kmstest_unset_all_crtcs(drm_fd, drm_res);
-	igt_assert(lpsp_is_enabled(drm_fd));
+	igt_skip_on(strstr(buf, "LPSP: not supported"));
+
+	return strstr(buf, "LPSP: enabled");
 }
 
-static uint32_t create_fb(int drm_fd, int width, int height)
+static bool dmc_supported(int debugfs)
 {
-	struct igt_fb fb;
+	char buf[15];
+	int len;
 
-	return igt_create_pattern_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888,
-				     LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+	len = igt_sysfs_read(debugfs, "i915_dmc_info", buf, sizeof(buf) - 1);
+
+	if (len < 0)
+		return false;
+	else
+		return true;
 }
 
-static void edp_subtest(int drm_fd, drmModeResPtr drm_res,
-			drmModeConnectorPtr *drm_connectors, uint32_t devid,
-			bool use_panel_fitter)
+/*
+ * The LPSP mode is all about an enabled pipe, but we expect to also be in the
+ * low power mode when no pipes are enabled, so do this check anyway.
+ */
+static void screens_disabled_subtest(data_t *data)
 {
-	int i, rc;
-	uint32_t crtc_id = 0, buffer_id = 0;
-	drmModeConnectorPtr connector = NULL;
-	drmModeModeInfoPtr mode = NULL;
-	drmModeModeInfo std_1024_mode = {
-		.clock = 65000,
-		.hdisplay = 1024,
-		.hsync_start = 1048,
-		.hsync_end = 1184,
-		.htotal = 1344,
-		.hskew = 0,
-		.vdisplay = 768,
-		.vsync_start = 771,
-		.vsync_end = 777,
-		.vtotal = 806,
-		.vscan = 0,
-		.vrefresh = 60,
-		.flags = 0xA,
-		.type = 0x40,
-		.name = "Custom 1024x768",
-	};
-
-	kmstest_unset_all_crtcs(drm_fd, drm_res);
-
-	for (i = 0; i < drm_res->count_connectors; i++) {
-		drmModeConnectorPtr c = drm_connectors[i];
-
-		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
-			continue;
-		if (c->connection != DRM_MODE_CONNECTED)
-			continue;
-
-		if (!use_panel_fitter && c->count_modes) {
-			connector = c;
-			mode = &c->modes[0];
-			break;
-		}
-		if (use_panel_fitter) {
-			connector = c;
-
-			/* This is one of the modes Xorg creates for panels, so
-			 * it should work just fine. Notice that Gens that
-			 * support LPSP are too new for panels with native
-			 * 1024x768 resolution, so this should force the panel
-			 * fitter. */
-			igt_assert(c->count_modes &&
-				   c->modes[0].hdisplay > 1024);
-			igt_assert(c->count_modes &&
-				   c->modes[0].vdisplay > 768);
-			mode = &std_1024_mode;
-			break;
-		}
-	}
-	igt_require(connector);
-
-	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
-						  0);
-	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
-
-	igt_assert(buffer_id);
-	igt_assert(connector);
-	igt_assert(mode);
-
-	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
-			    &connector->connector_id, 1, mode);
-	igt_assert_eq(rc, 0);
-
-	if (use_panel_fitter) {
-		if (IS_HASWELL(devid))
-			igt_assert(!lpsp_is_enabled(drm_fd));
-		else
-			igt_assert(lpsp_is_enabled(drm_fd));
-	} else {
-		igt_assert(lpsp_is_enabled(drm_fd));
+	igt_output_t *output;
+	int valid_output = 0;
+	enum pipe pipe;
+
+	for_each_pipe_with_single_output(&data->display, pipe, output) {
+		data->output = output;
+		igt_output_set_pipe(data->output, PIPE_NONE);
+		igt_display_commit(&data->display);
+		valid_output++;
 	}
+
+	igt_require_f(valid_output, "No connected output found\n");
+	igt_assert_f(lpsp_is_enabled(data), "lpsp is not enabled\n%s:\n%s\n",
+		     PWR_DOMAIN_INFO, data->pwr_dmn_info =
+		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
 }
 
-static void non_edp_subtest(int drm_fd, drmModeResPtr drm_res,
-			    drmModeConnectorPtr *drm_connectors)
+static void setup_lpsp_output(data_t *data)
 {
-	int i, rc;
-	uint32_t crtc_id = 0, buffer_id = 0;
-	drmModeConnectorPtr connector = NULL;
-	drmModeModeInfoPtr mode = NULL;
-
-	kmstest_unset_all_crtcs(drm_fd, drm_res);
-
-	for (i = 0; i < drm_res->count_connectors; i++) {
-		drmModeConnectorPtr c = drm_connectors[i];
+	igt_plane_t *primary;
+
+	/* set output pipe = PIPE_A for LPSP */
+	igt_output_set_pipe(data->output, PIPE_A);
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+	igt_create_pattern_fb(data->drm_fd,
+			      data->mode->hdisplay, data->mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb);
+	igt_plane_set_fb(primary, &data->fb);
+	igt_display_commit(&data->display);
+}
 
-		if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
-			continue;
-		if (c->connection != DRM_MODE_CONNECTED)
-			continue;
+static void test_cleanup(data_t *data)
+{
+	igt_plane_t *primary;
+
+	if (!data->output || data->output->pending_pipe == PIPE_NONE)
+		return;
+
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+	igt_plane_set_fb(primary, NULL);
+	igt_output_set_pipe(data->output, PIPE_NONE);
+	igt_display_commit(&data->display);
+	igt_remove_fb(data->drm_fd, &data->fb);
+	data->output = NULL;
+}
 
-		if (c->count_modes) {
-			connector = c;
-			mode = &c->modes[0];
-			break;
+static void test_lpsp(data_t *data)
+{
+	drmModeConnectorPtr c = data->output->config.connector;
+	int i;
+
+	/* LPSP is low power single pipe usages i.e. PIPE_A */
+	igt_require(igt_pipe_connector_valid(PIPE_A, data->output));
+	igt_require_f(i915_output_is_lpsp_capable(data->drm_fd, data->output),
+		      "output is not lpsp capable\n");
+
+	data->mode = igt_output_get_mode(data->output);
+
+	/* For LPSP avoid pipe big joiner by atleast 4k mode */
+	if (data->mode->hdisplay > 3860 && data->mode->vdisplay > 2160)
+		for (i = 1; i < c->count_modes; i++) {
+			if (c->modes[i].hdisplay <= 3860 &&
+			    c->modes[i].vdisplay <= 2160) {
+				data->mode = &c->modes[i];
+				igt_output_override_mode(data->output,
+							 data->mode);
+				break;
+			}
 		}
-	}
-	igt_require(connector);
-
-	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
-						  0);
-	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
-
-	igt_assert(buffer_id);
-	igt_assert(mode);
 
-	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
-			    &connector->connector_id, 1, mode);
-	igt_assert_eq(rc, 0);
+	igt_require(data->mode->hdisplay <= 3860 &&
+		    data->mode->vdisplay <= 2160);
 
-	igt_assert(!lpsp_is_enabled(drm_fd));
+	setup_lpsp_output(data);
+	igt_assert_f(lpsp_is_enabled(data), "%s: lpsp is not enabled\n%s:\n%s\n",
+		     data->output->name, PWR_DOMAIN_INFO, data->pwr_dmn_info =
+		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
 }
 
-#define MAX_CONNECTORS 32
-
-int drm_fd;
-uint32_t devid;
-drmModeResPtr drm_res;
-drmModeConnectorPtr drm_connectors[MAX_CONNECTORS];
-struct intel_mmio_data mmio_data;
+IGT_TEST_DESCRIPTION("These tests validates display Low Power Single Pipe configurations");
 igt_main
 {
-	igt_fixture {
-		int i;
-
-		drm_fd = drm_open_driver_master(DRIVER_INTEL);
-		igt_require(drm_fd >= 0);
-
-		devid = intel_get_drm_devid(drm_fd);
-
-		drm_res = drmModeGetResources(drm_fd);
-		igt_require(drm_res);
-		igt_assert(drm_res->count_connectors <= MAX_CONNECTORS);
+	data_t data = {};
 
-		for (i = 0; i < drm_res->count_connectors; i++)
-			drm_connectors[i] = drmModeGetConnectorCurrent(drm_fd,
-							drm_res->connectors[i]);
+	igt_fixture {
 
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		igt_require(data.drm_fd >= 0);
+		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
+		igt_require(data.debugfs_fd >= 0);
 		igt_pm_enable_audio_runtime_pm();
+		kmstest_set_vt_graphics_mode();
+		data.devid = intel_get_drm_devid(data.drm_fd);
+		igt_display_require(&data.display, data.drm_fd);
+		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
+	}
 
-		igt_require(supports_lpsp(devid));
+	igt_describe("This test validates lpsp while all crtc are disabled");
+	igt_subtest("screens-disabled") {
+		igt_require_f(!dmc_supported(data.debugfs_fd),
+			      "DC states supported platform don't have ROI for this subtest\n");
+		screens_disabled_subtest(&data);
+	}
 
-		intel_register_access_init(&mmio_data, intel_get_pci_device(), 0, drm_fd);
+	igt_describe("This test validates lpsp on all connected outputs on low power PIPE_A");
+	igt_subtest_with_dynamic_f("kms-lpsp") {
+		igt_display_t *display = &data.display;
+		igt_output_t *output;
 
-		kmstest_set_vt_graphics_mode();
-	}
+		for_each_connected_output(display, output) {
+			igt_dynamic_f("kms-lpsp-%s",
+				      kmstest_connector_type_str(output->config.connector->connector_type)) {
+				data.output = output;
+				test_lpsp(&data);
+			}
 
-	igt_subtest("screens-disabled")
-		screens_disabled_subtest(drm_fd, drm_res);
-	igt_subtest("edp-native")
-		edp_subtest(drm_fd, drm_res, drm_connectors, devid, false);
-	igt_subtest("non-edp")
-		non_edp_subtest(drm_fd, drm_res, drm_connectors);
+			test_cleanup(&data);
+		}
+	}
 
 	igt_fixture {
-		int i;
-
-		intel_register_access_fini(&mmio_data);
-		for (i = 0; i < drm_res->count_connectors; i++)
-			drmModeFreeConnector(drm_connectors[i]);
-		drmModeFreeResources(drm_res);
-		close(drm_fd);
+		free(data.pwr_dmn_info);
+		close(data.drm_fd);
+		igt_display_fini(&data.display);
 	}
 }
-- 
2.26.0

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

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

* [igt-dev] [PATCH i-g-t v7 4/5] tests/i915_pm_lpsp: screens-disabled subtest use igt_wait
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
                   ` (2 preceding siblings ...)
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support Anshuman Gupta
@ 2020-05-07 10:22 ` Anshuman Gupta
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 5/5] tests/i915_pm_rpm: lpsp/non-lpsp screen mode_set_data Anshuman Gupta
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

When all screens are disabled, it takes some time to release
eDP/DP AUX IO power domain ref count. Also, delayed audio codec
disabling takes time to release AUDIO power domain ref-count,
using igt_wait to check lpsp after disabling all screens.

v2:
- Added a code comment for delay of igt_wait. [Animesh]

Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_lpsp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 46937efb..850c7952 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -94,7 +94,9 @@ static void screens_disabled_subtest(data_t *data)
 	}
 
 	igt_require_f(valid_output, "No connected output found\n");
-	igt_assert_f(lpsp_is_enabled(data), "lpsp is not enabled\n%s:\n%s\n",
+	/* eDP panel may have power_cycle_delay of 600ms, 1sec delay is safer */
+	igt_assert_f(igt_wait(lpsp_is_enabled(data), 1000, 100),
+		     "lpsp is not enabled\n%s:\n%s\n",
 		     PWR_DOMAIN_INFO, data->pwr_dmn_info =
 		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
 }
-- 
2.26.0

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

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

* [igt-dev] [PATCH i-g-t v7 5/5] tests/i915_pm_rpm: lpsp/non-lpsp screen mode_set_data
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
                   ` (3 preceding siblings ...)
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 4/5] tests/i915_pm_lpsp: screens-disabled subtest use igt_wait Anshuman Gupta
@ 2020-05-07 10:22 ` Anshuman Gupta
  2020-05-07 11:07 ` [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10) Patchwork
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 10:22 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

Initialize the mode set params for lpsp/non-lpsp screen
based upon their output lpsp capability instead
of edp/non-edp output type.

v2:
- CI failures fixup.
v3:
- changes according to lib function igt_output_is_lpsp_capable,
  prefix changed to i915_output_is_lpsp_capable.

Acked-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_rpm.c | 53 +++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index fedef872..cb355a53 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -94,6 +94,7 @@ struct mode_set_data {
 	drmModeResPtr res;
 	drmModeConnectorPtr connectors[MAX_CONNECTORS];
 	drmModePropertyBlobPtr edids[MAX_CONNECTORS];
+	igt_display_t display;
 
 	uint32_t devid;
 };
@@ -254,29 +255,29 @@ static bool init_modeset_params_for_type(struct mode_set_data *data,
 {
 	drmModeConnectorPtr connector = NULL;
 	drmModeModeInfoPtr mode = NULL;
+	igt_output_t *output = NULL;
+	igt_display_t *display = &data->display;
 
-	if (!data->res)
+	if (!data->res || !display)
 		return false;
 
-	for (int i = 0; i < data->res->count_connectors; i++) {
-		drmModeConnectorPtr c = data->connectors[i];
+	for_each_connected_output(display, output) {
+		drmModeConnectorPtr c = output->config.connector;
 
 		if (type == SCREEN_TYPE_LPSP &&
-		    c->connector_type != DRM_MODE_CONNECTOR_eDP)
+		     !i915_output_is_lpsp_capable(drm_fd, output))
 			continue;
 
 		if (type == SCREEN_TYPE_NON_LPSP &&
-		    c->connector_type == DRM_MODE_CONNECTOR_eDP)
+		    i915_output_is_lpsp_capable(drm_fd, output))
 			continue;
 
-		if (c->connection == DRM_MODE_CONNECTED && c->count_modes) {
-			connector = c;
-			mode = &c->modes[0];
-			break;
-		}
+		connector = c;
+		mode = igt_output_get_mode(output);
+		break;
 	}
 
-	if (!connector)
+	if (!connector || !mode)
 		return false;
 
 	igt_create_pattern_fb(drm_fd, mode->hdisplay, mode->vdisplay,
@@ -397,6 +398,7 @@ static void init_mode_set_data(struct mode_set_data *data)
 		kmstest_set_vt_graphics_mode();
 	}
 
+	igt_display_require(&data->display, drm_fd);
 	data->devid = intel_get_drm_devid(drm_fd);
 	init_modeset_cached_params(&ms_data);
 }
@@ -410,6 +412,8 @@ static void fini_mode_set_data(struct mode_set_data *data)
 		}
 		drmModeFreeResources(data->res);
 	}
+
+	igt_display_fini(&data->display);
 }
 
 static void get_drm_info(struct compare_data *data)
@@ -760,7 +764,7 @@ static void dump_file(int dir, const char *filename)
 	free(contents);
 }
 
-static bool setup_environment(void)
+static bool setup_environment(bool display_disabled)
 {
 	if (has_runtime_pm)
 		goto out;
@@ -772,7 +776,8 @@ static bool setup_environment(void)
 	debugfs = igt_debugfs_dir(drm_fd);
 	igt_require(debugfs != -1);
 
-	init_mode_set_data(&ms_data);
+	if (!display_disabled)
+		init_mode_set_data(&ms_data);
 
 	igt_pm_enable_sata_link_power_management();
 
@@ -785,13 +790,14 @@ static bool setup_environment(void)
 	igt_require(igt_pm_dmc_loaded(debugfs));
 
 out:
-	disable_all_screens(&ms_data);
+	if (!display_disabled)
+		disable_all_screens(&ms_data);
 	dump_file(debugfs, "i915_runtime_pm_status");
 
 	return wait_for_suspended();
 }
 
-static void teardown_environment(void)
+static void teardown_environment(bool display_disabled)
 {
 	close(msr_fd);
 	if (has_pc8)
@@ -801,7 +807,8 @@ static void teardown_environment(void)
 
 	igt_pm_restore_sata_link_power_management();
 
-	fini_mode_set_data(&ms_data);
+	if (!display_disabled)
+		fini_mode_set_data(&ms_data);
 
 	close(debugfs);
 	close(drm_fd);
@@ -2004,7 +2011,7 @@ static struct option long_options[] = {
 igt_main_args("", long_options, help_str, opt_handler, NULL)
 {
 	igt_subtest("basic-rte") {
-		igt_assert(setup_environment());
+		igt_assert(setup_environment(false));
 		basic_subtest();
 	}
 
@@ -2012,7 +2019,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	 * PC8+. We don't want bug reports from cases where the machine is just
 	 * not properly configured. */
 	igt_fixture
-		igt_require(setup_environment());
+		igt_require(setup_environment(false));
 
 	if (stay)
 		igt_subtest("stay")
@@ -2142,7 +2149,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	}
 
 	igt_fixture
-		teardown_environment();
+		teardown_environment(false);
 
 	igt_subtest("module-reload") {
 		igt_debug("Reload w/o display\n");
@@ -2151,9 +2158,9 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		igt_kmsg(KMSG_INFO "Reloading i915 w/o display\n");
 		igt_assert_eq(igt_i915_driver_load("disable_display=1 mmio_debug=-1"), 0);
 
-		igt_assert(setup_environment());
+		igt_assert(setup_environment(true));
 		igt_assert(igt_wait(device_in_pci_d3(), 2000, 100));
-		teardown_environment();
+		teardown_environment(true);
 
 		igt_debug("Reload as normal\n");
 		igt_i915_driver_unload();
@@ -2161,11 +2168,11 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		igt_kmsg(KMSG_INFO "Reloading i915 as normal\n");
 		igt_assert_eq(igt_i915_driver_load("mmio_debug=-1"), 0);
 
-		igt_assert(setup_environment());
+		igt_assert(setup_environment(false));
 		igt_assert(igt_wait(device_in_pci_d3(), 2000, 100));
 		if (enable_one_screen_with_type(&ms_data, SCREEN_TYPE_ANY))
 			drm_resources_equal_subtest();
-		teardown_environment();
+		teardown_environment(false);
 
 		/* Remove our mmio_debugging module */
 		igt_i915_driver_unload();
-- 
2.26.0

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10)
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
                   ` (4 preceding siblings ...)
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 5/5] tests/i915_pm_rpm: lpsp/non-lpsp screen mode_set_data Anshuman Gupta
@ 2020-05-07 11:07 ` Patchwork
  2020-05-07 12:04   ` Anshuman Gupta
  2020-05-07 12:44 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
  2020-05-07 15:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 1 reply; 13+ messages in thread
From: Patchwork @ 2020-05-07 11:07 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

== Series Details ==

Series: lpsp platform agnostic support (rev10)
URL   : https://patchwork.freedesktop.org/series/74647/
State : failure

== Summary ==

CI Bug Log - changes from IGT_5638 -> IGTPW_4542
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_4542 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4542, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-bsw-kefka:       NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@runner@aborted.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@module-reload:
    - fi-bsw-kefka:       [PASS][2] -> [INCOMPLETE][3] ([i915#151] / [i915#392])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
    - fi-kbl-8809g:       [PASS][4] -> [SKIP][5] ([fdo#109271])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
  [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392


Participating hosts (49 -> 44)
------------------------------

  Additional (2): fi-bdw-gvtdvm fi-kbl-7560u 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5638 -> IGTPW_4542

  CI-20190529: 20190529
  CI_DRM_8441: 6c0ee41a7c3201ef2a89800234803a95f65989be @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4542: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
  IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@i915_pm_lpsp@kms-lpsp
-igt@i915_pm_lpsp@edp-native
-igt@i915_pm_lpsp@edp-panel-fitter
-igt@i915_pm_lpsp@non-edp

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10)
  2020-05-07 11:07 ` [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10) Patchwork
@ 2020-05-07 12:04   ` Anshuman Gupta
  2020-05-07 12:46     ` Vudum, Lakshminarayana
  0 siblings, 1 reply; 13+ messages in thread
From: Anshuman Gupta @ 2020-05-07 12:04 UTC (permalink / raw)
  To: igt-dev, lakshminarayana.vudum

On 2020-05-07 at 11:07:52 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: lpsp platform agnostic support (rev10)
> URL   : https://patchwork.freedesktop.org/series/74647/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from IGT_5638 -> IGTPW_4542
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with IGTPW_4542 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in IGTPW_4542, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in IGTPW_4542:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@runner@aborted:
>     - fi-bsw-kefka:       NOTRUN -> [FAIL][1]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@runner@aborted.html
Hi Lakshmi ,
Is above issue a known issue,
This is WARN_ON in kernel even before running my igt test case,
This is not related to this igt series https://patchwork.freedesktop.org/series/74647/
Could u please re-report the BAT run.
Thanks,
Anshuman Gupta.
> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in IGTPW_4542 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_pm_rpm@module-reload:
>     - fi-bsw-kefka:       [PASS][2] -> [INCOMPLETE][3] ([i915#151] / [i915#392])
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
>     - fi-kbl-8809g:       [PASS][4] -> [SKIP][5] ([fdo#109271])
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html
> 
>   
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
>   [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
> 
> 
> Participating hosts (49 -> 44)
> ------------------------------
> 
>   Additional (2): fi-bdw-gvtdvm fi-kbl-7560u 
>   Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * IGT: IGT_5638 -> IGTPW_4542
> 
>   CI-20190529: 20190529
>   CI_DRM_8441: 6c0ee41a7c3201ef2a89800234803a95f65989be @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGTPW_4542: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
>   IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> 
> 
> 
> == Testlist changes ==
> 
> +igt@i915_pm_lpsp@kms-lpsp
> -igt@i915_pm_lpsp@edp-native
> -igt@i915_pm_lpsp@edp-panel-fitter
> -igt@i915_pm_lpsp@non-edp
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lpsp platform agnostic support (rev10)
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
                   ` (5 preceding siblings ...)
  2020-05-07 11:07 ` [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10) Patchwork
@ 2020-05-07 12:44 ` Patchwork
  2020-05-07 15:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2020-05-07 12:44 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

== Series Details ==

Series: lpsp platform agnostic support (rev10)
URL   : https://patchwork.freedesktop.org/series/74647/
State : success

== Summary ==

CI Bug Log - changes from IGT_5638 -> IGTPW_4542
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_pm_rpm@module-reload:
    - fi-bsw-kefka:       [PASS][1] -> [INCOMPLETE][2] ([i915#151] / [i915#392])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
    - fi-kbl-8809g:       [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
  [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392


Participating hosts (49 -> 44)
------------------------------

  Additional (2): fi-bdw-gvtdvm fi-kbl-7560u 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5638 -> IGTPW_4542

  CI-20190529: 20190529
  CI_DRM_8441: 6c0ee41a7c3201ef2a89800234803a95f65989be @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4542: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
  IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@i915_pm_lpsp@kms-lpsp
-igt@i915_pm_lpsp@edp-native
-igt@i915_pm_lpsp@edp-panel-fitter
-igt@i915_pm_lpsp@non-edp

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10)
  2020-05-07 12:04   ` Anshuman Gupta
@ 2020-05-07 12:46     ` Vudum, Lakshminarayana
  0 siblings, 0 replies; 13+ messages in thread
From: Vudum, Lakshminarayana @ 2020-05-07 12:46 UTC (permalink / raw)
  To: Gupta, Anshuman, igt-dev

Addressed the issue and re-reported.

Thanks,
Lakshmi.

-----Original Message-----
From: Gupta, Anshuman <anshuman.gupta@intel.com> 
Sent: Thursday, May 7, 2020 3:05 PM
To: igt-dev@lists.freedesktop.org; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Subject: Re: ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10)

On 2020-05-07 at 11:07:52 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: lpsp platform agnostic support (rev10)
> URL   : https://patchwork.freedesktop.org/series/74647/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from IGT_5638 -> IGTPW_4542 
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with IGTPW_4542 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in IGTPW_4542, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in IGTPW_4542:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@runner@aborted:
>     - fi-bsw-kefka:       NOTRUN -> [FAIL][1]
>    [1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@r
> unner@aborted.html
Hi Lakshmi ,
Is above issue a known issue,
This is WARN_ON in kernel even before running my igt test case, This is not related to this igt series https://patchwork.freedesktop.org/series/74647/
Could u please re-report the BAT run.
Thanks,
Anshuman Gupta.
> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in IGTPW_4542 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@i915_pm_rpm@module-reload:
>     - fi-bsw-kefka:       [PASS][2] -> [INCOMPLETE][3] ([i915#151] / [i915#392])
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-bsw-kefka/igt@i915_pm_rpm@module-reload.html
>     - fi-kbl-8809g:       [PASS][4] -> [SKIP][5] ([fdo#109271])
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/fi-kbl-8809g/igt@i915_pm_rpm@module-reload.html
>    [5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/fi-kbl-8809g/igt@i
> 915_pm_rpm@module-reload.html
> 
>   
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
>   [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
> 
> 
> Participating hosts (49 -> 44)
> ------------------------------
> 
>   Additional (2): fi-bdw-gvtdvm fi-kbl-7560u 
>   Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * IGT: IGT_5638 -> IGTPW_4542
> 
>   CI-20190529: 20190529
>   CI_DRM_8441: 6c0ee41a7c3201ef2a89800234803a95f65989be @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGTPW_4542: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
>   IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ 
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> 
> 
> 
> == Testlist changes ==
> 
> +igt@i915_pm_lpsp@kms-lpsp
> -igt@i915_pm_lpsp@edp-native
> -igt@i915_pm_lpsp@edp-panel-fitter
> -igt@i915_pm_lpsp@non-edp
> 
> == Logs ==
> 
> For more details see: 
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for lpsp platform agnostic support (rev10)
  2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
                   ` (6 preceding siblings ...)
  2020-05-07 12:44 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2020-05-07 15:00 ` Patchwork
  7 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2020-05-07 15:00 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

== Series Details ==

Series: lpsp platform agnostic support (rev10)
URL   : https://patchwork.freedesktop.org/series/74647/
State : success

== Summary ==

CI Bug Log - changes from IGT_5638_full -> IGTPW_4542_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_4542_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4542_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Warnings ####

  * igt@i915_pm_lpsp@screens-disabled:
    - shard-tglb:         [SKIP][1] ([fdo#109301]) -> [SKIP][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-tglb5/igt@i915_pm_lpsp@screens-disabled.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-tglb8/igt@i915_pm_lpsp@screens-disabled.html
    - shard-iclb:         [SKIP][3] ([fdo#109301]) -> [SKIP][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-iclb2/igt@i915_pm_lpsp@screens-disabled.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-iclb4/igt@i915_pm_lpsp@screens-disabled.html

  
New tests
---------

  New tests have been introduced between IGT_5638_full and IGTPW_4542_full:

### New IGT tests (5) ###

  * igt@i915_pm_lpsp@kms-lpsp:
    - Statuses :
    - Exec time: [None] s

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - Statuses : 2 skip(s)
    - Exec time: [0.0] s

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-edp:
    - Statuses : 2 pass(s)
    - Exec time: [0.11, 0.17] s

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
    - Statuses : 2 skip(s)
    - Exec time: [0.0] s

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-vga:
    - Statuses : 2 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s3-devices:
    - shard-kbl:          [PASS][5] -> [FAIL][6] ([i915#1158])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl7/igt@gem_exec_suspend@basic-s3-devices.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl4/igt@gem_exec_suspend@basic-s3-devices.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-glk:          [PASS][7] -> [DMESG-WARN][8] ([i915#716])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-glk5/igt@gen9_exec_parse@allowed-all.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-glk9/igt@gen9_exec_parse@allowed-all.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen:
    - shard-kbl:          [PASS][9] -> [FAIL][10] ([i915#54] / [i915#93] / [i915#95])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-256x256-offscreen.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][11] -> [DMESG-FAIL][12] ([i915#180] / [i915#54])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl7/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl1/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
    - shard-kbl:          [PASS][13] -> [DMESG-FAIL][14] ([i915#180] / [i915#54])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled:
    - shard-apl:          [PASS][15] -> [FAIL][16] ([i915#52] / [i915#54] / [i915#95])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl4/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl6/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
    - shard-kbl:          [PASS][17] -> [FAIL][18] ([i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl7/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl3/igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +2 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-apl:          [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109441]) +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-iclb6/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - shard-kbl:          [PASS][25] -> [FAIL][26] ([fdo#103375]) +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl2/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl4/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html

  * igt@vgem_slow@nohang:
    - shard-hsw:          [PASS][27] -> [INCOMPLETE][28] ([i915#61])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-hsw1/igt@vgem_slow@nohang.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-hsw7/igt@vgem_slow@nohang.html

  
#### Possible fixes ####

  * {igt@gem_ctx_isolation@preservation-s3@rcs0}:
    - shard-apl:          [DMESG-WARN][29] ([i915#180]) -> [PASS][30] +3 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl6/igt@gem_ctx_isolation@preservation-s3@rcs0.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl2/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@kms_big_fb@linear-32bpp-rotate-0:
    - shard-kbl:          [FAIL][31] ([i915#1119] / [i915#93] / [i915#95]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl6/igt@kms_big_fb@linear-32bpp-rotate-0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl7/igt@kms_big_fb@linear-32bpp-rotate-0.html
    - shard-apl:          [FAIL][33] ([i915#1119] / [i915#95]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl2/igt@kms_big_fb@linear-32bpp-rotate-0.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl8/igt@kms_big_fb@linear-32bpp-rotate-0.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen:
    - shard-kbl:          [FAIL][35] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][36] +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
    - shard-kbl:          [FAIL][37] ([i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl1/igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl1/igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled.html
    - shard-apl:          [FAIL][39] ([i915#52] / [i915#54] / [i915#95]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl6/igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl4/igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [SKIP][41] ([fdo#109441]) -> [PASS][42] +3 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-iclb5/igt@kms_psr@psr2_primary_mmap_cpu.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][43] ([i915#31]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl3/igt@kms_setmode@basic.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl6/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-kbl:          [INCOMPLETE][45] ([i915#155] / [i915#794]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl3/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Warnings ####

  * igt@i915_pm_rpm@gem-idle:
    - shard-snb:          [INCOMPLETE][47] ([i915#82]) -> [SKIP][48] ([fdo#109271])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-snb5/igt@i915_pm_rpm@gem-idle.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-snb1/igt@i915_pm_rpm@gem-idle.html

  * igt@kms_content_protection@atomic-dpms:
    - shard-apl:          [FAIL][49] ([fdo#110321] / [fdo#110336]) -> [TIMEOUT][50] ([i915#1319])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl4/igt@kms_content_protection@atomic-dpms.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl7/igt@kms_content_protection@atomic-dpms.html

  * igt@kms_content_protection@legacy:
    - shard-apl:          [TIMEOUT][51] ([i915#1319]) -> [FAIL][52] ([fdo#110321] / [fdo#110336])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl2/igt@kms_content_protection@legacy.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl4/igt@kms_content_protection@legacy.html

  * igt@kms_content_protection@srm:
    - shard-apl:          [FAIL][53] ([fdo#110321] / [i915#95]) -> [FAIL][54] ([fdo#110321])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl1/igt@kms_content_protection@srm.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl1/igt@kms_content_protection@srm.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
    - shard-apl:          [FAIL][55] ([fdo#108145] / [i915#265]) -> [FAIL][56] ([fdo#108145] / [i915#265] / [i915#95]) +2 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl1/igt@kms_plane_alpha_blend@pipe-a-alpha-basic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-alpha-basic.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          [FAIL][57] ([fdo#108145] / [i915#265] / [i915#95]) -> [FAIL][58] ([fdo#108145] / [i915#265])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-apl7/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-apl4/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html
    - shard-kbl:          [FAIL][59] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95]) -> [FAIL][60] ([fdo#108145] / [i915#265])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl1/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl1/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-kbl:          [FAIL][61] ([fdo#108145] / [i915#265]) -> [FAIL][62] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95]) +1 similar issue
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5638/shard-kbl7/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/shard-kbl3/igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109301]: https://bugs.freedesktop.org/show_bug.cgi?id=109301
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
  [fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
  [i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
  [i915#1158]: https://gitlab.freedesktop.org/drm/intel/issues/1158
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#177]: https://gitlab.freedesktop.org/drm/intel/issues/177
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
  [i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


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

  No changes in participating hosts


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5638 -> IGTPW_4542

  CI-20190529: 20190529
  CI_DRM_8441: 6c0ee41a7c3201ef2a89800234803a95f65989be @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4542: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
  IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4542/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support Anshuman Gupta
@ 2020-05-11  8:28   ` Manna, Animesh
  2020-05-11 11:57   ` Nautiyal, Ankit K
  1 sibling, 0 replies; 13+ messages in thread
From: Manna, Animesh @ 2020-05-11  8:28 UTC (permalink / raw)
  To: Anshuman Gupta, igt-dev; +Cc: jani.nikula


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


On 07-05-2020 15:52, Anshuman Gupta wrote:
> Current implementation of lpsp igt test, assumed that every non-edp
> panel isn't a lpsp panel but it is not true on TGL anymore,
> any HDMI/DP/DSI panel connected on pipe A and connected to PORT_{A,B,C}
> can drive LPSP.
> Even on older Gen9 platform a DP panel can drive lpsp on Port A.
> This requires complete design change in current lpsp igt for a platform
> agnostic support.
>
> The new igt approach is relies on connector specific
> i915_lpsp_capability and i915_lpsp_status debugfs attributes,
> these debugfs exposes whether an output is capable of driving lpsp
> and lpsp is enabled.
>
> Nuking edp-native and non-edp test, introducing a new dynamic
> igt subtest kms-lpsp, which validates lpsp on each connected output
> and skip the subtest if output is not lpsp capable.
>
> Skip screens-disabled test for platform which support DC states.
> screens-disabled test is only valid for the platforms like HSW/BDW
> where PG1 is Always-ON power domain, so these platform test lpsp
> with all screen disabled i.e validate PG2 when all screen are
> disabled.
> DC state i.e DMC f/w supported platforms don't have any ROI to validate
> screens-disabled subtest as existing dc*-dpms i915_pm_dc
> subtest already validate it implicitly.
>
> v2:
> - CI failures fixup.
> v3:
> - removed unloading of snd_modules. [Martin]
> v4:
> - Don't test non-lpsp(if lpsp disabled), no ROI to test that.
> - nuke panel-fitter test.
> v5:
> - Added dynamic subtest and igt changes according to kernel
>    debugfs i915_lpsp_status changes.
> v6:
> - Avoided pipe big joiner by using 4k or lesser mode,
>    so igt will not fail when pipe big joiner patches will
>    land to kernel.
> v7:
> - Combined [v6 4/6] patch to this patch, skip the screens-disabled
>    subtest for DC state supported platforms. [Animesh]
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>

Changes looks ok to me.
Reviewed-by: Animesh Manna <animesh.manna@intel.com>

Regards,
Animesh

> ---
>   tests/i915/i915_pm_lpsp.c | 313 ++++++++++++++++++--------------------
>   1 file changed, 147 insertions(+), 166 deletions(-)
>
> diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
> index 08f82e7c..46937efb 100644
> --- a/tests/i915/i915_pm_lpsp.c
> +++ b/tests/i915/i915_pm_lpsp.c
> @@ -25,210 +25,191 @@
>    */
>   
>   #include "igt.h"
> +#include "igt_kmod.h"
> +#include "igt_pm.h"
> +#include "igt_sysfs.h"
>   #include <sys/types.h>
>   #include <sys/stat.h>
>   #include <fcntl.h>
>   #include <unistd.h>
>   
> +#define MAX_SINK_LPSP_INFO_BUF_LEN	4096
>   
> -static bool supports_lpsp(uint32_t devid)
> -{
> -	return IS_HASWELL(devid) || IS_BROADWELL(devid);
> -}
> +#define PWR_DOMAIN_INFO "i915_power_domain_info"
>   
> -static bool lpsp_is_enabled(int drm_fd)
> +typedef struct {
> +	int drm_fd;
> +	int debugfs_fd;
> +	uint32_t devid;
> +	char *pwr_dmn_info;
> +	igt_display_t display;
> +	struct igt_fb fb;
> +	drmModeModeInfo *mode;
> +	igt_output_t *output;
> +} data_t;
> +
> +static bool lpsp_is_enabled(data_t *data)
>   {
> -	uint32_t val;
> +	char buf[MAX_SINK_LPSP_INFO_BUF_LEN];
> +	int len;
>   
> -	val = INREG(HSW_PWR_WELL_CTL2);
> -	return !(val & HSW_PWR_WELL_STATE_ENABLED);
> -}
> +	len = igt_debugfs_simple_read(data->debugfs_fd, "i915_lpsp_status",
> +				      buf, sizeof(buf));
> +	if (len < 0)
> +		igt_assert_eq(len, -ENODEV);
>   
> -/* The LPSP mode is all about an enabled pipe, but we expect to also be in the
> - * low power mode when no pipes are enabled, so do this check anyway. */
> -static void screens_disabled_subtest(int drm_fd, drmModeResPtr drm_res)
> -{
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -	igt_assert(lpsp_is_enabled(drm_fd));
> +	igt_skip_on(strstr(buf, "LPSP: not supported"));
> +
> +	return strstr(buf, "LPSP: enabled");
>   }
>   
> -static uint32_t create_fb(int drm_fd, int width, int height)
> +static bool dmc_supported(int debugfs)
>   {
> -	struct igt_fb fb;
> +	char buf[15];
> +	int len;
>   
> -	return igt_create_pattern_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888,
> -				     LOCAL_DRM_FORMAT_MOD_NONE, &fb);
> +	len = igt_sysfs_read(debugfs, "i915_dmc_info", buf, sizeof(buf) - 1);
> +
> +	if (len < 0)
> +		return false;
> +	else
> +		return true;
>   }
>   
> -static void edp_subtest(int drm_fd, drmModeResPtr drm_res,
> -			drmModeConnectorPtr *drm_connectors, uint32_t devid,
> -			bool use_panel_fitter)
> +/*
> + * The LPSP mode is all about an enabled pipe, but we expect to also be in the
> + * low power mode when no pipes are enabled, so do this check anyway.
> + */
> +static void screens_disabled_subtest(data_t *data)
>   {
> -	int i, rc;
> -	uint32_t crtc_id = 0, buffer_id = 0;
> -	drmModeConnectorPtr connector = NULL;
> -	drmModeModeInfoPtr mode = NULL;
> -	drmModeModeInfo std_1024_mode = {
> -		.clock = 65000,
> -		.hdisplay = 1024,
> -		.hsync_start = 1048,
> -		.hsync_end = 1184,
> -		.htotal = 1344,
> -		.hskew = 0,
> -		.vdisplay = 768,
> -		.vsync_start = 771,
> -		.vsync_end = 777,
> -		.vtotal = 806,
> -		.vscan = 0,
> -		.vrefresh = 60,
> -		.flags = 0xA,
> -		.type = 0x40,
> -		.name = "Custom 1024x768",
> -	};
> -
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -
> -	for (i = 0; i < drm_res->count_connectors; i++) {
> -		drmModeConnectorPtr c = drm_connectors[i];
> -
> -		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> -			continue;
> -		if (c->connection != DRM_MODE_CONNECTED)
> -			continue;
> -
> -		if (!use_panel_fitter && c->count_modes) {
> -			connector = c;
> -			mode = &c->modes[0];
> -			break;
> -		}
> -		if (use_panel_fitter) {
> -			connector = c;
> -
> -			/* This is one of the modes Xorg creates for panels, so
> -			 * it should work just fine. Notice that Gens that
> -			 * support LPSP are too new for panels with native
> -			 * 1024x768 resolution, so this should force the panel
> -			 * fitter. */
> -			igt_assert(c->count_modes &&
> -				   c->modes[0].hdisplay > 1024);
> -			igt_assert(c->count_modes &&
> -				   c->modes[0].vdisplay > 768);
> -			mode = &std_1024_mode;
> -			break;
> -		}
> -	}
> -	igt_require(connector);
> -
> -	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
> -						  0);
> -	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
> -
> -	igt_assert(buffer_id);
> -	igt_assert(connector);
> -	igt_assert(mode);
> -
> -	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
> -			    &connector->connector_id, 1, mode);
> -	igt_assert_eq(rc, 0);
> -
> -	if (use_panel_fitter) {
> -		if (IS_HASWELL(devid))
> -			igt_assert(!lpsp_is_enabled(drm_fd));
> -		else
> -			igt_assert(lpsp_is_enabled(drm_fd));
> -	} else {
> -		igt_assert(lpsp_is_enabled(drm_fd));
> +	igt_output_t *output;
> +	int valid_output = 0;
> +	enum pipe pipe;
> +
> +	for_each_pipe_with_single_output(&data->display, pipe, output) {
> +		data->output = output;
> +		igt_output_set_pipe(data->output, PIPE_NONE);
> +		igt_display_commit(&data->display);
> +		valid_output++;
>   	}
> +
> +	igt_require_f(valid_output, "No connected output found\n");
> +	igt_assert_f(lpsp_is_enabled(data), "lpsp is not enabled\n%s:\n%s\n",
> +		     PWR_DOMAIN_INFO, data->pwr_dmn_info =
> +		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
>   }
>   
> -static void non_edp_subtest(int drm_fd, drmModeResPtr drm_res,
> -			    drmModeConnectorPtr *drm_connectors)
> +static void setup_lpsp_output(data_t *data)
>   {
> -	int i, rc;
> -	uint32_t crtc_id = 0, buffer_id = 0;
> -	drmModeConnectorPtr connector = NULL;
> -	drmModeModeInfoPtr mode = NULL;
> -
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -
> -	for (i = 0; i < drm_res->count_connectors; i++) {
> -		drmModeConnectorPtr c = drm_connectors[i];
> +	igt_plane_t *primary;
> +
> +	/* set output pipe = PIPE_A for LPSP */
> +	igt_output_set_pipe(data->output, PIPE_A);
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_create_pattern_fb(data->drm_fd,
> +			      data->mode->hdisplay, data->mode->vdisplay,
> +			      DRM_FORMAT_XRGB8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb);
> +	igt_plane_set_fb(primary, &data->fb);
> +	igt_display_commit(&data->display);
> +}
>   
> -		if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
> -			continue;
> -		if (c->connection != DRM_MODE_CONNECTED)
> -			continue;
> +static void test_cleanup(data_t *data)
> +{
> +	igt_plane_t *primary;
> +
> +	if (!data->output || data->output->pending_pipe == PIPE_NONE)
> +		return;
> +
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_output_set_pipe(data->output, PIPE_NONE);
> +	igt_display_commit(&data->display);
> +	igt_remove_fb(data->drm_fd, &data->fb);
> +	data->output = NULL;
> +}
>   
> -		if (c->count_modes) {
> -			connector = c;
> -			mode = &c->modes[0];
> -			break;
> +static void test_lpsp(data_t *data)
> +{
> +	drmModeConnectorPtr c = data->output->config.connector;
> +	int i;
> +
> +	/* LPSP is low power single pipe usages i.e. PIPE_A */
> +	igt_require(igt_pipe_connector_valid(PIPE_A, data->output));
> +	igt_require_f(i915_output_is_lpsp_capable(data->drm_fd, data->output),
> +		      "output is not lpsp capable\n");
> +
> +	data->mode = igt_output_get_mode(data->output);
> +
> +	/* For LPSP avoid pipe big joiner by atleast 4k mode */
> +	if (data->mode->hdisplay > 3860 && data->mode->vdisplay > 2160)
> +		for (i = 1; i < c->count_modes; i++) {
> +			if (c->modes[i].hdisplay <= 3860 &&
> +			    c->modes[i].vdisplay <= 2160) {
> +				data->mode = &c->modes[i];
> +				igt_output_override_mode(data->output,
> +							 data->mode);
> +				break;
> +			}
>   		}
> -	}
> -	igt_require(connector);
> -
> -	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
> -						  0);
> -	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
> -
> -	igt_assert(buffer_id);
> -	igt_assert(mode);
>   
> -	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
> -			    &connector->connector_id, 1, mode);
> -	igt_assert_eq(rc, 0);
> +	igt_require(data->mode->hdisplay <= 3860 &&
> +		    data->mode->vdisplay <= 2160);
>   
> -	igt_assert(!lpsp_is_enabled(drm_fd));
> +	setup_lpsp_output(data);
> +	igt_assert_f(lpsp_is_enabled(data), "%s: lpsp is not enabled\n%s:\n%s\n",
> +		     data->output->name, PWR_DOMAIN_INFO, data->pwr_dmn_info =
> +		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
>   }
>   
> -#define MAX_CONNECTORS 32
> -
> -int drm_fd;
> -uint32_t devid;
> -drmModeResPtr drm_res;
> -drmModeConnectorPtr drm_connectors[MAX_CONNECTORS];
> -struct intel_mmio_data mmio_data;
> +IGT_TEST_DESCRIPTION("These tests validates display Low Power Single Pipe configurations");
>   igt_main
>   {
> -	igt_fixture {
> -		int i;
> -
> -		drm_fd = drm_open_driver_master(DRIVER_INTEL);
> -		igt_require(drm_fd >= 0);
> -
> -		devid = intel_get_drm_devid(drm_fd);
> -
> -		drm_res = drmModeGetResources(drm_fd);
> -		igt_require(drm_res);
> -		igt_assert(drm_res->count_connectors <= MAX_CONNECTORS);
> +	data_t data = {};
>   
> -		for (i = 0; i < drm_res->count_connectors; i++)
> -			drm_connectors[i] = drmModeGetConnectorCurrent(drm_fd,
> -							drm_res->connectors[i]);
> +	igt_fixture {
>   
> +		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> +		igt_require(data.drm_fd >= 0);
> +		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> +		igt_require(data.debugfs_fd >= 0);
>   		igt_pm_enable_audio_runtime_pm();
> +		kmstest_set_vt_graphics_mode();
> +		data.devid = intel_get_drm_devid(data.drm_fd);
> +		igt_display_require(&data.display, data.drm_fd);
> +		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
> +	}
>   
> -		igt_require(supports_lpsp(devid));
> +	igt_describe("This test validates lpsp while all crtc are disabled");
> +	igt_subtest("screens-disabled") {
> +		igt_require_f(!dmc_supported(data.debugfs_fd),
> +			      "DC states supported platform don't have ROI for this subtest\n");
> +		screens_disabled_subtest(&data);
> +	}
>   
> -		intel_register_access_init(&mmio_data, intel_get_pci_device(), 0, drm_fd);
> +	igt_describe("This test validates lpsp on all connected outputs on low power PIPE_A");
> +	igt_subtest_with_dynamic_f("kms-lpsp") {
> +		igt_display_t *display = &data.display;
> +		igt_output_t *output;
>   
> -		kmstest_set_vt_graphics_mode();
> -	}
> +		for_each_connected_output(display, output) {
> +			igt_dynamic_f("kms-lpsp-%s",
> +				      kmstest_connector_type_str(output->config.connector->connector_type)) {
> +				data.output = output;
> +				test_lpsp(&data);
> +			}
>   
> -	igt_subtest("screens-disabled")
> -		screens_disabled_subtest(drm_fd, drm_res);
> -	igt_subtest("edp-native")
> -		edp_subtest(drm_fd, drm_res, drm_connectors, devid, false);
> -	igt_subtest("non-edp")
> -		non_edp_subtest(drm_fd, drm_res, drm_connectors);
> +			test_cleanup(&data);
> +		}
> +	}
>   
>   	igt_fixture {
> -		int i;
> -
> -		intel_register_access_fini(&mmio_data);
> -		for (i = 0; i < drm_res->count_connectors; i++)
> -			drmModeFreeConnector(drm_connectors[i]);
> -		drmModeFreeResources(drm_res);
> -		close(drm_fd);
> +		free(data.pwr_dmn_info);
> +		close(data.drm_fd);
> +		igt_display_fini(&data.display);
>   	}
>   }

[-- Attachment #1.2: Type: text/html, Size: 13583 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] 13+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support
  2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support Anshuman Gupta
  2020-05-11  8:28   ` Manna, Animesh
@ 2020-05-11 11:57   ` Nautiyal, Ankit K
  1 sibling, 0 replies; 13+ messages in thread
From: Nautiyal, Ankit K @ 2020-05-11 11:57 UTC (permalink / raw)
  To: Anshuman Gupta, igt-dev; +Cc: jani.nikula



On 5/7/2020 3:52 PM, Anshuman Gupta wrote:
> Current implementation of lpsp igt test, assumed that every non-edp
> panel isn't a lpsp panel but it is not true on TGL anymore,
> any HDMI/DP/DSI panel connected on pipe A and connected to PORT_{A,B,C}
> can drive LPSP.
> Even on older Gen9 platform a DP panel can drive lpsp on Port A.
> This requires complete design change in current lpsp igt for a platform
> agnostic support.
>
> The new igt approach is relies on connector specific
> i915_lpsp_capability and i915_lpsp_status debugfs attributes,
> these debugfs exposes whether an output is capable of driving lpsp
> and lpsp is enabled.
>
> Nuking edp-native and non-edp test, introducing a new dynamic
> igt subtest kms-lpsp, which validates lpsp on each connected output
> and skip the subtest if output is not lpsp capable.
>
> Skip screens-disabled test for platform which support DC states.
> screens-disabled test is only valid for the platforms like HSW/BDW
> where PG1 is Always-ON power domain, so these platform test lpsp
> with all screen disabled i.e validate PG2 when all screen are
> disabled.
> DC state i.e DMC f/w supported platforms don't have any ROI to validate
> screens-disabled subtest as existing dc*-dpms i915_pm_dc
> subtest already validate it implicitly.
>
> v2:
> - CI failures fixup.
> v3:
> - removed unloading of snd_modules. [Martin]
> v4:
> - Don't test non-lpsp(if lpsp disabled), no ROI to test that.
> - nuke panel-fitter test.
> v5:
> - Added dynamic subtest and igt changes according to kernel
>    debugfs i915_lpsp_status changes.
> v6:
> - Avoided pipe big joiner by using 4k or lesser mode,
>    so igt will not fail when pipe big joiner patches will
>    land to kernel.
> v7:
> - Combined [v6 4/6] patch to this patch, skip the screens-disabled
>    subtest for DC state supported platforms. [Animesh]
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>   tests/i915/i915_pm_lpsp.c | 313 ++++++++++++++++++--------------------
>   1 file changed, 147 insertions(+), 166 deletions(-)
>
> diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
> index 08f82e7c..46937efb 100644
> --- a/tests/i915/i915_pm_lpsp.c
> +++ b/tests/i915/i915_pm_lpsp.c
> @@ -25,210 +25,191 @@
>    */
>   
>   #include "igt.h"
> +#include "igt_kmod.h"
> +#include "igt_pm.h"
> +#include "igt_sysfs.h"
>   #include <sys/types.h>
>   #include <sys/stat.h>
>   #include <fcntl.h>
>   #include <unistd.h>
>   
> +#define MAX_SINK_LPSP_INFO_BUF_LEN	4096
>   
> -static bool supports_lpsp(uint32_t devid)
> -{
> -	return IS_HASWELL(devid) || IS_BROADWELL(devid);
> -}
> +#define PWR_DOMAIN_INFO "i915_power_domain_info"
>   
> -static bool lpsp_is_enabled(int drm_fd)
> +typedef struct {
> +	int drm_fd;
> +	int debugfs_fd;
> +	uint32_t devid;
> +	char *pwr_dmn_info;
> +	igt_display_t display;
> +	struct igt_fb fb;
> +	drmModeModeInfo *mode;
> +	igt_output_t *output;
> +} data_t;
> +
> +static bool lpsp_is_enabled(data_t *data)
>   {
> -	uint32_t val;
> +	char buf[MAX_SINK_LPSP_INFO_BUF_LEN];
> +	int len;
>   
> -	val = INREG(HSW_PWR_WELL_CTL2);
> -	return !(val & HSW_PWR_WELL_STATE_ENABLED);
> -}
> +	len = igt_debugfs_simple_read(data->debugfs_fd, "i915_lpsp_status",
> +				      buf, sizeof(buf));
> +	if (len < 0)
> +		igt_assert_eq(len, -ENODEV);
>   
> -/* The LPSP mode is all about an enabled pipe, but we expect to also be in the
> - * low power mode when no pipes are enabled, so do this check anyway. */
> -static void screens_disabled_subtest(int drm_fd, drmModeResPtr drm_res)
> -{
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -	igt_assert(lpsp_is_enabled(drm_fd));
> +	igt_skip_on(strstr(buf, "LPSP: not supported"));
> +
> +	return strstr(buf, "LPSP: enabled");
>   }
>   
> -static uint32_t create_fb(int drm_fd, int width, int height)
> +static bool dmc_supported(int debugfs)
>   {
> -	struct igt_fb fb;
> +	char buf[15];
> +	int len;
>   
> -	return igt_create_pattern_fb(drm_fd, width, height, DRM_FORMAT_XRGB8888,
> -				     LOCAL_DRM_FORMAT_MOD_NONE, &fb);
> +	len = igt_sysfs_read(debugfs, "i915_dmc_info", buf, sizeof(buf) - 1);
> +
> +	if (len < 0)
> +		return false;
> +	else
> +		return true;
>   }
>   
> -static void edp_subtest(int drm_fd, drmModeResPtr drm_res,
> -			drmModeConnectorPtr *drm_connectors, uint32_t devid,
> -			bool use_panel_fitter)
> +/*
> + * The LPSP mode is all about an enabled pipe, but we expect to also be in the
> + * low power mode when no pipes are enabled, so do this check anyway.
> + */
> +static void screens_disabled_subtest(data_t *data)
>   {
> -	int i, rc;
> -	uint32_t crtc_id = 0, buffer_id = 0;
> -	drmModeConnectorPtr connector = NULL;
> -	drmModeModeInfoPtr mode = NULL;
> -	drmModeModeInfo std_1024_mode = {
> -		.clock = 65000,
> -		.hdisplay = 1024,
> -		.hsync_start = 1048,
> -		.hsync_end = 1184,
> -		.htotal = 1344,
> -		.hskew = 0,
> -		.vdisplay = 768,
> -		.vsync_start = 771,
> -		.vsync_end = 777,
> -		.vtotal = 806,
> -		.vscan = 0,
> -		.vrefresh = 60,
> -		.flags = 0xA,
> -		.type = 0x40,
> -		.name = "Custom 1024x768",
> -	};
> -
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -
> -	for (i = 0; i < drm_res->count_connectors; i++) {
> -		drmModeConnectorPtr c = drm_connectors[i];
> -
> -		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
> -			continue;
> -		if (c->connection != DRM_MODE_CONNECTED)
> -			continue;
> -
> -		if (!use_panel_fitter && c->count_modes) {
> -			connector = c;
> -			mode = &c->modes[0];
> -			break;
> -		}
> -		if (use_panel_fitter) {
> -			connector = c;
> -
> -			/* This is one of the modes Xorg creates for panels, so
> -			 * it should work just fine. Notice that Gens that
> -			 * support LPSP are too new for panels with native
> -			 * 1024x768 resolution, so this should force the panel
> -			 * fitter. */
> -			igt_assert(c->count_modes &&
> -				   c->modes[0].hdisplay > 1024);
> -			igt_assert(c->count_modes &&
> -				   c->modes[0].vdisplay > 768);
> -			mode = &std_1024_mode;
> -			break;
> -		}
> -	}
> -	igt_require(connector);
> -
> -	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
> -						  0);
> -	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
> -
> -	igt_assert(buffer_id);
> -	igt_assert(connector);
> -	igt_assert(mode);
> -
> -	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
> -			    &connector->connector_id, 1, mode);
> -	igt_assert_eq(rc, 0);
> -
> -	if (use_panel_fitter) {
> -		if (IS_HASWELL(devid))
> -			igt_assert(!lpsp_is_enabled(drm_fd));
> -		else
> -			igt_assert(lpsp_is_enabled(drm_fd));
> -	} else {
> -		igt_assert(lpsp_is_enabled(drm_fd));
> +	igt_output_t *output;
> +	int valid_output = 0;
> +	enum pipe pipe;
> +
> +	for_each_pipe_with_single_output(&data->display, pipe, output) {
> +		data->output = output;
> +		igt_output_set_pipe(data->output, PIPE_NONE);
> +		igt_display_commit(&data->display);
> +		valid_output++;
>   	}
> +
> +	igt_require_f(valid_output, "No connected output found\n");
> +	igt_assert_f(lpsp_is_enabled(data), "lpsp is not enabled\n%s:\n%s\n",
> +		     PWR_DOMAIN_INFO, data->pwr_dmn_info =
> +		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
>   }
>   
> -static void non_edp_subtest(int drm_fd, drmModeResPtr drm_res,
> -			    drmModeConnectorPtr *drm_connectors)
> +static void setup_lpsp_output(data_t *data)
>   {
> -	int i, rc;
> -	uint32_t crtc_id = 0, buffer_id = 0;
> -	drmModeConnectorPtr connector = NULL;
> -	drmModeModeInfoPtr mode = NULL;
> -
> -	kmstest_unset_all_crtcs(drm_fd, drm_res);
> -
> -	for (i = 0; i < drm_res->count_connectors; i++) {
> -		drmModeConnectorPtr c = drm_connectors[i];
> +	igt_plane_t *primary;
> +
> +	/* set output pipe = PIPE_A for LPSP */
> +	igt_output_set_pipe(data->output, PIPE_A);
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_create_pattern_fb(data->drm_fd,
> +			      data->mode->hdisplay, data->mode->vdisplay,
> +			      DRM_FORMAT_XRGB8888,
> +			      LOCAL_DRM_FORMAT_MOD_NONE,
> +			      &data->fb);
> +	igt_plane_set_fb(primary, &data->fb);
> +	igt_display_commit(&data->display);
> +}
>   
> -		if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
> -			continue;
> -		if (c->connection != DRM_MODE_CONNECTED)
> -			continue;
> +static void test_cleanup(data_t *data)
> +{
> +	igt_plane_t *primary;
> +
> +	if (!data->output || data->output->pending_pipe == PIPE_NONE)
> +		return;
> +
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +	igt_plane_set_fb(primary, NULL);
> +	igt_output_set_pipe(data->output, PIPE_NONE);
> +	igt_display_commit(&data->display);
> +	igt_remove_fb(data->drm_fd, &data->fb);
> +	data->output = NULL;
> +}
>   
> -		if (c->count_modes) {
> -			connector = c;
> -			mode = &c->modes[0];
> -			break;
> +static void test_lpsp(data_t *data)
> +{
> +	drmModeConnectorPtr c = data->output->config.connector;
> +	int i;
> +
> +	/* LPSP is low power single pipe usages i.e. PIPE_A */
> +	igt_require(igt_pipe_connector_valid(PIPE_A, data->output));
> +	igt_require_f(i915_output_is_lpsp_capable(data->drm_fd, data->output),
> +		      "output is not lpsp capable\n");
> +
> +	data->mode = igt_output_get_mode(data->output);
> +
> +	/* For LPSP avoid pipe big joiner by atleast 4k mode */
> +	if (data->mode->hdisplay > 3860 && data->mode->vdisplay > 2160)


For 4K mode the resolution is either 4096 x 2160 or 3840 x 2160.
should the hdisplay be 3840 instead?

Also, should we check from the first mode, not sure if the first mode is 
always the default mode.

Regards,
Ankit
> +		for (i = 1; i < c->count_modes; i++) {
> +			if (c->modes[i].hdisplay <= 3860 &&
> +			    c->modes[i].vdisplay <= 2160) {
> +				data->mode = &c->modes[i];
> +				igt_output_override_mode(data->output,
> +							 data->mode);
> +				break;
> +			}
>   		}
> -	}
> -	igt_require(connector);
> -
> -	crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
> -						  0);
> -	buffer_id = create_fb(drm_fd, mode->hdisplay, mode->vdisplay);
> -
> -	igt_assert(buffer_id);
> -	igt_assert(mode);
>   
> -	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0,
> -			    &connector->connector_id, 1, mode);
> -	igt_assert_eq(rc, 0);
> +	igt_require(data->mode->hdisplay <= 3860 &&
> +		    data->mode->vdisplay <= 2160);
>   
> -	igt_assert(!lpsp_is_enabled(drm_fd));
> +	setup_lpsp_output(data);
> +	igt_assert_f(lpsp_is_enabled(data), "%s: lpsp is not enabled\n%s:\n%s\n",
> +		     data->output->name, PWR_DOMAIN_INFO, data->pwr_dmn_info =
> +		     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
>   }
>   
> -#define MAX_CONNECTORS 32
> -
> -int drm_fd;
> -uint32_t devid;
> -drmModeResPtr drm_res;
> -drmModeConnectorPtr drm_connectors[MAX_CONNECTORS];
> -struct intel_mmio_data mmio_data;
> +IGT_TEST_DESCRIPTION("These tests validates display Low Power Single Pipe configurations");
>   igt_main
>   {
> -	igt_fixture {
> -		int i;
> -
> -		drm_fd = drm_open_driver_master(DRIVER_INTEL);
> -		igt_require(drm_fd >= 0);
> -
> -		devid = intel_get_drm_devid(drm_fd);
> -
> -		drm_res = drmModeGetResources(drm_fd);
> -		igt_require(drm_res);
> -		igt_assert(drm_res->count_connectors <= MAX_CONNECTORS);
> +	data_t data = {};
>   
> -		for (i = 0; i < drm_res->count_connectors; i++)
> -			drm_connectors[i] = drmModeGetConnectorCurrent(drm_fd,
> -							drm_res->connectors[i]);
> +	igt_fixture {
>   
> +		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> +		igt_require(data.drm_fd >= 0);
> +		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> +		igt_require(data.debugfs_fd >= 0);
>   		igt_pm_enable_audio_runtime_pm();
> +		kmstest_set_vt_graphics_mode();
> +		data.devid = intel_get_drm_devid(data.drm_fd);
> +		igt_display_require(&data.display, data.drm_fd);
> +		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
> +	}
>   
> -		igt_require(supports_lpsp(devid));
> +	igt_describe("This test validates lpsp while all crtc are disabled");
> +	igt_subtest("screens-disabled") {
> +		igt_require_f(!dmc_supported(data.debugfs_fd),
> +			      "DC states supported platform don't have ROI for this subtest\n");
> +		screens_disabled_subtest(&data);
> +	}
>   
> -		intel_register_access_init(&mmio_data, intel_get_pci_device(), 0, drm_fd);
> +	igt_describe("This test validates lpsp on all connected outputs on low power PIPE_A");
> +	igt_subtest_with_dynamic_f("kms-lpsp") {
> +		igt_display_t *display = &data.display;
> +		igt_output_t *output;
>   
> -		kmstest_set_vt_graphics_mode();
> -	}
> +		for_each_connected_output(display, output) {
> +			igt_dynamic_f("kms-lpsp-%s",
> +				      kmstest_connector_type_str(output->config.connector->connector_type)) {
> +				data.output = output;
> +				test_lpsp(&data);
> +			}
>   
> -	igt_subtest("screens-disabled")
> -		screens_disabled_subtest(drm_fd, drm_res);
> -	igt_subtest("edp-native")
> -		edp_subtest(drm_fd, drm_res, drm_connectors, devid, false);
> -	igt_subtest("non-edp")
> -		non_edp_subtest(drm_fd, drm_res, drm_connectors);
> +			test_cleanup(&data);
> +		}
> +	}
>   
>   	igt_fixture {
> -		int i;
> -
> -		intel_register_access_fini(&mmio_data);
> -		for (i = 0; i < drm_res->count_connectors; i++)
> -			drmModeFreeConnector(drm_connectors[i]);
> -		drmModeFreeResources(drm_res);
> -		close(drm_fd);
> +		free(data.pwr_dmn_info);
> +		close(data.drm_fd);
> +		igt_display_fini(&data.display);
>   	}
>   }

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

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

end of thread, other threads:[~2020-05-11 11:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 10:22 [igt-dev] [PATCH i-g-t v7 0/5] lpsp platform agnostic support Anshuman Gupta
2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 1/5] tests/i915_pm_lpsp: Nuke the panel-fitter test Anshuman Gupta
2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 2/5] lib/igt_pm: Add lib func to get lpsp capability Anshuman Gupta
2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 3/5] tests/i915_pm_lpsp: lpsp platform agnostic support Anshuman Gupta
2020-05-11  8:28   ` Manna, Animesh
2020-05-11 11:57   ` Nautiyal, Ankit K
2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 4/5] tests/i915_pm_lpsp: screens-disabled subtest use igt_wait Anshuman Gupta
2020-05-07 10:22 ` [igt-dev] [PATCH i-g-t v7 5/5] tests/i915_pm_rpm: lpsp/non-lpsp screen mode_set_data Anshuman Gupta
2020-05-07 11:07 ` [igt-dev] ✗ Fi.CI.BAT: failure for lpsp platform agnostic support (rev10) Patchwork
2020-05-07 12:04   ` Anshuman Gupta
2020-05-07 12:46     ` Vudum, Lakshminarayana
2020-05-07 12:44 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-05-07 15:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.