All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch
@ 2020-01-29 13:55 Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 1/7] headers: Bump drm uapi headers Swati Sharma
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

This series contains tests to validate HDR metadata interfaces
and bpc switch test cases (8bpc<->10bpc).
Minor changes are made in the original patch series 
https://patchwork.freedesktop.org/patch/255755/

Changes made to the original series:

*Current version is made compatible for both amd and intel driver,
earlier it could be used by amd driver only.
*No assumption is made regarding output. Tests will execute on
all availabe outputs, since there is no ROI to execute
tests on all the pipes; tests will execute on single pipe.
*To make tests generic, moved tests from tests/amdgpu/amd_hdr.c to
tests/kms_hdr.c.
*Also, splitted the hdr igt into multiple patches so that subtests
can be easily reviewed.
*Renaming of functions, addition of new flags, igt_describe(), etc
*Added function to detect whether panel connected is HDR or not,
if non-HDR then tests will be skipped.
*Dropped test case using luminance sensor
*Minor fixes done to previous series

Also, amd exposes max_bpc as a debugfs entry..so it's asserted for their
driver. i915 drives misses that.
TODO: Expose max_bpc as debugfs entry in i915 driver too, if required.

Nicholas Kazlauskas (6):
  headers: Bump drm uapi headers
  lib/igt_kms: Add max bpc connector property
  lib/igt_kms: Add HDR_OUTPUT_METADATA connector property
  tests/kms_hdr: Add bpc switch subtests
  tests/kms_hdr: Add static toggle SDR->HDR mode subtests
  tests/kms_hdr: Add subtest to swap static HDR metadata

Swati Sharma (1):
  tests/kms_hdr: Add function to check HDR panel

 include/drm-uapi/drm_mode.h | 121 ++++++-
 lib/igt_kms.c               |   7 +
 lib/igt_kms.h               |   2 +
 tests/Makefile.sources      |   1 +
 tests/kms_hdr.c             | 664 ++++++++++++++++++++++++++++++++++++
 tests/meson.build           |   1 +
 6 files changed, 794 insertions(+), 2 deletions(-)
 create mode 100644 tests/kms_hdr.c

-- 
2.24.1

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

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

* [igt-dev] [PATCH 1/7] headers: Bump drm uapi headers
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 2/7] lib/igt_kms: Add max bpc connector property Swati Sharma
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Updating them to the latest version from drm-next for HDR static
metadata uapi structures:

 commit a09db883e5d9 ("drm: Fix docbook warnings in hdr metadata
 helper structures")

v2: Bumped to latest drm-next headers

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 include/drm-uapi/drm_mode.h | 121 +++++++++++++++++++++++++++++++++++-
 1 file changed, 119 insertions(+), 2 deletions(-)

diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
index a439c2e6..5ab331e5 100644
--- a/include/drm-uapi/drm_mode.h
+++ b/include/drm-uapi/drm_mode.h
@@ -33,7 +33,15 @@
 extern "C" {
 #endif
 
-#define DRM_DISPLAY_INFO_LEN	32
+/**
+ * DOC: overview
+ *
+ * DRM exposes many UAPI and structure definition to have a consistent
+ * and standardized interface with user.
+ * Userspace can refer to these structure definitions and UAPI formats
+ * to communicate to driver
+ */
+
 #define DRM_CONNECTOR_NAME_LEN	32
 #define DRM_DISPLAY_MODE_LEN	32
 #define DRM_PROP_NAME_LEN	32
@@ -622,7 +630,8 @@ struct drm_color_ctm {
 
 struct drm_color_lut {
 	/*
-	 * Data is U0.16 fixed point format.
+	 * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and
+	 * 0xffff == 1.0.
 	 */
 	__u16 red;
 	__u16 green;
@@ -630,6 +639,92 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/**
+ * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
+ *
+ * HDR Metadata Infoframe as per CTA 861.G spec. This is expected
+ * to match exactly with the spec.
+ *
+ * Userspace is expected to pass the metadata information as per
+ * the format described in this structure.
+ */
+struct hdr_metadata_infoframe {
+	/**
+	 * @eotf: Electro-Optical Transfer Function (EOTF)
+	 * used in the stream.
+	 */
+	__u8 eotf;
+	/**
+	 * @metadata_type: Static_Metadata_Descriptor_ID.
+	 */
+	__u8 metadata_type;
+	/**
+	 * @display_primaries: Color Primaries of the Data.
+	 * These are coded as unsigned 16-bit values in units of
+	 * 0.00002, where 0x0000 represents zero and 0xC350
+	 * represents 1.0000.
+	 * @display_primaries.x: X cordinate of color primary.
+	 * @display_primaries.y: Y cordinate of color primary.
+	 */
+	struct {
+		__u16 x, y;
+		} display_primaries[3];
+	/**
+	 * @white_point: White Point of Colorspace Data.
+	 * These are coded as unsigned 16-bit values in units of
+	 * 0.00002, where 0x0000 represents zero and 0xC350
+	 * represents 1.0000.
+	 * @white_point.x: X cordinate of whitepoint of color primary.
+	 * @white_point.y: Y cordinate of whitepoint of color primary.
+	 */
+	struct {
+		__u16 x, y;
+		} white_point;
+	/**
+	 * @max_display_mastering_luminance: Max Mastering Display Luminance.
+	 * This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
+	 * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
+	 */
+	__u16 max_display_mastering_luminance;
+	/**
+	 * @min_display_mastering_luminance: Min Mastering Display Luminance.
+	 * This value is coded as an unsigned 16-bit value in units of
+	 * 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF
+	 * represents 6.5535 cd/m2.
+	 */
+	__u16 min_display_mastering_luminance;
+	/**
+	 * @max_cll: Max Content Light Level.
+	 * This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
+	 * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
+	 */
+	__u16 max_cll;
+	/**
+	 * @max_fall: Max Frame Average Light Level.
+	 * This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
+	 * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
+	 */
+	__u16 max_fall;
+};
+
+/**
+ * struct hdr_output_metadata - HDR output metadata
+ *
+ * Metadata Information to be passed from userspace
+ */
+struct hdr_output_metadata {
+	/**
+	 * @metadata_type: Static_Metadata_Descriptor_ID.
+	 */
+	__u32 metadata_type;
+	/**
+	 * @hdmi_metadata_type1: HDR Metadata Infoframe.
+	 */
+	union {
+		struct hdr_metadata_infoframe hdmi_metadata_type1;
+	};
+};
+
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
@@ -803,6 +898,10 @@ struct drm_format_modifier {
 };
 
 /**
+ * struct drm_mode_create_blob - Create New block property
+ * @data: Pointer to data to copy.
+ * @length: Length of data to copy.
+ * @blob_id: new property ID.
  * Create a new 'blob' data property, copying length bytes from data pointer,
  * and returning new blob ID.
  */
@@ -816,6 +915,8 @@ struct drm_mode_create_blob {
 };
 
 /**
+ * struct drm_mode_destroy_blob - Destroy user blob
+ * @blob_id: blob_id to destroy
  * Destroy a user-created blob property.
  */
 struct drm_mode_destroy_blob {
@@ -823,6 +924,12 @@ struct drm_mode_destroy_blob {
 };
 
 /**
+ * struct drm_mode_create_lease - Create lease
+ * @object_ids: Pointer to array of object ids.
+ * @object_count: Number of object ids.
+ * @flags: flags for new FD.
+ * @lessee_id: unique identifier for lessee.
+ * @fd: file descriptor to new drm_master file.
  * Lease mode resources, creating another drm_master.
  */
 struct drm_mode_create_lease {
@@ -840,6 +947,10 @@ struct drm_mode_create_lease {
 };
 
 /**
+ * struct drm_mode_list_lessees - List lessees
+ * @count_lessees: Number of lessees.
+ * @pad: pad.
+ * @lessees_ptr: Pointer to lessess.
  * List lesses from a drm_master
  */
 struct drm_mode_list_lessees {
@@ -860,6 +971,10 @@ struct drm_mode_list_lessees {
 };
 
 /**
+ * struct drm_mode_get_lease - Get Lease
+ * @count_objects: Number of leased objects.
+ * @pad: pad.
+ * @objects_ptr: Pointer to objects.
  * Get leased objects
  */
 struct drm_mode_get_lease {
@@ -880,6 +995,8 @@ struct drm_mode_get_lease {
 };
 
 /**
+ * struct drm_mode_revoke_lease - Revoke lease
+ * @lessee_id: Unique ID of lessee.
  * Revoke lease
  */
 struct drm_mode_revoke_lease {
-- 
2.24.1

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

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

* [igt-dev] [PATCH 2/7] lib/igt_kms: Add max bpc connector property
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 1/7] headers: Bump drm uapi headers Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 3/7] lib/igt_kms: Add HDR_OUTPUT_METADATA " Swati Sharma
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

It's been in DRM for a while but was never added to IGT's internal list.

This property should be reset along with other properties between tests
since output color depth can affect CRC calculation... but it's not
really feasible since it's driver specific for what the value should
be reset to.

v2: rebase
v3: rebase

Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 lib/igt_kms.c | 1 +
 lib/igt_kms.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d20daaad..b0b064c9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -416,6 +416,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
 	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
 	[IGT_CONNECTOR_LINK_STATUS] = "link-status",
+	[IGT_CONNECTOR_MAX_BPC] = "max bpc",
 };
 
 /*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 6c919e92..36077d41 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -125,6 +125,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_VRR_CAPABLE,
        IGT_CONNECTOR_HDCP_CONTENT_TYPE,
        IGT_CONNECTOR_LINK_STATUS,
+       IGT_CONNECTOR_MAX_BPC,
        IGT_NUM_CONNECTOR_PROPS
 };
 
-- 
2.24.1

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

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

* [igt-dev] [PATCH 3/7] lib/igt_kms: Add HDR_OUTPUT_METADATA connector property
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 1/7] headers: Bump drm uapi headers Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 2/7] lib/igt_kms: Add max bpc connector property Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests Swati Sharma
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

...and also reset it when resetting outputs since that can definitely
affect CRC output on other tests when not reset.

v2: rebase
v3: rebase
v4: updated doc for igt_display_reset [Petri]

Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 lib/igt_kms.c | 6 ++++++
 lib/igt_kms.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b0b064c9..b636b86f 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -417,6 +417,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_HDCP_CONTENT_TYPE] = "HDCP Content Type",
 	[IGT_CONNECTOR_LINK_STATUS] = "link-status",
 	[IGT_CONNECTOR_MAX_BPC] = "max bpc",
+	[IGT_CONNECTOR_HDR_OUTPUT_METADATA] = "HDR_OUTPUT_METADATA",
 };
 
 /*
@@ -1794,6 +1795,10 @@ static void igt_output_reset(igt_output_t *output)
 	if (igt_output_has_prop(output, IGT_CONNECTOR_CONTENT_PROTECTION))
 		igt_output_set_prop_enum(output, IGT_CONNECTOR_CONTENT_PROTECTION,
 					 "Undesired");
+
+	if (igt_output_has_prop(output, IGT_CONNECTOR_HDR_OUTPUT_METADATA))
+		igt_output_set_prop_value(output,
+					  IGT_CONNECTOR_HDR_OUTPUT_METADATA, 0);
 }
 
 /**
@@ -1807,6 +1812,7 @@ static void igt_output_reset(igt_output_t *output)
  * - %IGT_CONNECTOR_CRTC_ID
  * - %IGT_CONNECTOR_BROADCAST_RGB (if applicable)
  *   %IGT_CONNECTOR_CONTENT_PROTECTION (if applicable)
+ *   %IGT_CONNECTOR_HDR_OUTPUT_METADATA (if applicable)
  * - igt_output_override_mode() to default.
  *
  * For pipes:
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 36077d41..4766bfce 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -126,6 +126,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_HDCP_CONTENT_TYPE,
        IGT_CONNECTOR_LINK_STATUS,
        IGT_CONNECTOR_MAX_BPC,
+       IGT_CONNECTOR_HDR_OUTPUT_METADATA,
        IGT_NUM_CONNECTOR_PROPS
 };
 
-- 
2.24.1

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

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

* [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (2 preceding siblings ...)
  2020-01-29 13:55 ` [igt-dev] [PATCH 3/7] lib/igt_kms: Add HDR_OUTPUT_METADATA " Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-02-03  8:49   ` Sharma, Swati2
  2020-01-29 13:55 ` [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel Swati Sharma
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Add subtests to validate transitions between 8bpc and 10bpc. Test is
made compatible for both amd and intel drivers. The test requires
the "output_bpc" debugfs entry to read current and maximum bpc.
This is exposed by amd driver, however intel driver doesn't expose it,
so made that restriction to assert output bpc only for amd driver.

v2: -Limiting plane size to 512x512 since regression observed in hsw
     because of plane scaling restriction.
    -Minor alignment fix [Uma]
v3: -Small fix

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 tests/Makefile.sources |   1 +
 tests/kms_hdr.c        | 295 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 297 insertions(+)
 create mode 100644 tests/kms_hdr.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 4582f656..98411172 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -54,6 +54,7 @@ TESTS_progs = \
 	kms_frontbuffer_tracking \
 	kms_getfb \
 	kms_hdmi_inject \
+	kms_hdr \
 	kms_invalid_dotclock \
 	kms_lease \
 	kms_legacy_colorkey \
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
new file mode 100644
index 00000000..ff21335a
--- /dev/null
+++ b/tests/kms_hdr.c
@@ -0,0 +1,295 @@
+/*
+ * Copyright 2019 Advanced Micro Devices, Inc.
+ *
+ * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <fcntl.h>
+#include <termios.h>
+#include <unistd.h>
+
+IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
+
+/* Test flags. */
+enum {
+	TEST_NONE = 1 << 0,
+	TEST_DPMS = 1 << 1,
+	TEST_SUSPEND = 1 << 2,
+};
+
+/* BPC connector state. */
+typedef struct output_bpc {
+	unsigned int current;
+	unsigned int maximum;
+} output_bpc_t;
+
+/* Common test data. */
+typedef struct data {
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	igt_pipe_crc_t *pipe_crc;
+	drmModeModeInfo *mode;
+	enum pipe pipe_id;
+	int fd;
+	int w;
+	int h;
+} data_t;
+
+/* Common test cleanup. */
+static void test_fini(data_t *data)
+{
+	igt_pipe_crc_free(data->pipe_crc);
+	igt_display_reset(&data->display);
+}
+
+static void test_cycle_flags(data_t *data, uint32_t test_flags)
+{
+	if (test_flags & TEST_DPMS) {
+		kmstest_set_connector_dpms(data->fd,
+					   data->output->config.connector,
+					   DRM_MODE_DPMS_OFF);
+		kmstest_set_connector_dpms(data->fd,
+					   data->output->config.connector,
+					   DRM_MODE_DPMS_ON);
+	}
+
+	if (test_flags & TEST_SUSPEND)
+		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+					      SUSPEND_TEST_NONE);
+}
+
+/* Returns the current and maximum bpc from the connector debugfs. */
+static output_bpc_t get_output_bpc(data_t *data)
+{
+	char buf[256];
+	char *start_loc;
+	int fd, res;
+	output_bpc_t info;
+
+	fd = igt_debugfs_connector_dir(data->fd, data->output->name, O_RDONLY);
+	igt_assert(fd >= 0);
+
+	res = igt_debugfs_simple_read(fd, "output_bpc", buf, sizeof(buf));
+
+	igt_require(res > 0);
+
+	close(fd);
+
+	igt_assert(start_loc = strstr(buf, "Current: "));
+	igt_assert_eq(sscanf(start_loc, "Current: %u", &info.current), 1);
+
+	igt_assert(start_loc = strstr(buf, "Maximum: "));
+	igt_assert_eq(sscanf(start_loc, "Maximum: %u", &info.maximum), 1);
+
+	return info;
+}
+
+/* Verifies that connector has the correct output bpc. */
+static void assert_output_bpc(data_t *data, unsigned int bpc)
+{
+	output_bpc_t info = get_output_bpc(data);
+
+	igt_require_f(info.maximum >= bpc,
+		      "Monitor doesn't support %u bpc, max is %u\n", bpc,
+		      info.maximum);
+
+	igt_assert_eq(info.current, bpc);
+}
+
+/* Fills the FB with a test HDR pattern. */
+static void draw_hdr_pattern(igt_fb_t *fb)
+{
+	cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
+
+	igt_paint_color(cr, 0, 0, fb->width, fb->height, 1.0, 1.0, 1.0);
+	igt_paint_test_pattern(cr, fb->width, fb->height);
+
+	igt_put_cairo_ctx(fb->fd, fb, cr);
+}
+
+/* Prepare test data. */
+static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
+{
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = pipe;
+	data->pipe = &data->display.pipes[data->pipe_id];
+	igt_assert(data->pipe);
+
+	igt_display_reset(display);
+
+	data->output = output;
+	igt_assert(data->output);
+
+	data->mode = igt_output_get_mode(data->output);
+	igt_assert(data->mode);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
+					  INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	igt_output_set_pipe(data->output, data->pipe_id);
+
+	data->w = data->mode->hdisplay;
+	data->h = data->mode->vdisplay;
+}
+
+static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
+{
+	int i;
+
+	for (i = 0; i < display->n_outputs; i++)
+		if (display->outputs[i].pending_pipe == pipe)
+			return false;
+
+	return true;
+}
+
+static void test_bpc_switch_on_output(data_t *data, igt_output_t *output,
+				      uint32_t flags)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	enum pipe pipe;
+	igt_fb_t afb;
+	int afb_id;
+
+	for_each_pipe(display, pipe) {
+		if (!igt_pipe_connector_valid(pipe, output))
+			continue;
+		/*
+		 * If previous subtest of connector failed, pipe
+		 * attached to that connector is not released.
+		 * Because of that we have to choose the non
+		 * attached pipe for this subtest.
+		 */
+		if (!igt_pipe_is_free(display, pipe))
+			continue;
+
+		prepare_test(data, output, pipe);
+
+		/* 10-bit formats are slow, so limit the size. */
+		afb_id = igt_create_fb(data->fd, 512, 512, DRM_FORMAT_XRGB2101010, 0, &afb);
+		igt_assert(afb_id);
+
+		draw_hdr_pattern(&afb);
+
+		/* Start in 8bpc. */
+		igt_plane_set_fb(data->primary, &afb);
+		/*
+		 * Limiting plane size aswell, since most of gen7 and all of
+		 * gen8 doesn't support plane scaling at all.
+		 */
+		igt_plane_set_size(data->primary, 512, 512);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		/*
+		 * i915 driver doesn't expose max bpc as debugfs entry,
+		 * so limiting assert only for amd driver.
+		 */
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* Switch to 10bpc. */
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 10);
+
+		/* Verify that the CRC are equal after DPMS or suspend. */
+		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+		test_cycle_flags(data, flags);
+		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+		/* Drop back to 8bpc. */
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* CRC capture is clamped to 8bpc, so capture should match. */
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		test_fini(data);
+		igt_remove_fb(data->fd, &afb);
+
+		/*
+		 * Testing a output with a pipe is enough for HDR
+		 * testing. No ROI in testing the connector with other
+		 * pipes. So break the loop on pipe.
+		 */
+		break;
+	}
+}
+
+/* Returns true if an output supports max bpc property. */
+static bool has_max_bpc(igt_output_t *output)
+{
+	return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
+	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
+}
+
+static void test_bpc_switch(data_t *data, uint32_t flags)
+{
+	igt_output_t *output;
+	int valid_tests = 0;
+
+	for_each_connected_output(&data->display, output) {
+		if (!has_max_bpc(output))
+			continue;
+
+		igt_info("BPC switch test execution on %s\n", output->name);
+		test_bpc_switch_on_output(data, output, flags);
+		valid_tests++;
+	}
+
+	igt_require_f(valid_tests, "No connector found with MAX BPC connector property\n");
+}
+
+igt_main
+{
+	data_t data = { 0 };
+
+	igt_fixture {
+		data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
+
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.fd);
+		igt_require(data.display.is_atomic);
+
+		igt_display_require_output(&data.display);
+	}
+
+	igt_describe("Tests switching between different display output bpc modes");
+	igt_subtest("bpc-switch") test_bpc_switch(&data, TEST_NONE);
+	igt_describe("Tests bpc switch with dpms");
+	igt_subtest("bpc-switch-dpms") test_bpc_switch(&data, TEST_DPMS);
+	igt_describe("Tests bpc switch with suspend");
+	igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, TEST_SUSPEND);
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index bc8652aa..6ac2c830 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -38,6 +38,7 @@ test_progs = [
 	'kms_frontbuffer_tracking',
 	'kms_getfb',
 	'kms_hdmi_inject',
+	'kms_hdr',
 	'kms_invalid_dotclock',
 	'kms_lease',
 	'kms_legacy_colorkey',
-- 
2.24.1

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

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

* [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (3 preceding siblings ...)
  2020-01-29 13:55 ` [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 15:02   ` Shankar, Uma
  2020-01-29 13:55 ` [igt-dev] [PATCH 6/7] tests/kms_hdr: Add static toggle SDR->HDR mode subtests Swati Sharma
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi, petri.latvala

EDID of connected panel needs to be parsed to detect whether
panel can drive hdr or not. Added new function is_panel_hdr(),
to know about hdr capabilities of panel. If panel supports hdr
then only tests will get executed else skipped.

v2: continue instead of break [Kunal]

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Suggested-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/kms_hdr.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index ff21335a..780395ad 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -24,9 +24,22 @@
 #include <fcntl.h>
 #include <termios.h>
 #include <unistd.h>
+#include "igt_edid.h"
 
 IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
 
+/* HDR EDID parsing. */
+#define CTA_EXTENSION_VERSION		0x03
+#define HDR_STATIC_METADATA_BLOCK       0x06
+#define USE_EXTENDED_TAG		0x07
+
+/* DRM HDR definitions. Not in the UAPI header, unfortunately. */
+enum hdmi_eotf {
+	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
+	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
+	HDMI_EOTF_SMPTE_ST2084,
+};
+
 /* Test flags. */
 enum {
 	TEST_NONE = 1 << 0,
@@ -267,6 +280,80 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
 	igt_require_f(valid_tests, "No connector found with MAX BPC connector property\n");
 }
 
+static bool cta_block(const char *edid_ext)
+{
+	/*
+	 * Byte 1: 0x07 indicates Extended Tag
+	 * Byte 2: 0x06 indicates HDMI Static Metadata Block
+	 * Byte 3: bits 0 to 5 identify EOTF functions supported by sink
+	 *	       where ET_0: Traditional Gamma - SDR Luminance Range
+	 *	             ET_1: Traditional Gamma - HDR Luminance Range
+	 *	             ET_2: SMPTE ST 2084
+	 *	             ET_3: Hybrid Log-Gamma (HLG)
+	 *	             ET_4 to ET_5: Reserved for future use
+	 */
+
+	if ((((edid_ext[0] & 0xe0) >> 5 == USE_EXTENDED_TAG) &&
+	      (edid_ext[1] == HDR_STATIC_METADATA_BLOCK)) &&
+	     ((edid_ext[2] & HDMI_EOTF_TRADITIONAL_GAMMA_HDR) ||
+	      (edid_ext[2] & HDMI_EOTF_SMPTE_ST2084)))
+			return true;
+
+	return false;
+}
+
+/* Returns true if panel supports HDR. */
+static bool is_panel_hdr(data_t *data, igt_output_t *output)
+{
+	bool ok;
+	int i, j, offset;
+	uint64_t edid_blob_id;
+	drmModePropertyBlobRes *edid_blob;
+	const struct edid_ext *edid_ext;
+	const struct edid *edid;
+	const struct edid_cea *edid_cea;
+	const char *cea_data;
+	bool ret = false;
+
+	ok = kmstest_get_property(data->fd, output->id,
+			DRM_MODE_OBJECT_CONNECTOR, "EDID",
+			NULL, &edid_blob_id, NULL);
+
+	if (!ok || !edid_blob_id)
+		return ret;
+
+	edid_blob = drmModeGetPropertyBlob(data->fd, edid_blob_id);
+	igt_assert(edid_blob);
+
+	edid = (const struct edid *) edid_blob->data;
+	igt_assert(edid);
+
+	drmModeFreePropertyBlob(edid_blob);
+
+	for (i = 0; i < edid->extensions_len; i++) {
+		edid_ext = &edid->extensions[i];
+		edid_cea = &edid_ext->data.cea;
+
+		/* HDR not defined in CTA Extension Version < 3. */
+		if ((edid_ext->tag != EDID_EXT_CEA) ||
+		    (edid_cea->revision != CTA_EXTENSION_VERSION))
+				continue;
+		else {
+			offset = edid_cea->dtd_start;
+			cea_data = edid_cea->data;
+
+			for (j = 0; j < offset; j += (cea_data[j] & 0x1f) + 1) {
+				ret = cta_block(cea_data + j);
+
+				if (ret)
+					break;
+			}
+		}
+	}
+
+	return ret;
+}
+
 igt_main
 {
 	data_t data = { 0 };
-- 
2.24.1

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

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

* [igt-dev] [PATCH 6/7] tests/kms_hdr: Add static toggle SDR->HDR mode subtests
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (4 preceding siblings ...)
  2020-01-29 13:55 ` [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 13:55 ` [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata Swati Sharma
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Add subtests to toggle between SDR to HDR mode with suspend
and dpms scenarios. Tests are made compatible for both amd
and intel drivers.

v2: Added additional check to validate whether panel is
    HDR or not. If it's a non-HDR panel, test will skip [Uma]

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 tests/kms_hdr.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 162 insertions(+)

diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 780395ad..6680a6c6 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -34,6 +34,10 @@ IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
 #define USE_EXTENDED_TAG		0x07
 
 /* DRM HDR definitions. Not in the UAPI header, unfortunately. */
+enum hdmi_metadata_type {
+	HDMI_STATIC_METADATA_TYPE1 = 1,
+};
+
 enum hdmi_eotf {
 	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
 	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
@@ -354,6 +358,157 @@ static bool is_panel_hdr(data_t *data, igt_output_t *output)
 	return ret;
 }
 
+/* Sets the HDR output metadata prop. */
+static void set_hdr_output_metadata(data_t *data,
+				    struct hdr_output_metadata const *meta)
+{
+	igt_output_replace_prop_blob(data->output,
+				     IGT_CONNECTOR_HDR_OUTPUT_METADATA, meta,
+				     meta ? sizeof(*meta) : 0);
+}
+
+/* Converts a double to 861-G spec FP format. */
+static uint16_t calc_hdr_float(double val)
+{
+	return (uint16_t)(val * 50000.0);
+}
+
+/* Fills some test values for ST2048 HDR output metadata.
+ *
+ * Note: there isn't really a standard for what the metadata is supposed
+ * to do on the display side of things. The display is free to ignore it
+ * and clip the output, use it to help tonemap to the content range,
+ * or do anything they want, really.
+ */
+static void fill_hdr_output_metadata_st2048(struct hdr_output_metadata *meta)
+{
+	memset(meta, 0, sizeof(*meta));
+
+	meta->metadata_type = HDMI_STATIC_METADATA_TYPE1;
+	meta->hdmi_metadata_type1.eotf = HDMI_EOTF_SMPTE_ST2084;
+
+	/* Rec. 2020 */
+	meta->hdmi_metadata_type1.display_primaries[0].x =
+		calc_hdr_float(0.708); /* Red */
+	meta->hdmi_metadata_type1.display_primaries[0].y =
+		calc_hdr_float(0.292);
+	meta->hdmi_metadata_type1.display_primaries[1].x =
+		calc_hdr_float(0.170); /* Green */
+	meta->hdmi_metadata_type1.display_primaries[1].y =
+		calc_hdr_float(0.797);
+	meta->hdmi_metadata_type1.display_primaries[2].x =
+		calc_hdr_float(0.131); /* Blue */
+	meta->hdmi_metadata_type1.display_primaries[2].y =
+		calc_hdr_float(0.046);
+	meta->hdmi_metadata_type1.white_point.x = calc_hdr_float(0.3127);
+	meta->hdmi_metadata_type1.white_point.y = calc_hdr_float(0.3290);
+
+	meta->hdmi_metadata_type1.max_display_mastering_luminance =
+		1000; /* 1000 nits */
+	meta->hdmi_metadata_type1.min_display_mastering_luminance =
+		500;				   /* 0.05 nits */
+	meta->hdmi_metadata_type1.max_fall = 1000; /* 1000 nits */
+	meta->hdmi_metadata_type1.max_cll = 500;   /* 500 nits */
+}
+
+static void test_static_toggle(data_t *data, igt_output_t *output,
+			       uint32_t flags)
+{
+	igt_display_t *display = &data->display;
+	struct hdr_output_metadata hdr;
+	igt_crc_t ref_crc, new_crc;
+	enum pipe pipe;
+	igt_fb_t afb;
+	int afb_id;
+
+	for_each_pipe(display, pipe) {
+		if (!igt_pipe_connector_valid(pipe, output))
+			continue;
+
+		if (!igt_pipe_is_free(display, pipe))
+			continue;
+
+		prepare_test(data, output, pipe);
+
+		/* 10-bit formats are slow, so limit the size. */
+		afb_id = igt_create_fb(data->fd, 512, 512, DRM_FORMAT_XRGB2101010, 0, &afb);
+		igt_assert(afb_id);
+
+		draw_hdr_pattern(&afb);
+
+		fill_hdr_output_metadata_st2048(&hdr);
+
+		/* Start with no metadata. */
+		igt_plane_set_fb(data->primary, &afb);
+		igt_plane_set_size(data->primary, data->w, data->h);
+		set_hdr_output_metadata(data, NULL);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* Apply HDR metadata and 10bpc. We expect a modeset for entering. */
+		set_hdr_output_metadata(data, &hdr);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 10);
+
+		/* Verify that the CRC are equal after DPMS or suspend. */
+		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+		test_cycle_flags(data, flags);
+		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+		/* Disable HDR metadata and drop back to 8bpc. We expect a modeset for exiting. */
+		set_hdr_output_metadata(data, NULL);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		test_fini(data);
+		igt_remove_fb(data->fd, &afb);
+
+		break;
+	}
+}
+
+/* Returns true if an output supports HDR metadata property. */
+static bool has_hdr(igt_output_t *output)
+{
+	return igt_output_has_prop(output, IGT_CONNECTOR_HDR_OUTPUT_METADATA);
+}
+
+static void test_hdr(data_t *data, const char *test_name, uint32_t flags)
+{
+	igt_output_t *output;
+	int valid_tests = 0;
+
+	for_each_connected_output(&data->display, output) {
+		/* To test HDR, 10 bpc is required, so we need to
+		 * set MAX_BPC property to 10bpc prior to setting
+		 * HDR metadata property. Therefore, checking.
+		 */
+		if (!has_max_bpc(output))
+			continue;
+
+		if (!has_hdr(output))
+			continue;
+
+		if (!is_panel_hdr(data, output))
+			continue;
+
+		igt_info("HDR %s test execution on %s\n", test_name, output->name);
+		if (flags & TEST_NONE || flags & TEST_DPMS || flags & TEST_SUSPEND)
+			test_static_toggle(data, output, flags);
+		valid_tests++;
+	}
+
+	igt_require_f(valid_tests, "No connector found with HDR metadata/MAX BPC connector property (or) panel is Non-HDR\n");
+}
+
 igt_main
 {
 	data_t data = { 0 };
@@ -376,6 +531,13 @@ igt_main
 	igt_describe("Tests bpc switch with suspend");
 	igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, TEST_SUSPEND);
 
+	igt_describe("Tests entering and exiting HDR mode");
+	igt_subtest("static-toggle") test_hdr(&data, "static-toggle", TEST_NONE);
+	igt_describe("Tests static toggle with dpms");
+	igt_subtest("static-toggle-dpms") test_hdr(&data, "static-toggle-dpms", TEST_DPMS);
+	igt_describe("Tests static toggle with suspend");
+	igt_subtest("static-toggle-suspend") test_hdr(&data, "static-toggle-suspend", TEST_SUSPEND);
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
-- 
2.24.1

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

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

* [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (5 preceding siblings ...)
  2020-01-29 13:55 ` [igt-dev] [PATCH 6/7] tests/kms_hdr: Add static toggle SDR->HDR mode subtests Swati Sharma
@ 2020-01-29 13:55 ` Swati Sharma
  2020-01-29 14:16   ` Shankar, Uma
  2020-01-29 17:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add tests for HDR metadata interfaces and bpc switch (rev4) Patchwork
  2020-02-01  2:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  8 siblings, 1 reply; 16+ messages in thread
From: Swati Sharma @ 2020-01-29 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Add subtest to enable fast static metadata switches.

v2: Allow modeset for intel driver [Uma]

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/kms_hdr.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)

diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 6680a6c6..9339dce8 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -49,6 +49,7 @@ enum {
 	TEST_NONE = 1 << 0,
 	TEST_DPMS = 1 << 1,
 	TEST_SUSPEND = 1 << 2,
+	TEST_SWAP = 1 << 3,
 };
 
 /* BPC connector state. */
@@ -475,6 +476,120 @@ static void test_static_toggle(data_t *data, igt_output_t *output,
 	}
 }
 
+/* Fills some test values for HDR metadata targeting SDR. */
+static void fill_hdr_output_metadata_sdr(struct hdr_output_metadata *meta)
+{
+	memset(meta, 0, sizeof(*meta));
+
+	meta->metadata_type = HDMI_STATIC_METADATA_TYPE1;
+	meta->hdmi_metadata_type1.eotf = HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
+
+	/* Rec. 709 */
+	meta->hdmi_metadata_type1.display_primaries[0].x =
+		calc_hdr_float(0.640); /* Red */
+	meta->hdmi_metadata_type1.display_primaries[0].y =
+		calc_hdr_float(0.330);
+	meta->hdmi_metadata_type1.display_primaries[1].x =
+		calc_hdr_float(0.300); /* Green */
+	meta->hdmi_metadata_type1.display_primaries[1].y =
+		calc_hdr_float(0.600);
+	meta->hdmi_metadata_type1.display_primaries[2].x =
+		calc_hdr_float(0.150); /* Blue */
+	meta->hdmi_metadata_type1.display_primaries[2].y =
+		calc_hdr_float(0.006);
+	meta->hdmi_metadata_type1.white_point.x = calc_hdr_float(0.3127);
+	meta->hdmi_metadata_type1.white_point.y = calc_hdr_float(0.3290);
+
+	meta->hdmi_metadata_type1.max_display_mastering_luminance = 0;
+	meta->hdmi_metadata_type1.min_display_mastering_luminance = 0;
+	meta->hdmi_metadata_type1.max_fall = 0;
+	meta->hdmi_metadata_type1.max_cll = 0;
+}
+
+static void test_static_swap(data_t *data, igt_output_t *output)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	enum pipe pipe;
+	igt_fb_t afb;
+	int afb_id;
+	struct hdr_output_metadata hdr;
+
+	for_each_pipe(display, pipe) {
+		if (!igt_pipe_connector_valid(pipe, output))
+			continue;
+
+		if (!igt_pipe_is_free(display, pipe))
+			continue;
+
+		prepare_test(data, output, pipe);
+
+		/* 10-bit formats are slow, so limit the size. */
+		afb_id = igt_create_fb(data->fd, 512, 512, DRM_FORMAT_XRGB2101010, 0, &afb);
+		igt_assert(afb_id);
+
+		draw_hdr_pattern(&afb);
+
+		/* Start in SDR. */
+		igt_plane_set_fb(data->primary, &afb);
+		igt_plane_set_size(data->primary, data->w, data->h);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* Enter HDR, a modeset is allowed here. */
+		fill_hdr_output_metadata_st2048(&hdr);
+		set_hdr_output_metadata(data, &hdr);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 10);
+
+		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+
+		/* Change the mastering information, no modeset allowed
+		 * for amd driver, whereas a modeset is required for i915
+		 * driver. */
+		hdr.hdmi_metadata_type1.max_display_mastering_luminance = 200;
+		hdr.hdmi_metadata_type1.max_fall = 200;
+		hdr.hdmi_metadata_type1.max_cll = 100;
+
+		set_hdr_output_metadata(data, &hdr);
+		if (is_amdgpu_device(data->fd))
+			igt_display_commit_atomic(display, 0, NULL);
+		else
+			igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+		/* Enter SDR via metadata, no modeset allowed for
+		 * amd driver, whereas a modeset is required for
+		 * i915 driver. */
+		fill_hdr_output_metadata_sdr(&hdr);
+		set_hdr_output_metadata(data, &hdr);
+		if (is_amdgpu_device(data->fd))
+			igt_display_commit_atomic(display, 0, NULL);
+		else
+			igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+		/* Exit SDR and enter 8bpc, cleanup. */
+		set_hdr_output_metadata(data, NULL);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* Verify that the CRC didn't change while cycling metadata. */
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		test_fini(data);
+		igt_remove_fb(data->fd, &afb);
+
+		break;
+	}
+}
+
 /* Returns true if an output supports HDR metadata property. */
 static bool has_hdr(igt_output_t *output)
 {
@@ -503,6 +618,8 @@ static void test_hdr(data_t *data, const char *test_name, uint32_t flags)
 		igt_info("HDR %s test execution on %s\n", test_name, output->name);
 		if (flags & TEST_NONE || flags & TEST_DPMS || flags & TEST_SUSPEND)
 			test_static_toggle(data, output, flags);
+		if (flags & TEST_SWAP)
+			test_static_swap(data, output);
 		valid_tests++;
 	}
 
@@ -538,6 +655,9 @@ igt_main
 	igt_describe("Tests static toggle with suspend");
 	igt_subtest("static-toggle-suspend") test_hdr(&data, "static-toggle-suspend", TEST_SUSPEND);
 
+	igt_describe("Tests swapping static HDR metadata");
+	igt_subtest("static-swap") test_hdr(&data, "static-swap", TEST_SWAP);
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
-- 
2.24.1

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

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

* Re: [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata
  2020-01-29 13:55 ` [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata Swati Sharma
@ 2020-01-29 14:16   ` Shankar, Uma
  0 siblings, 0 replies; 16+ messages in thread
From: Shankar, Uma @ 2020-01-29 14:16 UTC (permalink / raw)
  To: Sharma, Swati2, igt-dev; +Cc: Latvala, Petri



> -----Original Message-----
> From: Sharma, Swati2 <swati2.sharma@intel.com>
> Sent: Wednesday, January 29, 2020 7:25 PM
> To: igt-dev@lists.freedesktop.org
> Cc: Mun, Gwan-gyeong <gwan-gyeong.mun@intel.com>;
> ville.syrjala@linux.intel.com; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>; Latvala,
> Petri <petri.latvala@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Nicholas
> Kazlauskas <nicholas.kazlauskas@amd.com>; Sharma, Swati2
> <swati2.sharma@intel.com>
> Subject: [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata
> 
> From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> 
> Add subtest to enable fast static metadata switches.
> 
> v2: Allow modeset for intel driver [Uma]
>
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>  tests/kms_hdr.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 120 insertions(+)
> 
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c index 6680a6c6..9339dce8 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -49,6 +49,7 @@ enum {
>  	TEST_NONE = 1 << 0,
>  	TEST_DPMS = 1 << 1,
>  	TEST_SUSPEND = 1 << 2,
> +	TEST_SWAP = 1 << 3,
>  };
> 
>  /* BPC connector state. */
> @@ -475,6 +476,120 @@ static void test_static_toggle(data_t *data, igt_output_t
> *output,
>  	}
>  }
> 
> +/* Fills some test values for HDR metadata targeting SDR. */ static
> +void fill_hdr_output_metadata_sdr(struct hdr_output_metadata *meta) {
> +	memset(meta, 0, sizeof(*meta));
> +
> +	meta->metadata_type = HDMI_STATIC_METADATA_TYPE1;
> +	meta->hdmi_metadata_type1.eotf =
> HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
> +
> +	/* Rec. 709 */
> +	meta->hdmi_metadata_type1.display_primaries[0].x =
> +		calc_hdr_float(0.640); /* Red */
> +	meta->hdmi_metadata_type1.display_primaries[0].y =
> +		calc_hdr_float(0.330);
> +	meta->hdmi_metadata_type1.display_primaries[1].x =
> +		calc_hdr_float(0.300); /* Green */
> +	meta->hdmi_metadata_type1.display_primaries[1].y =
> +		calc_hdr_float(0.600);
> +	meta->hdmi_metadata_type1.display_primaries[2].x =
> +		calc_hdr_float(0.150); /* Blue */
> +	meta->hdmi_metadata_type1.display_primaries[2].y =
> +		calc_hdr_float(0.006);
> +	meta->hdmi_metadata_type1.white_point.x = calc_hdr_float(0.3127);
> +	meta->hdmi_metadata_type1.white_point.y = calc_hdr_float(0.3290);
> +
> +	meta->hdmi_metadata_type1.max_display_mastering_luminance = 0;
> +	meta->hdmi_metadata_type1.min_display_mastering_luminance = 0;
> +	meta->hdmi_metadata_type1.max_fall = 0;
> +	meta->hdmi_metadata_type1.max_cll = 0; }
> +
> +static void test_static_swap(data_t *data, igt_output_t *output) {
> +	igt_display_t *display = &data->display;
> +	igt_crc_t ref_crc, new_crc;
> +	enum pipe pipe;
> +	igt_fb_t afb;
> +	int afb_id;
> +	struct hdr_output_metadata hdr;
> +
> +	for_each_pipe(display, pipe) {
> +		if (!igt_pipe_connector_valid(pipe, output))
> +			continue;
> +
> +		if (!igt_pipe_is_free(display, pipe))
> +			continue;
> +
> +		prepare_test(data, output, pipe);
> +
> +		/* 10-bit formats are slow, so limit the size. */
> +		afb_id = igt_create_fb(data->fd, 512, 512,
> DRM_FORMAT_XRGB2101010, 0, &afb);
> +		igt_assert(afb_id);
> +
> +		draw_hdr_pattern(&afb);
> +
> +		/* Start in SDR. */
> +		igt_plane_set_fb(data->primary, &afb);
> +		igt_plane_set_size(data->primary, data->w, data->h);
> +		igt_output_set_prop_value(data->output,
> IGT_CONNECTOR_MAX_BPC, 8);
> +		igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 8);
> +
> +		/* Enter HDR, a modeset is allowed here. */
> +		fill_hdr_output_metadata_st2048(&hdr);
> +		set_hdr_output_metadata(data, &hdr);
> +		igt_output_set_prop_value(data->output,
> IGT_CONNECTOR_MAX_BPC, 10);
> +		igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 10);
> +
> +		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
> +
> +		/* Change the mastering information, no modeset allowed
> +		 * for amd driver, whereas a modeset is required for i915
> +		 * driver. */
> +		hdr.hdmi_metadata_type1.max_display_mastering_luminance =
> 200;
> +		hdr.hdmi_metadata_type1.max_fall = 200;
> +		hdr.hdmi_metadata_type1.max_cll = 100;
> +
> +		set_hdr_output_metadata(data, &hdr);
> +		if (is_amdgpu_device(data->fd))
> +			igt_display_commit_atomic(display, 0, NULL);
> +		else
> +			igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET,
> +NULL);
> +
> +		/* Enter SDR via metadata, no modeset allowed for
> +		 * amd driver, whereas a modeset is required for
> +		 * i915 driver. */
> +		fill_hdr_output_metadata_sdr(&hdr);
> +		set_hdr_output_metadata(data, &hdr);
> +		if (is_amdgpu_device(data->fd))
> +			igt_display_commit_atomic(display, 0, NULL);
> +		else
> +			igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET,
> +NULL);
> +
> +		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
> +
> +		/* Exit SDR and enter 8bpc, cleanup. */
> +		set_hdr_output_metadata(data, NULL);
> +		igt_output_set_prop_value(data->output,
> IGT_CONNECTOR_MAX_BPC, 8);
> +		igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 8);
> +
> +		/* Verify that the CRC didn't change while cycling metadata. */
> +		igt_assert_crc_equal(&ref_crc, &new_crc);
> +
> +		test_fini(data);
> +		igt_remove_fb(data->fd, &afb);
> +
> +		break;
> +	}
> +}
> +
>  /* Returns true if an output supports HDR metadata property. */  static bool
> has_hdr(igt_output_t *output)  { @@ -503,6 +618,8 @@ static void test_hdr(data_t
> *data, const char *test_name, uint32_t flags)
>  		igt_info("HDR %s test execution on %s\n", test_name, output-
> >name);
>  		if (flags & TEST_NONE || flags & TEST_DPMS || flags &
> TEST_SUSPEND)
>  			test_static_toggle(data, output, flags);
> +		if (flags & TEST_SWAP)
> +			test_static_swap(data, output);
>  		valid_tests++;
>  	}
> 
> @@ -538,6 +655,9 @@ igt_main
>  	igt_describe("Tests static toggle with suspend");
>  	igt_subtest("static-toggle-suspend") test_hdr(&data, "static-toggle-
> suspend", TEST_SUSPEND);
> 
> +	igt_describe("Tests swapping static HDR metadata");
> +	igt_subtest("static-swap") test_hdr(&data, "static-swap", TEST_SWAP);
> +
>  	igt_fixture {
>  		igt_display_fini(&data.display);
>  	}
> --
> 2.24.1

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

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

* Re: [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel
  2020-01-29 13:55 ` [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel Swati Sharma
@ 2020-01-29 15:02   ` Shankar, Uma
  0 siblings, 0 replies; 16+ messages in thread
From: Shankar, Uma @ 2020-01-29 15:02 UTC (permalink / raw)
  To: Sharma, Swati2, igt-dev; +Cc: Joshi, Kunal1, Latvala, Petri



> -----Original Message-----
> From: Sharma, Swati2 <swati2.sharma@intel.com>
> Sent: Wednesday, January 29, 2020 7:25 PM
> To: igt-dev@lists.freedesktop.org
> Cc: Mun, Gwan-gyeong <gwan-gyeong.mun@intel.com>;
> ville.syrjala@linux.intel.com; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>; Latvala,
> Petri <petri.latvala@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Sharma,
> Swati2 <swati2.sharma@intel.com>; Joshi, Kunal1 <kunal1.joshi@intel.com>
> Subject: [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel
> 
> EDID of connected panel needs to be parsed to detect whether panel can drive hdr
> or not. Added new function is_panel_hdr(), to know about hdr capabilities of panel.
> If panel supports hdr then only tests will get executed else skipped.
> 
> v2: continue instead of break [Kunal]
>
Looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> Suggested-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>  tests/kms_hdr.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 87 insertions(+)
> 
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c index ff21335a..780395ad 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -24,9 +24,22 @@
>  #include <fcntl.h>
>  #include <termios.h>
>  #include <unistd.h>
> +#include "igt_edid.h"
> 
>  IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
> 
> +/* HDR EDID parsing. */
> +#define CTA_EXTENSION_VERSION		0x03
> +#define HDR_STATIC_METADATA_BLOCK       0x06
> +#define USE_EXTENDED_TAG		0x07
> +
> +/* DRM HDR definitions. Not in the UAPI header, unfortunately. */ enum
> +hdmi_eotf {
> +	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
> +	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
> +	HDMI_EOTF_SMPTE_ST2084,
> +};
> +
>  /* Test flags. */
>  enum {
>  	TEST_NONE = 1 << 0,
> @@ -267,6 +280,80 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
>  	igt_require_f(valid_tests, "No connector found with MAX BPC connector
> property\n");  }
> 
> +static bool cta_block(const char *edid_ext) {
> +	/*
> +	 * Byte 1: 0x07 indicates Extended Tag
> +	 * Byte 2: 0x06 indicates HDMI Static Metadata Block
> +	 * Byte 3: bits 0 to 5 identify EOTF functions supported by sink
> +	 *	       where ET_0: Traditional Gamma - SDR Luminance Range
> +	 *	             ET_1: Traditional Gamma - HDR Luminance Range
> +	 *	             ET_2: SMPTE ST 2084
> +	 *	             ET_3: Hybrid Log-Gamma (HLG)
> +	 *	             ET_4 to ET_5: Reserved for future use
> +	 */
> +
> +	if ((((edid_ext[0] & 0xe0) >> 5 == USE_EXTENDED_TAG) &&
> +	      (edid_ext[1] == HDR_STATIC_METADATA_BLOCK)) &&
> +	     ((edid_ext[2] & HDMI_EOTF_TRADITIONAL_GAMMA_HDR) ||
> +	      (edid_ext[2] & HDMI_EOTF_SMPTE_ST2084)))
> +			return true;
> +
> +	return false;
> +}
> +
> +/* Returns true if panel supports HDR. */ static bool
> +is_panel_hdr(data_t *data, igt_output_t *output) {
> +	bool ok;
> +	int i, j, offset;
> +	uint64_t edid_blob_id;
> +	drmModePropertyBlobRes *edid_blob;
> +	const struct edid_ext *edid_ext;
> +	const struct edid *edid;
> +	const struct edid_cea *edid_cea;
> +	const char *cea_data;
> +	bool ret = false;
> +
> +	ok = kmstest_get_property(data->fd, output->id,
> +			DRM_MODE_OBJECT_CONNECTOR, "EDID",
> +			NULL, &edid_blob_id, NULL);
> +
> +	if (!ok || !edid_blob_id)
> +		return ret;
> +
> +	edid_blob = drmModeGetPropertyBlob(data->fd, edid_blob_id);
> +	igt_assert(edid_blob);
> +
> +	edid = (const struct edid *) edid_blob->data;
> +	igt_assert(edid);
> +
> +	drmModeFreePropertyBlob(edid_blob);
> +
> +	for (i = 0; i < edid->extensions_len; i++) {
> +		edid_ext = &edid->extensions[i];
> +		edid_cea = &edid_ext->data.cea;
> +
> +		/* HDR not defined in CTA Extension Version < 3. */
> +		if ((edid_ext->tag != EDID_EXT_CEA) ||
> +		    (edid_cea->revision != CTA_EXTENSION_VERSION))
> +				continue;
> +		else {
> +			offset = edid_cea->dtd_start;
> +			cea_data = edid_cea->data;
> +
> +			for (j = 0; j < offset; j += (cea_data[j] & 0x1f) + 1) {
> +				ret = cta_block(cea_data + j);
> +
> +				if (ret)
> +					break;
> +			}
> +		}
> +	}
> +
> +	return ret;
> +}
> +
>  igt_main
>  {
>  	data_t data = { 0 };
> --
> 2.24.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for Add tests for HDR metadata interfaces and bpc switch (rev4)
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (6 preceding siblings ...)
  2020-01-29 13:55 ` [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata Swati Sharma
@ 2020-01-29 17:22 ` Patchwork
  2020-02-01  2:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  8 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2020-01-29 17:22 UTC (permalink / raw)
  To: Swati Sharma; +Cc: igt-dev

== Series Details ==

Series: Add tests for HDR metadata interfaces and bpc switch (rev4)
URL   : https://patchwork.freedesktop.org/series/71524/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7838 -> IGTPW_4029
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-tgl-y:           [PASS][1] -> [FAIL][2] ([CI#94])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_blt:
    - fi-ivb-3770:        [PASS][3] -> [DMESG-FAIL][4] ([i915#725])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-ivb-3770/igt@i915_selftest@live_blt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-ivb-3770/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_execlists:
    - fi-icl-dsi:         [PASS][5] -> [INCOMPLETE][6] ([i915#140])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-dsi/igt@i915_selftest@live_execlists.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-icl-dsi/igt@i915_selftest@live_execlists.html
    - fi-icl-u3:          [PASS][7] -> [INCOMPLETE][8] ([i915#140])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-u3/igt@i915_selftest@live_execlists.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-icl-u3/igt@i915_selftest@live_execlists.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-hsw-peppy:       [PASS][9] -> [DMESG-FAIL][10] ([i915#722])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html

  * igt@kms_addfb_basic@bad-pitch-1024:
    - fi-tgl-y:           [PASS][11] -> [DMESG-WARN][12] ([CI#94] / [i915#402]) +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-1024.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-1024.html

  * igt@kms_chamelium@dp-edid-read:
    - fi-cml-u2:          [PASS][13] -> [FAIL][14] ([i915#217])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-cml-u2/igt@kms_chamelium@dp-edid-read.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-cml-u2/igt@kms_chamelium@dp-edid-read.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          [PASS][15] -> [FAIL][16] ([i915#217])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-4770:        [PASS][17] -> [FAIL][18] ([i915#49])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-hsw-4770/igt@kms_frontbuffer_tracking@basic.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-hsw-4770/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770:        [DMESG-FAIL][19] ([i915#553] / [i915#725]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-hsw-4770/igt@i915_selftest@live_blt.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-hsw-4770/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-8700k:       [INCOMPLETE][21] ([i915#424]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html

  * igt@i915_selftest@live_gtt:
    - fi-bdw-5557u:       [TIMEOUT][23] ([fdo#112271]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-bdw-5557u/igt@i915_selftest@live_gtt.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-bdw-5557u/igt@i915_selftest@live_gtt.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][25] ([fdo#111096] / [i915#323]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
    - fi-icl-dsi:         [DMESG-WARN][27] ([i915#109]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-dsi/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-icl-dsi/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html

  * igt@prime_self_import@basic-llseek-size:
    - fi-tgl-y:           [DMESG-WARN][29] ([CI#94] / [i915#402]) -> [PASS][30] +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-tgl-y/igt@prime_self_import@basic-llseek-size.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-tgl-y/igt@prime_self_import@basic-llseek-size.html

  
#### Warnings ####

  * igt@i915_selftest@live_execlists:
    - fi-icl-y:           [INCOMPLETE][31] ([i915#140]) -> [DMESG-FAIL][32] ([fdo#108569])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-y/igt@i915_selftest@live_execlists.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/fi-icl-y/igt@i915_selftest@live_execlists.html

  
  [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
  [i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
  [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
  [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
  [i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725


Participating hosts (50 -> 46)
------------------------------

  Additional (2): fi-byt-n2820 fi-bwr-2160 
  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-kbl-7560u fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5404 -> IGTPW_4029

  CI-20190529: 20190529
  CI_DRM_7838: d3d96beea538c8de906a1c4d7e6793a47d17a471 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4029: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/index.html
  IGT_5404: 4147bab8e3dcaf11bd657b5fb4c109708e94e60c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_hdr@bpc-switch
+igt@kms_hdr@bpc-switch-dpms
+igt@kms_hdr@bpc-switch-suspend
+igt@kms_hdr@static-swap
+igt@kms_hdr@static-toggle
+igt@kms_hdr@static-toggle-dpms
+igt@kms_hdr@static-toggle-suspend

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for Add tests for HDR metadata interfaces and bpc switch (rev4)
  2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
                   ` (7 preceding siblings ...)
  2020-01-29 17:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add tests for HDR metadata interfaces and bpc switch (rev4) Patchwork
@ 2020-02-01  2:15 ` Patchwork
  8 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2020-02-01  2:15 UTC (permalink / raw)
  To: Swati Sharma; +Cc: igt-dev

== Series Details ==

Series: Add tests for HDR metadata interfaces and bpc switch (rev4)
URL   : https://patchwork.freedesktop.org/series/71524/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7838_full -> IGTPW_4029_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_4029_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4029_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_4029/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_hdr@bpc-switch-dpms} (NEW):
    - shard-hsw:          NOTRUN -> [FAIL][1] +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw6/igt@kms_hdr@bpc-switch-dpms.html

  * {igt@kms_hdr@static-toggle} (NEW):
    - shard-iclb:         NOTRUN -> [SKIP][2] +3 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb8/igt@kms_hdr@static-toggle.html

  * {igt@kms_hdr@static-toggle-dpms} (NEW):
    - shard-tglb:         NOTRUN -> [SKIP][3] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-tglb3/igt@kms_hdr@static-toggle-dpms.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-iclb:         [PASS][4] -> [INCOMPLETE][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
New tests
---------

  New tests have been introduced between CI_DRM_7838_full and IGTPW_4029_full:

### New IGT tests (7) ###

  * igt@kms_hdr@bpc-switch:
    - Statuses : 1 fail(s) 5 pass(s) 1 skip(s)
    - Exec time: [0.0, 3.68] s

  * igt@kms_hdr@bpc-switch-dpms:
    - Statuses : 1 fail(s) 5 pass(s) 1 skip(s)
    - Exec time: [0.0, 4.84] s

  * igt@kms_hdr@bpc-switch-suspend:
    - Statuses : 1 fail(s) 5 pass(s) 1 skip(s)
    - Exec time: [0.0, 6.26] s

  * igt@kms_hdr@static-swap:
    - Statuses : 7 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_hdr@static-toggle:
    - Statuses : 7 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_hdr@static-toggle-dpms:
    - Statuses : 7 skip(s)
    - Exec time: [0.0, 0.00] s

  * igt@kms_hdr@static-toggle-suspend:
    - Statuses : 7 skip(s)
    - Exec time: [0.0, 0.00] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@fifo-bsd1:
    - shard-iclb:         [PASS][6] -> [SKIP][7] ([fdo#109276]) +17 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb4/igt@gem_exec_schedule@fifo-bsd1.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb3/igt@gem_exec_schedule@fifo-bsd1.html

  * igt@gem_exec_schedule@pi-common-bsd:
    - shard-iclb:         [PASS][8] -> [SKIP][9] ([i915#677]) +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb5/igt@gem_exec_schedule@pi-common-bsd.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb4/igt@gem_exec_schedule@pi-common-bsd.html

  * igt@gem_exec_schedule@preempt-queue-bsd:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([fdo#112146]) +1 similar issue
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb5/igt@gem_exec_schedule@preempt-queue-bsd.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb4/igt@gem_exec_schedule@preempt-queue-bsd.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [PASS][12] -> [DMESG-WARN][13] ([i915#180]) +2 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-apl7/igt@gem_workarounds@suspend-resume-context.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-apl4/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_selftest@live_execlists:
    - shard-iclb:         [PASS][14] -> [INCOMPLETE][15] ([i915#140])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb3/igt@i915_selftest@live_execlists.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb6/igt@i915_selftest@live_execlists.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
    - shard-kbl:          [PASS][16] -> [FAIL][17] ([i915#49])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
    - shard-apl:          [PASS][18] -> [FAIL][19] ([i915#49])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-apl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-kbl:          [PASS][20] -> [DMESG-WARN][21] ([i915#180])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-kbl6/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][22] -> [SKIP][23] ([fdo#109441]) +2 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@perf_pmu@busy-vcs1:
    - shard-iclb:         [PASS][24] -> [SKIP][25] ([fdo#112080]) +9 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb4/igt@perf_pmu@busy-vcs1.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb6/igt@perf_pmu@busy-vcs1.html

  * igt@prime_mmap_coherency@ioctl-errors:
    - shard-hsw:          [PASS][26] -> [FAIL][27] ([i915#831])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw2/igt@prime_mmap_coherency@ioctl-errors.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw4/igt@prime_mmap_coherency@ioctl-errors.html

  * igt@prime_mmap_coherency@read:
    - shard-hsw:          [PASS][28] -> [INCOMPLETE][29] ([i915#61]) +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw8/igt@prime_mmap_coherency@read.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw5/igt@prime_mmap_coherency@read.html

  
#### Possible fixes ####

  * igt@gem_busy@busy-vcs1:
    - shard-iclb:         [SKIP][30] ([fdo#112080]) -> [PASS][31] +9 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb7/igt@gem_busy@busy-vcs1.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb1/igt@gem_busy@busy-vcs1.html

  * {igt@gem_ctx_persistence@vcs1-hang}:
    - shard-iclb:         [SKIP][32] ([fdo#109276]) -> [PASS][33] +21 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb6/igt@gem_ctx_persistence@vcs1-hang.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb2/igt@gem_ctx_persistence@vcs1-hang.html

  * igt@gem_ctx_persistence@vcs1-hostile-preempt:
    - shard-iclb:         [SKIP][34] ([fdo#109276] / [fdo#112080]) -> [PASS][35] +2 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb7/igt@gem_ctx_persistence@vcs1-hostile-preempt.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb4/igt@gem_ctx_persistence@vcs1-hostile-preempt.html

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][36] ([fdo#110841]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb2/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb3/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_balancer@hang:
    - shard-iclb:         [TIMEOUT][38] ([fdo#112271]) -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb2/igt@gem_exec_balancer@hang.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb3/igt@gem_exec_balancer@hang.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [SKIP][40] ([fdo#112146]) -> [PASS][41] +8 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb2/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb3/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@gem_partial_pwrite_pread@writes-after-reads:
    - shard-hsw:          [FAIL][42] ([i915#694]) -> [PASS][43] +1 similar issue
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw5/igt@gem_partial_pwrite_pread@writes-after-reads.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw1/igt@gem_partial_pwrite_pread@writes-after-reads.html

  * igt@gem_persistent_relocs@forked-interruptible-thrash-inactive:
    - shard-hsw:          [FAIL][44] ([i915#520]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw6/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw1/igt@gem_persistent_relocs@forked-interruptible-thrash-inactive.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-glk:          [FAIL][46] ([i915#644]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-glk4/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-glk5/igt@gem_ppgtt@flink-and-close-vma-leak.html
    - shard-kbl:          [FAIL][48] ([i915#644]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-kbl3/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-kbl7/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@i915_pm_rps@reset:
    - shard-iclb:         [FAIL][50] ([i915#413]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb1/igt@i915_pm_rps@reset.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb4/igt@i915_pm_rps@reset.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [DMESG-WARN][52] ([i915#180]) -> [PASS][53] +3 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-apl6/igt@i915_suspend@fence-restore-tiled2untiled.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-apl4/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_atomic_transition@plane-all-modeset-transition:
    - shard-hsw:          [DMESG-WARN][54] ([i915#44]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw5/igt@kms_atomic_transition@plane-all-modeset-transition.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw2/igt@kms_atomic_transition@plane-all-modeset-transition.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-kbl:          [DMESG-WARN][56] ([i915#180]) -> [PASS][57] +3 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-kbl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - shard-iclb:         [TIMEOUT][58] -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb8/igt@kms_fbcon_fbt@psr-suspend.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb6/igt@kms_fbcon_fbt@psr-suspend.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][60] ([fdo#109441]) -> [PASS][61] +2 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb6/igt@kms_psr@psr2_no_drrs.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][62] ([i915#31]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-kbl4/igt@kms_setmode@basic.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-kbl7/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vcs1-nonpriv:
    - shard-iclb:         [FAIL][64] ([IGT#28]) -> [SKIP][65] ([fdo#112080]) +1 similar issue
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-iclb2/igt@gem_ctx_isolation@vcs1-nonpriv.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-iclb7/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * igt@gem_tiled_blits@normal:
    - shard-hsw:          [FAIL][66] ([i915#818]) -> [FAIL][67] ([i915#694])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-hsw5/igt@gem_tiled_blits@normal.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-hsw5/igt@gem_tiled_blits@normal.html

  * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
    - shard-snb:          [DMESG-WARN][68] ([fdo#111870] / [i915#478]) -> [DMESG-WARN][69] ([fdo#110789] / [fdo#111870] / [i915#478]) +1 similar issue
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/shard-snb4/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/shard-snb6/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html

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

  [IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
  [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
  [i915#478]: https://gitlab.freedesktop.org/drm/intel/issues/478
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#520]: https://gitlab.freedesktop.org/drm/intel/issues/520
  [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
  [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
  [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
  [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
  [i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
  [i915#831]: https://gitlab.freedesktop.org/drm/intel/issues/831


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

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5404 -> IGTPW_4029
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_7838: d3d96beea538c8de906a1c4d7e6793a47d17a471 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4029: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4029/index.html
  IGT_5404: 4147bab8e3dcaf11bd657b5fb4c109708e94e60c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests
  2020-01-29 13:55 ` [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests Swati Sharma
@ 2020-02-03  8:49   ` Sharma, Swati2
  2020-02-03 13:25     ` Kazlauskas, Nicholas
  0 siblings, 1 reply; 16+ messages in thread
From: Sharma, Swati2 @ 2020-02-03  8:49 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

Hi Nicholas,

With this patch we are seeing regression on HSW.
Earlier we were getting scaler issue, I tried fixing it by having plane 
size to 512x512.
Now, in dmesg we can see "Plane must cover entire CRTC". For this to fix 
i need to change the plane size to CRTC size; which will give scaler 
issue as earlier. Ultimately i have to change FB size to mode->w, mode->h.
But according to comment its written "10-bit formats are slow, so limit 
the size"; so what you think is the right way to proceed? Should i 
change FB size? How much slowness is "slow" here?

@Ville what you think?

On 29-Jan-20 7:25 PM, Swati Sharma wrote:
> From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> 
> Add subtests to validate transitions between 8bpc and 10bpc. Test is
> made compatible for both amd and intel drivers. The test requires
> the "output_bpc" debugfs entry to read current and maximum bpc.
> This is exposed by amd driver, however intel driver doesn't expose it,
> so made that restriction to assert output bpc only for amd driver.
> 
> v2: -Limiting plane size to 512x512 since regression observed in hsw
>       because of plane scaling restriction.
>      -Minor alignment fix [Uma]
> v3: -Small fix
> 
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> ---
>   tests/Makefile.sources |   1 +
>   tests/kms_hdr.c        | 295 +++++++++++++++++++++++++++++++++++++++++
>   tests/meson.build      |   1 +
>   3 files changed, 297 insertions(+)
>   create mode 100644 tests/kms_hdr.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 4582f656..98411172 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -54,6 +54,7 @@ TESTS_progs = \
>   	kms_frontbuffer_tracking \
>   	kms_getfb \
>   	kms_hdmi_inject \
> +	kms_hdr \
>   	kms_invalid_dotclock \
>   	kms_lease \
>   	kms_legacy_colorkey \
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> new file mode 100644
> index 00000000..ff21335a
> --- /dev/null
> +++ b/tests/kms_hdr.c
> @@ -0,0 +1,295 @@
> +/*
> + * Copyright 2019 Advanced Micro Devices, Inc.
> + *
> + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <fcntl.h>
> +#include <termios.h>
> +#include <unistd.h>
> +
> +IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
> +
> +/* Test flags. */
> +enum {
> +	TEST_NONE = 1 << 0,
> +	TEST_DPMS = 1 << 1,
> +	TEST_SUSPEND = 1 << 2,
> +};
> +
> +/* BPC connector state. */
> +typedef struct output_bpc {
> +	unsigned int current;
> +	unsigned int maximum;
> +} output_bpc_t;
> +
> +/* Common test data. */
> +typedef struct data {
> +	igt_display_t display;
> +	igt_plane_t *primary;
> +	igt_output_t *output;
> +	igt_pipe_t *pipe;
> +	igt_pipe_crc_t *pipe_crc;
> +	drmModeModeInfo *mode;
> +	enum pipe pipe_id;
> +	int fd;
> +	int w;
> +	int h;
> +} data_t;
> +
> +/* Common test cleanup. */
> +static void test_fini(data_t *data)
> +{
> +	igt_pipe_crc_free(data->pipe_crc);
> +	igt_display_reset(&data->display);
> +}
> +
> +static void test_cycle_flags(data_t *data, uint32_t test_flags)
> +{
> +	if (test_flags & TEST_DPMS) {
> +		kmstest_set_connector_dpms(data->fd,
> +					   data->output->config.connector,
> +					   DRM_MODE_DPMS_OFF);
> +		kmstest_set_connector_dpms(data->fd,
> +					   data->output->config.connector,
> +					   DRM_MODE_DPMS_ON);
> +	}
> +
> +	if (test_flags & TEST_SUSPEND)
> +		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> +					      SUSPEND_TEST_NONE);
> +}
> +
> +/* Returns the current and maximum bpc from the connector debugfs. */
> +static output_bpc_t get_output_bpc(data_t *data)
> +{
> +	char buf[256];
> +	char *start_loc;
> +	int fd, res;
> +	output_bpc_t info;
> +
> +	fd = igt_debugfs_connector_dir(data->fd, data->output->name, O_RDONLY);
> +	igt_assert(fd >= 0);
> +
> +	res = igt_debugfs_simple_read(fd, "output_bpc", buf, sizeof(buf));
> +
> +	igt_require(res > 0);
> +
> +	close(fd);
> +
> +	igt_assert(start_loc = strstr(buf, "Current: "));
> +	igt_assert_eq(sscanf(start_loc, "Current: %u", &info.current), 1);
> +
> +	igt_assert(start_loc = strstr(buf, "Maximum: "));
> +	igt_assert_eq(sscanf(start_loc, "Maximum: %u", &info.maximum), 1);
> +
> +	return info;
> +}
> +
> +/* Verifies that connector has the correct output bpc. */
> +static void assert_output_bpc(data_t *data, unsigned int bpc)
> +{
> +	output_bpc_t info = get_output_bpc(data);
> +
> +	igt_require_f(info.maximum >= bpc,
> +		      "Monitor doesn't support %u bpc, max is %u\n", bpc,
> +		      info.maximum);
> +
> +	igt_assert_eq(info.current, bpc);
> +}
> +
> +/* Fills the FB with a test HDR pattern. */
> +static void draw_hdr_pattern(igt_fb_t *fb)
> +{
> +	cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
> +
> +	igt_paint_color(cr, 0, 0, fb->width, fb->height, 1.0, 1.0, 1.0);
> +	igt_paint_test_pattern(cr, fb->width, fb->height);
> +
> +	igt_put_cairo_ctx(fb->fd, fb, cr);
> +}
> +
> +/* Prepare test data. */
> +static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
> +{
> +	igt_display_t *display = &data->display;
> +
> +	data->pipe_id = pipe;
> +	data->pipe = &data->display.pipes[data->pipe_id];
> +	igt_assert(data->pipe);
> +
> +	igt_display_reset(display);
> +
> +	data->output = output;
> +	igt_assert(data->output);
> +
> +	data->mode = igt_output_get_mode(data->output);
> +	igt_assert(data->mode);
> +
> +	data->primary =
> +		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> +
> +	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
> +					  INTEL_PIPE_CRC_SOURCE_AUTO);
> +
> +	igt_output_set_pipe(data->output, data->pipe_id);
> +
> +	data->w = data->mode->hdisplay;
> +	data->h = data->mode->vdisplay;
> +}
> +
> +static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
> +{
> +	int i;
> +
> +	for (i = 0; i < display->n_outputs; i++)
> +		if (display->outputs[i].pending_pipe == pipe)
> +			return false;
> +
> +	return true;
> +}
> +
> +static void test_bpc_switch_on_output(data_t *data, igt_output_t *output,
> +				      uint32_t flags)
> +{
> +	igt_display_t *display = &data->display;
> +	igt_crc_t ref_crc, new_crc;
> +	enum pipe pipe;
> +	igt_fb_t afb;
> +	int afb_id;
> +
> +	for_each_pipe(display, pipe) {
> +		if (!igt_pipe_connector_valid(pipe, output))
> +			continue;
> +		/*
> +		 * If previous subtest of connector failed, pipe
> +		 * attached to that connector is not released.
> +		 * Because of that we have to choose the non
> +		 * attached pipe for this subtest.
> +		 */
> +		if (!igt_pipe_is_free(display, pipe))
> +			continue;
> +
> +		prepare_test(data, output, pipe);
> +
> +		/* 10-bit formats are slow, so limit the size. */
> +		afb_id = igt_create_fb(data->fd, 512, 512, DRM_FORMAT_XRGB2101010, 0, &afb);
> +		igt_assert(afb_id);
> +
> +		draw_hdr_pattern(&afb);
> +
> +		/* Start in 8bpc. */
> +		igt_plane_set_fb(data->primary, &afb);
> +		/*
> +		 * Limiting plane size aswell, since most of gen7 and all of
> +		 * gen8 doesn't support plane scaling at all.
> +		 */
> +		igt_plane_set_size(data->primary, 512, 512);
> +		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> +		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		/*
> +		 * i915 driver doesn't expose max bpc as debugfs entry,
> +		 * so limiting assert only for amd driver.
> +		 */
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 8);
> +
> +		/* Switch to 10bpc. */
> +		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
> +		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 10);
> +
> +		/* Verify that the CRC are equal after DPMS or suspend. */
> +		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
> +		test_cycle_flags(data, flags);
> +		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
> +
> +		/* Drop back to 8bpc. */
> +		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> +		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +		if (is_amdgpu_device(data->fd))
> +			assert_output_bpc(data, 8);
> +
> +		/* CRC capture is clamped to 8bpc, so capture should match. */
> +		igt_assert_crc_equal(&ref_crc, &new_crc);
> +
> +		test_fini(data);
> +		igt_remove_fb(data->fd, &afb);
> +
> +		/*
> +		 * Testing a output with a pipe is enough for HDR
> +		 * testing. No ROI in testing the connector with other
> +		 * pipes. So break the loop on pipe.
> +		 */
> +		break;
> +	}
> +}
> +
> +/* Returns true if an output supports max bpc property. */
> +static bool has_max_bpc(igt_output_t *output)
> +{
> +	return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> +	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> +}
> +
> +static void test_bpc_switch(data_t *data, uint32_t flags)
> +{
> +	igt_output_t *output;
> +	int valid_tests = 0;
> +
> +	for_each_connected_output(&data->display, output) {
> +		if (!has_max_bpc(output))
> +			continue;
> +
> +		igt_info("BPC switch test execution on %s\n", output->name);
> +		test_bpc_switch_on_output(data, output, flags);
> +		valid_tests++;
> +	}
> +
> +	igt_require_f(valid_tests, "No connector found with MAX BPC connector property\n");
> +}
> +
> +igt_main
> +{
> +	data_t data = { 0 };
> +
> +	igt_fixture {
> +		data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
> +
> +		kmstest_set_vt_graphics_mode();
> +
> +		igt_display_require(&data.display, data.fd);
> +		igt_require(data.display.is_atomic);
> +
> +		igt_display_require_output(&data.display);
> +	}
> +
> +	igt_describe("Tests switching between different display output bpc modes");
> +	igt_subtest("bpc-switch") test_bpc_switch(&data, TEST_NONE);
> +	igt_describe("Tests bpc switch with dpms");
> +	igt_subtest("bpc-switch-dpms") test_bpc_switch(&data, TEST_DPMS);
> +	igt_describe("Tests bpc switch with suspend");
> +	igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, TEST_SUSPEND);
> +
> +	igt_fixture {
> +		igt_display_fini(&data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index bc8652aa..6ac2c830 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -38,6 +38,7 @@ test_progs = [
>   	'kms_frontbuffer_tracking',
>   	'kms_getfb',
>   	'kms_hdmi_inject',
> +	'kms_hdr',
>   	'kms_invalid_dotclock',
>   	'kms_lease',
>   	'kms_legacy_colorkey',
> 

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

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

* Re: [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests
  2020-02-03  8:49   ` Sharma, Swati2
@ 2020-02-03 13:25     ` Kazlauskas, Nicholas
  2020-02-03 13:58       ` Ville Syrjälä
  0 siblings, 1 reply; 16+ messages in thread
From: Kazlauskas, Nicholas @ 2020-02-03 13:25 UTC (permalink / raw)
  To: Sharma, Swati2, igt-dev; +Cc: petri.latvala

Drawing on 10-bit framebuffers in IGT is incredibly slow, especially for 
buffers larger than 1080p. I think it was a few seconds of overhead per 
test.

AMD hardware can handle unscaled vs scaled without issue so changing it 
to the full resolution is fine by me if it helps maintain compatibility 
across vendors.

Regards,
Nicholas Kazlauskas

On 2020-02-03 3:49 a.m., Sharma, Swati2 wrote:
> Hi Nicholas,
> 
> With this patch we are seeing regression on HSW.
> Earlier we were getting scaler issue, I tried fixing it by having plane 
> size to 512x512.
> Now, in dmesg we can see "Plane must cover entire CRTC". For this to fix 
> i need to change the plane size to CRTC size; which will give scaler 
> issue as earlier. Ultimately i have to change FB size to mode->w, mode->h.
> But according to comment its written "10-bit formats are slow, so limit 
> the size"; so what you think is the right way to proceed? Should i 
> change FB size? How much slowness is "slow" here?
> 
> @Ville what you think?
> 
> On 29-Jan-20 7:25 PM, Swati Sharma wrote:
>> From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>>
>> Add subtests to validate transitions between 8bpc and 10bpc. Test is
>> made compatible for both amd and intel drivers. The test requires
>> the "output_bpc" debugfs entry to read current and maximum bpc.
>> This is exposed by amd driver, however intel driver doesn't expose it,
>> so made that restriction to assert output bpc only for amd driver.
>>
>> v2: -Limiting plane size to 512x512 since regression observed in hsw
>>       because of plane scaling restriction.
>>      -Minor alignment fix [Uma]
>> v3: -Small fix
>>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Leo Li <sunpeng.li@amd.com>
>> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>> ---
>>   tests/Makefile.sources |   1 +
>>   tests/kms_hdr.c        | 295 +++++++++++++++++++++++++++++++++++++++++
>>   tests/meson.build      |   1 +
>>   3 files changed, 297 insertions(+)
>>   create mode 100644 tests/kms_hdr.c
>>
>> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
>> index 4582f656..98411172 100644
>> --- a/tests/Makefile.sources
>> +++ b/tests/Makefile.sources
>> @@ -54,6 +54,7 @@ TESTS_progs = \
>>       kms_frontbuffer_tracking \
>>       kms_getfb \
>>       kms_hdmi_inject \
>> +    kms_hdr \
>>       kms_invalid_dotclock \
>>       kms_lease \
>>       kms_legacy_colorkey \
>> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
>> new file mode 100644
>> index 00000000..ff21335a
>> --- /dev/null
>> +++ b/tests/kms_hdr.c
>> @@ -0,0 +1,295 @@
>> +/*
>> + * Copyright 2019 Advanced Micro Devices, Inc.
>> + *
>> + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <fcntl.h>
>> +#include <termios.h>
>> +#include <unistd.h>
>> +
>> +IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
>> +
>> +/* Test flags. */
>> +enum {
>> +    TEST_NONE = 1 << 0,
>> +    TEST_DPMS = 1 << 1,
>> +    TEST_SUSPEND = 1 << 2,
>> +};
>> +
>> +/* BPC connector state. */
>> +typedef struct output_bpc {
>> +    unsigned int current;
>> +    unsigned int maximum;
>> +} output_bpc_t;
>> +
>> +/* Common test data. */
>> +typedef struct data {
>> +    igt_display_t display;
>> +    igt_plane_t *primary;
>> +    igt_output_t *output;
>> +    igt_pipe_t *pipe;
>> +    igt_pipe_crc_t *pipe_crc;
>> +    drmModeModeInfo *mode;
>> +    enum pipe pipe_id;
>> +    int fd;
>> +    int w;
>> +    int h;
>> +} data_t;
>> +
>> +/* Common test cleanup. */
>> +static void test_fini(data_t *data)
>> +{
>> +    igt_pipe_crc_free(data->pipe_crc);
>> +    igt_display_reset(&data->display);
>> +}
>> +
>> +static void test_cycle_flags(data_t *data, uint32_t test_flags)
>> +{
>> +    if (test_flags & TEST_DPMS) {
>> +        kmstest_set_connector_dpms(data->fd,
>> +                       data->output->config.connector,
>> +                       DRM_MODE_DPMS_OFF);
>> +        kmstest_set_connector_dpms(data->fd,
>> +                       data->output->config.connector,
>> +                       DRM_MODE_DPMS_ON);
>> +    }
>> +
>> +    if (test_flags & TEST_SUSPEND)
>> +        igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
>> +                          SUSPEND_TEST_NONE);
>> +}
>> +
>> +/* Returns the current and maximum bpc from the connector debugfs. */
>> +static output_bpc_t get_output_bpc(data_t *data)
>> +{
>> +    char buf[256];
>> +    char *start_loc;
>> +    int fd, res;
>> +    output_bpc_t info;
>> +
>> +    fd = igt_debugfs_connector_dir(data->fd, data->output->name, 
>> O_RDONLY);
>> +    igt_assert(fd >= 0);
>> +
>> +    res = igt_debugfs_simple_read(fd, "output_bpc", buf, sizeof(buf));
>> +
>> +    igt_require(res > 0);
>> +
>> +    close(fd);
>> +
>> +    igt_assert(start_loc = strstr(buf, "Current: "));
>> +    igt_assert_eq(sscanf(start_loc, "Current: %u", &info.current), 1);
>> +
>> +    igt_assert(start_loc = strstr(buf, "Maximum: "));
>> +    igt_assert_eq(sscanf(start_loc, "Maximum: %u", &info.maximum), 1);
>> +
>> +    return info;
>> +}
>> +
>> +/* Verifies that connector has the correct output bpc. */
>> +static void assert_output_bpc(data_t *data, unsigned int bpc)
>> +{
>> +    output_bpc_t info = get_output_bpc(data);
>> +
>> +    igt_require_f(info.maximum >= bpc,
>> +              "Monitor doesn't support %u bpc, max is %u\n", bpc,
>> +              info.maximum);
>> +
>> +    igt_assert_eq(info.current, bpc);
>> +}
>> +
>> +/* Fills the FB with a test HDR pattern. */
>> +static void draw_hdr_pattern(igt_fb_t *fb)
>> +{
>> +    cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
>> +
>> +    igt_paint_color(cr, 0, 0, fb->width, fb->height, 1.0, 1.0, 1.0);
>> +    igt_paint_test_pattern(cr, fb->width, fb->height);
>> +
>> +    igt_put_cairo_ctx(fb->fd, fb, cr);
>> +}
>> +
>> +/* Prepare test data. */
>> +static void prepare_test(data_t *data, igt_output_t *output, enum 
>> pipe pipe)
>> +{
>> +    igt_display_t *display = &data->display;
>> +
>> +    data->pipe_id = pipe;
>> +    data->pipe = &data->display.pipes[data->pipe_id];
>> +    igt_assert(data->pipe);
>> +
>> +    igt_display_reset(display);
>> +
>> +    data->output = output;
>> +    igt_assert(data->output);
>> +
>> +    data->mode = igt_output_get_mode(data->output);
>> +    igt_assert(data->mode);
>> +
>> +    data->primary =
>> +        igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
>> +
>> +    data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
>> +                      INTEL_PIPE_CRC_SOURCE_AUTO);
>> +
>> +    igt_output_set_pipe(data->output, data->pipe_id);
>> +
>> +    data->w = data->mode->hdisplay;
>> +    data->h = data->mode->vdisplay;
>> +}
>> +
>> +static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
>> +{
>> +    int i;
>> +
>> +    for (i = 0; i < display->n_outputs; i++)
>> +        if (display->outputs[i].pending_pipe == pipe)
>> +            return false;
>> +
>> +    return true;
>> +}
>> +
>> +static void test_bpc_switch_on_output(data_t *data, igt_output_t 
>> *output,
>> +                      uint32_t flags)
>> +{
>> +    igt_display_t *display = &data->display;
>> +    igt_crc_t ref_crc, new_crc;
>> +    enum pipe pipe;
>> +    igt_fb_t afb;
>> +    int afb_id;
>> +
>> +    for_each_pipe(display, pipe) {
>> +        if (!igt_pipe_connector_valid(pipe, output))
>> +            continue;
>> +        /*
>> +         * If previous subtest of connector failed, pipe
>> +         * attached to that connector is not released.
>> +         * Because of that we have to choose the non
>> +         * attached pipe for this subtest.
>> +         */
>> +        if (!igt_pipe_is_free(display, pipe))
>> +            continue;
>> +
>> +        prepare_test(data, output, pipe);
>> +
>> +        /* 10-bit formats are slow, so limit the size. */
>> +        afb_id = igt_create_fb(data->fd, 512, 512, 
>> DRM_FORMAT_XRGB2101010, 0, &afb);
>> +        igt_assert(afb_id);
>> +
>> +        draw_hdr_pattern(&afb);
>> +
>> +        /* Start in 8bpc. */
>> +        igt_plane_set_fb(data->primary, &afb);
>> +        /*
>> +         * Limiting plane size aswell, since most of gen7 and all of
>> +         * gen8 doesn't support plane scaling at all.
>> +         */
>> +        igt_plane_set_size(data->primary, 512, 512);
>> +        igt_output_set_prop_value(data->output, 
>> IGT_CONNECTOR_MAX_BPC, 8);
>> +        igt_display_commit_atomic(display, 
>> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>> +        /*
>> +         * i915 driver doesn't expose max bpc as debugfs entry,
>> +         * so limiting assert only for amd driver.
>> +         */
>> +        if (is_amdgpu_device(data->fd))
>> +            assert_output_bpc(data, 8);
>> +
>> +        /* Switch to 10bpc. */
>> +        igt_output_set_prop_value(data->output, 
>> IGT_CONNECTOR_MAX_BPC, 10);
>> +        igt_display_commit_atomic(display, 
>> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>> +        if (is_amdgpu_device(data->fd))
>> +            assert_output_bpc(data, 10);
>> +
>> +        /* Verify that the CRC are equal after DPMS or suspend. */
>> +        igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
>> +        test_cycle_flags(data, flags);
>> +        igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
>> +
>> +        /* Drop back to 8bpc. */
>> +        igt_output_set_prop_value(data->output, 
>> IGT_CONNECTOR_MAX_BPC, 8);
>> +        igt_display_commit_atomic(display, 
>> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>> +        if (is_amdgpu_device(data->fd))
>> +            assert_output_bpc(data, 8);
>> +
>> +        /* CRC capture is clamped to 8bpc, so capture should match. */
>> +        igt_assert_crc_equal(&ref_crc, &new_crc);
>> +
>> +        test_fini(data);
>> +        igt_remove_fb(data->fd, &afb);
>> +
>> +        /*
>> +         * Testing a output with a pipe is enough for HDR
>> +         * testing. No ROI in testing the connector with other
>> +         * pipes. So break the loop on pipe.
>> +         */
>> +        break;
>> +    }
>> +}
>> +
>> +/* Returns true if an output supports max bpc property. */
>> +static bool has_max_bpc(igt_output_t *output)
>> +{
>> +    return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
>> +           igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
>> +}
>> +
>> +static void test_bpc_switch(data_t *data, uint32_t flags)
>> +{
>> +    igt_output_t *output;
>> +    int valid_tests = 0;
>> +
>> +    for_each_connected_output(&data->display, output) {
>> +        if (!has_max_bpc(output))
>> +            continue;
>> +
>> +        igt_info("BPC switch test execution on %s\n", output->name);
>> +        test_bpc_switch_on_output(data, output, flags);
>> +        valid_tests++;
>> +    }
>> +
>> +    igt_require_f(valid_tests, "No connector found with MAX BPC 
>> connector property\n");
>> +}
>> +
>> +igt_main
>> +{
>> +    data_t data = { 0 };
>> +
>> +    igt_fixture {
>> +        data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
>> +
>> +        kmstest_set_vt_graphics_mode();
>> +
>> +        igt_display_require(&data.display, data.fd);
>> +        igt_require(data.display.is_atomic);
>> +
>> +        igt_display_require_output(&data.display);
>> +    }
>> +
>> +    igt_describe("Tests switching between different display output 
>> bpc modes");
>> +    igt_subtest("bpc-switch") test_bpc_switch(&data, TEST_NONE);
>> +    igt_describe("Tests bpc switch with dpms");
>> +    igt_subtest("bpc-switch-dpms") test_bpc_switch(&data, TEST_DPMS);
>> +    igt_describe("Tests bpc switch with suspend");
>> +    igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, 
>> TEST_SUSPEND);
>> +
>> +    igt_fixture {
>> +        igt_display_fini(&data.display);
>> +    }
>> +}
>> diff --git a/tests/meson.build b/tests/meson.build
>> index bc8652aa..6ac2c830 100644
>> --- a/tests/meson.build
>> +++ b/tests/meson.build
>> @@ -38,6 +38,7 @@ test_progs = [
>>       'kms_frontbuffer_tracking',
>>       'kms_getfb',
>>       'kms_hdmi_inject',
>> +    'kms_hdr',
>>       'kms_invalid_dotclock',
>>       'kms_lease',
>>       'kms_legacy_colorkey',
>>
> 

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

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

* Re: [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests
  2020-02-03 13:25     ` Kazlauskas, Nicholas
@ 2020-02-03 13:58       ` Ville Syrjälä
  0 siblings, 0 replies; 16+ messages in thread
From: Ville Syrjälä @ 2020-02-03 13:58 UTC (permalink / raw)
  To: Kazlauskas, Nicholas; +Cc: petri.latvala, igt-dev

On Mon, Feb 03, 2020 at 08:25:40AM -0500, Kazlauskas, Nicholas wrote:
> Drawing on 10-bit framebuffers in IGT is incredibly slow, especially for 
> buffers larger than 1080p. I think it was a few seconds of overhead per 
> test.
> 
> AMD hardware can handle unscaled vs scaled without issue so changing it 
> to the full resolution is fine by me if it helps maintain compatibility 
> across vendors.

In kms_plane we use TEST_ONLY to probe whether we can use a smaller than
fullscreen plane.

> 
> Regards,
> Nicholas Kazlauskas
> 
> On 2020-02-03 3:49 a.m., Sharma, Swati2 wrote:
> > Hi Nicholas,
> > 
> > With this patch we are seeing regression on HSW.
> > Earlier we were getting scaler issue, I tried fixing it by having plane 
> > size to 512x512.
> > Now, in dmesg we can see "Plane must cover entire CRTC". For this to fix 
> > i need to change the plane size to CRTC size; which will give scaler 
> > issue as earlier. Ultimately i have to change FB size to mode->w, mode->h.
> > But according to comment its written "10-bit formats are slow, so limit 
> > the size"; so what you think is the right way to proceed? Should i 
> > change FB size? How much slowness is "slow" here?
> > 
> > @Ville what you think?
> > 
> > On 29-Jan-20 7:25 PM, Swati Sharma wrote:
> >> From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> >>
> >> Add subtests to validate transitions between 8bpc and 10bpc. Test is
> >> made compatible for both amd and intel drivers. The test requires
> >> the "output_bpc" debugfs entry to read current and maximum bpc.
> >> This is exposed by amd driver, however intel driver doesn't expose it,
> >> so made that restriction to assert output bpc only for amd driver.
> >>
> >> v2: -Limiting plane size to 512x512 since regression observed in hsw
> >>       because of plane scaling restriction.
> >>      -Minor alignment fix [Uma]
> >> v3: -Small fix
> >>
> >> Cc: Harry Wentland <harry.wentland@amd.com>
> >> Cc: Leo Li <sunpeng.li@amd.com>
> >> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> >> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> >> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >> ---
> >>   tests/Makefile.sources |   1 +
> >>   tests/kms_hdr.c        | 295 +++++++++++++++++++++++++++++++++++++++++
> >>   tests/meson.build      |   1 +
> >>   3 files changed, 297 insertions(+)
> >>   create mode 100644 tests/kms_hdr.c
> >>
> >> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> >> index 4582f656..98411172 100644
> >> --- a/tests/Makefile.sources
> >> +++ b/tests/Makefile.sources
> >> @@ -54,6 +54,7 @@ TESTS_progs = \
> >>       kms_frontbuffer_tracking \
> >>       kms_getfb \
> >>       kms_hdmi_inject \
> >> +    kms_hdr \
> >>       kms_invalid_dotclock \
> >>       kms_lease \
> >>       kms_legacy_colorkey \
> >> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> >> new file mode 100644
> >> index 00000000..ff21335a
> >> --- /dev/null
> >> +++ b/tests/kms_hdr.c
> >> @@ -0,0 +1,295 @@
> >> +/*
> >> + * Copyright 2019 Advanced Micro Devices, Inc.
> >> + *
> >> + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <fcntl.h>
> >> +#include <termios.h>
> >> +#include <unistd.h>
> >> +
> >> +IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
> >> +
> >> +/* Test flags. */
> >> +enum {
> >> +    TEST_NONE = 1 << 0,
> >> +    TEST_DPMS = 1 << 1,
> >> +    TEST_SUSPEND = 1 << 2,
> >> +};
> >> +
> >> +/* BPC connector state. */
> >> +typedef struct output_bpc {
> >> +    unsigned int current;
> >> +    unsigned int maximum;
> >> +} output_bpc_t;
> >> +
> >> +/* Common test data. */
> >> +typedef struct data {
> >> +    igt_display_t display;
> >> +    igt_plane_t *primary;
> >> +    igt_output_t *output;
> >> +    igt_pipe_t *pipe;
> >> +    igt_pipe_crc_t *pipe_crc;
> >> +    drmModeModeInfo *mode;
> >> +    enum pipe pipe_id;
> >> +    int fd;
> >> +    int w;
> >> +    int h;
> >> +} data_t;
> >> +
> >> +/* Common test cleanup. */
> >> +static void test_fini(data_t *data)
> >> +{
> >> +    igt_pipe_crc_free(data->pipe_crc);
> >> +    igt_display_reset(&data->display);
> >> +}
> >> +
> >> +static void test_cycle_flags(data_t *data, uint32_t test_flags)
> >> +{
> >> +    if (test_flags & TEST_DPMS) {
> >> +        kmstest_set_connector_dpms(data->fd,
> >> +                       data->output->config.connector,
> >> +                       DRM_MODE_DPMS_OFF);
> >> +        kmstest_set_connector_dpms(data->fd,
> >> +                       data->output->config.connector,
> >> +                       DRM_MODE_DPMS_ON);
> >> +    }
> >> +
> >> +    if (test_flags & TEST_SUSPEND)
> >> +        igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> >> +                          SUSPEND_TEST_NONE);
> >> +}
> >> +
> >> +/* Returns the current and maximum bpc from the connector debugfs. */
> >> +static output_bpc_t get_output_bpc(data_t *data)
> >> +{
> >> +    char buf[256];
> >> +    char *start_loc;
> >> +    int fd, res;
> >> +    output_bpc_t info;
> >> +
> >> +    fd = igt_debugfs_connector_dir(data->fd, data->output->name, 
> >> O_RDONLY);
> >> +    igt_assert(fd >= 0);
> >> +
> >> +    res = igt_debugfs_simple_read(fd, "output_bpc", buf, sizeof(buf));
> >> +
> >> +    igt_require(res > 0);
> >> +
> >> +    close(fd);
> >> +
> >> +    igt_assert(start_loc = strstr(buf, "Current: "));
> >> +    igt_assert_eq(sscanf(start_loc, "Current: %u", &info.current), 1);
> >> +
> >> +    igt_assert(start_loc = strstr(buf, "Maximum: "));
> >> +    igt_assert_eq(sscanf(start_loc, "Maximum: %u", &info.maximum), 1);
> >> +
> >> +    return info;
> >> +}
> >> +
> >> +/* Verifies that connector has the correct output bpc. */
> >> +static void assert_output_bpc(data_t *data, unsigned int bpc)
> >> +{
> >> +    output_bpc_t info = get_output_bpc(data);
> >> +
> >> +    igt_require_f(info.maximum >= bpc,
> >> +              "Monitor doesn't support %u bpc, max is %u\n", bpc,
> >> +              info.maximum);
> >> +
> >> +    igt_assert_eq(info.current, bpc);
> >> +}
> >> +
> >> +/* Fills the FB with a test HDR pattern. */
> >> +static void draw_hdr_pattern(igt_fb_t *fb)
> >> +{
> >> +    cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
> >> +
> >> +    igt_paint_color(cr, 0, 0, fb->width, fb->height, 1.0, 1.0, 1.0);
> >> +    igt_paint_test_pattern(cr, fb->width, fb->height);
> >> +
> >> +    igt_put_cairo_ctx(fb->fd, fb, cr);
> >> +}
> >> +
> >> +/* Prepare test data. */
> >> +static void prepare_test(data_t *data, igt_output_t *output, enum 
> >> pipe pipe)
> >> +{
> >> +    igt_display_t *display = &data->display;
> >> +
> >> +    data->pipe_id = pipe;
> >> +    data->pipe = &data->display.pipes[data->pipe_id];
> >> +    igt_assert(data->pipe);
> >> +
> >> +    igt_display_reset(display);
> >> +
> >> +    data->output = output;
> >> +    igt_assert(data->output);
> >> +
> >> +    data->mode = igt_output_get_mode(data->output);
> >> +    igt_assert(data->mode);
> >> +
> >> +    data->primary =
> >> +        igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> >> +
> >> +    data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
> >> +                      INTEL_PIPE_CRC_SOURCE_AUTO);
> >> +
> >> +    igt_output_set_pipe(data->output, data->pipe_id);
> >> +
> >> +    data->w = data->mode->hdisplay;
> >> +    data->h = data->mode->vdisplay;
> >> +}
> >> +
> >> +static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
> >> +{
> >> +    int i;
> >> +
> >> +    for (i = 0; i < display->n_outputs; i++)
> >> +        if (display->outputs[i].pending_pipe == pipe)
> >> +            return false;
> >> +
> >> +    return true;
> >> +}
> >> +
> >> +static void test_bpc_switch_on_output(data_t *data, igt_output_t 
> >> *output,
> >> +                      uint32_t flags)
> >> +{
> >> +    igt_display_t *display = &data->display;
> >> +    igt_crc_t ref_crc, new_crc;
> >> +    enum pipe pipe;
> >> +    igt_fb_t afb;
> >> +    int afb_id;
> >> +
> >> +    for_each_pipe(display, pipe) {
> >> +        if (!igt_pipe_connector_valid(pipe, output))
> >> +            continue;
> >> +        /*
> >> +         * If previous subtest of connector failed, pipe
> >> +         * attached to that connector is not released.
> >> +         * Because of that we have to choose the non
> >> +         * attached pipe for this subtest.
> >> +         */
> >> +        if (!igt_pipe_is_free(display, pipe))
> >> +            continue;
> >> +
> >> +        prepare_test(data, output, pipe);
> >> +
> >> +        /* 10-bit formats are slow, so limit the size. */
> >> +        afb_id = igt_create_fb(data->fd, 512, 512, 
> >> DRM_FORMAT_XRGB2101010, 0, &afb);
> >> +        igt_assert(afb_id);
> >> +
> >> +        draw_hdr_pattern(&afb);
> >> +
> >> +        /* Start in 8bpc. */
> >> +        igt_plane_set_fb(data->primary, &afb);
> >> +        /*
> >> +         * Limiting plane size aswell, since most of gen7 and all of
> >> +         * gen8 doesn't support plane scaling at all.
> >> +         */
> >> +        igt_plane_set_size(data->primary, 512, 512);
> >> +        igt_output_set_prop_value(data->output, 
> >> IGT_CONNECTOR_MAX_BPC, 8);
> >> +        igt_display_commit_atomic(display, 
> >> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> >> +        /*
> >> +         * i915 driver doesn't expose max bpc as debugfs entry,
> >> +         * so limiting assert only for amd driver.
> >> +         */
> >> +        if (is_amdgpu_device(data->fd))
> >> +            assert_output_bpc(data, 8);
> >> +
> >> +        /* Switch to 10bpc. */
> >> +        igt_output_set_prop_value(data->output, 
> >> IGT_CONNECTOR_MAX_BPC, 10);
> >> +        igt_display_commit_atomic(display, 
> >> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> >> +        if (is_amdgpu_device(data->fd))
> >> +            assert_output_bpc(data, 10);
> >> +
> >> +        /* Verify that the CRC are equal after DPMS or suspend. */
> >> +        igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
> >> +        test_cycle_flags(data, flags);
> >> +        igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
> >> +
> >> +        /* Drop back to 8bpc. */
> >> +        igt_output_set_prop_value(data->output, 
> >> IGT_CONNECTOR_MAX_BPC, 8);
> >> +        igt_display_commit_atomic(display, 
> >> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> >> +        if (is_amdgpu_device(data->fd))
> >> +            assert_output_bpc(data, 8);
> >> +
> >> +        /* CRC capture is clamped to 8bpc, so capture should match. */
> >> +        igt_assert_crc_equal(&ref_crc, &new_crc);
> >> +
> >> +        test_fini(data);
> >> +        igt_remove_fb(data->fd, &afb);
> >> +
> >> +        /*
> >> +         * Testing a output with a pipe is enough for HDR
> >> +         * testing. No ROI in testing the connector with other
> >> +         * pipes. So break the loop on pipe.
> >> +         */
> >> +        break;
> >> +    }
> >> +}
> >> +
> >> +/* Returns true if an output supports max bpc property. */
> >> +static bool has_max_bpc(igt_output_t *output)
> >> +{
> >> +    return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> >> +           igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> >> +}
> >> +
> >> +static void test_bpc_switch(data_t *data, uint32_t flags)
> >> +{
> >> +    igt_output_t *output;
> >> +    int valid_tests = 0;
> >> +
> >> +    for_each_connected_output(&data->display, output) {
> >> +        if (!has_max_bpc(output))
> >> +            continue;
> >> +
> >> +        igt_info("BPC switch test execution on %s\n", output->name);
> >> +        test_bpc_switch_on_output(data, output, flags);
> >> +        valid_tests++;
> >> +    }
> >> +
> >> +    igt_require_f(valid_tests, "No connector found with MAX BPC 
> >> connector property\n");
> >> +}
> >> +
> >> +igt_main
> >> +{
> >> +    data_t data = { 0 };
> >> +
> >> +    igt_fixture {
> >> +        data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
> >> +
> >> +        kmstest_set_vt_graphics_mode();
> >> +
> >> +        igt_display_require(&data.display, data.fd);
> >> +        igt_require(data.display.is_atomic);
> >> +
> >> +        igt_display_require_output(&data.display);
> >> +    }
> >> +
> >> +    igt_describe("Tests switching between different display output 
> >> bpc modes");
> >> +    igt_subtest("bpc-switch") test_bpc_switch(&data, TEST_NONE);
> >> +    igt_describe("Tests bpc switch with dpms");
> >> +    igt_subtest("bpc-switch-dpms") test_bpc_switch(&data, TEST_DPMS);
> >> +    igt_describe("Tests bpc switch with suspend");
> >> +    igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, 
> >> TEST_SUSPEND);
> >> +
> >> +    igt_fixture {
> >> +        igt_display_fini(&data.display);
> >> +    }
> >> +}
> >> diff --git a/tests/meson.build b/tests/meson.build
> >> index bc8652aa..6ac2c830 100644
> >> --- a/tests/meson.build
> >> +++ b/tests/meson.build
> >> @@ -38,6 +38,7 @@ test_progs = [
> >>       'kms_frontbuffer_tracking',
> >>       'kms_getfb',
> >>       'kms_hdmi_inject',
> >> +    'kms_hdr',
> >>       'kms_invalid_dotclock',
> >>       'kms_lease',
> >>       'kms_legacy_colorkey',
> >>
> > 

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests
  2020-02-04  9:42 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
@ 2020-02-04  9:42 ` Swati Sharma
  0 siblings, 0 replies; 16+ messages in thread
From: Swati Sharma @ 2020-02-04  9:42 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Add subtests to validate transitions between 8bpc and 10bpc. Test is
made compatible for both amd and intel drivers. The test requires
the "output_bpc" debugfs entry to read current and maximum bpc.
This is exposed by amd driver, however intel driver doesn't expose it,
so made that restriction to assert output bpc only for amd driver.

v2: -Limiting plane size to 512x512 since regression observed in hsw
     because of plane scaling restriction.
    -Minor alignment fix [Uma]
v3: -Small fix
v4: -Plane size back to CRTC size, regression observed in hsw again
     "Plane must cover entire CRTC" because of plane size restriction
     to 512x512. Petri/Ville suggested to use TEST_ONLY in try_commit()
     to probe whether we can use a smaller than fullscreen plane.

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
---
 tests/Makefile.sources |   1 +
 tests/kms_hdr.c        | 298 +++++++++++++++++++++++++++++++++++++++++
 tests/meson.build      |   1 +
 3 files changed, 300 insertions(+)
 create mode 100644 tests/kms_hdr.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 4582f656..98411172 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -54,6 +54,7 @@ TESTS_progs = \
 	kms_frontbuffer_tracking \
 	kms_getfb \
 	kms_hdmi_inject \
+	kms_hdr \
 	kms_invalid_dotclock \
 	kms_lease \
 	kms_legacy_colorkey \
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
new file mode 100644
index 00000000..ce6575c5
--- /dev/null
+++ b/tests/kms_hdr.c
@@ -0,0 +1,298 @@
+/*
+ * Copyright 2019 Advanced Micro Devices, Inc.
+ *
+ * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 <fcntl.h>
+#include <termios.h>
+#include <unistd.h>
+
+IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
+
+/* Test flags. */
+enum {
+	TEST_NONE = 1 << 0,
+	TEST_DPMS = 1 << 1,
+	TEST_SUSPEND = 1 << 2,
+};
+
+/* BPC connector state. */
+typedef struct output_bpc {
+	unsigned int current;
+	unsigned int maximum;
+} output_bpc_t;
+
+/* Common test data. */
+typedef struct data {
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	igt_pipe_crc_t *pipe_crc;
+	drmModeModeInfo *mode;
+	enum pipe pipe_id;
+	int fd;
+	int w;
+	int h;
+} data_t;
+
+/* Common test cleanup. */
+static void test_fini(data_t *data)
+{
+	igt_pipe_crc_free(data->pipe_crc);
+	igt_display_reset(&data->display);
+}
+
+static void test_cycle_flags(data_t *data, uint32_t test_flags)
+{
+	if (test_flags & TEST_DPMS) {
+		kmstest_set_connector_dpms(data->fd,
+					   data->output->config.connector,
+					   DRM_MODE_DPMS_OFF);
+		kmstest_set_connector_dpms(data->fd,
+					   data->output->config.connector,
+					   DRM_MODE_DPMS_ON);
+	}
+
+	if (test_flags & TEST_SUSPEND)
+		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+					      SUSPEND_TEST_NONE);
+}
+
+/* Returns the current and maximum bpc from the connector debugfs. */
+static output_bpc_t get_output_bpc(data_t *data)
+{
+	char buf[256];
+	char *start_loc;
+	int fd, res;
+	output_bpc_t info;
+
+	fd = igt_debugfs_connector_dir(data->fd, data->output->name, O_RDONLY);
+	igt_assert(fd >= 0);
+
+	res = igt_debugfs_simple_read(fd, "output_bpc", buf, sizeof(buf));
+
+	igt_require(res > 0);
+
+	close(fd);
+
+	igt_assert(start_loc = strstr(buf, "Current: "));
+	igt_assert_eq(sscanf(start_loc, "Current: %u", &info.current), 1);
+
+	igt_assert(start_loc = strstr(buf, "Maximum: "));
+	igt_assert_eq(sscanf(start_loc, "Maximum: %u", &info.maximum), 1);
+
+	return info;
+}
+
+/* Verifies that connector has the correct output bpc. */
+static void assert_output_bpc(data_t *data, unsigned int bpc)
+{
+	output_bpc_t info = get_output_bpc(data);
+
+	igt_require_f(info.maximum >= bpc,
+		      "Monitor doesn't support %u bpc, max is %u\n", bpc,
+		      info.maximum);
+
+	igt_assert_eq(info.current, bpc);
+}
+
+/* Fills the FB with a test HDR pattern. */
+static void draw_hdr_pattern(igt_fb_t *fb)
+{
+	cairo_t *cr = igt_get_cairo_ctx(fb->fd, fb);
+
+	igt_paint_color(cr, 0, 0, fb->width, fb->height, 1.0, 1.0, 1.0);
+	igt_paint_test_pattern(cr, fb->width, fb->height);
+
+	igt_put_cairo_ctx(fb->fd, fb, cr);
+}
+
+/* Prepare test data. */
+static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
+{
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = pipe;
+	data->pipe = &data->display.pipes[data->pipe_id];
+	igt_assert(data->pipe);
+
+	igt_display_reset(display);
+
+	data->output = output;
+	igt_assert(data->output);
+
+	data->mode = igt_output_get_mode(data->output);
+	igt_assert(data->mode);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	data->pipe_crc = igt_pipe_crc_new(data->fd, data->pipe_id,
+					  INTEL_PIPE_CRC_SOURCE_AUTO);
+
+	igt_output_set_pipe(data->output, data->pipe_id);
+
+	data->w = data->mode->hdisplay;
+	data->h = data->mode->vdisplay;
+}
+
+static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
+{
+	int i;
+
+	for (i = 0; i < display->n_outputs; i++)
+		if (display->outputs[i].pending_pipe == pipe)
+			return false;
+
+	return true;
+}
+
+static void test_bpc_switch_on_output(data_t *data, igt_output_t *output,
+				      uint32_t flags)
+{
+	igt_display_t *display = &data->display;
+	igt_crc_t ref_crc, new_crc;
+	enum pipe pipe;
+	igt_fb_t afb;
+	int afb_id, ret;
+
+	for_each_pipe(display, pipe) {
+		if (!igt_pipe_connector_valid(pipe, output))
+			continue;
+		/*
+		 * If previous subtest of connector failed, pipe
+		 * attached to that connector is not released.
+		 * Because of that we have to choose the non
+		 * attached pipe for this subtest.
+		 */
+		if (!igt_pipe_is_free(display, pipe))
+			continue;
+
+		prepare_test(data, output, pipe);
+
+		/* 10-bit formats are slow, so limit the size. */
+		afb_id = igt_create_fb(data->fd, 512, 512, DRM_FORMAT_XRGB2101010, 0, &afb);
+		igt_assert(afb_id);
+
+		draw_hdr_pattern(&afb);
+
+		/* Start in 8bpc. */
+		igt_plane_set_fb(data->primary, &afb);
+		igt_plane_set_size(data->primary, data->w, data->h);
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+		if (!ret) {
+			data->w = afb.width;
+			data->h = afb.height;
+		}
+
+		igt_plane_set_fb(data->primary, NULL);
+
+		/*
+		 * i915 driver doesn't expose max bpc as debugfs entry,
+		 * so limiting assert only for amd driver.
+		 */
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* Switch to 10bpc. */
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 10);
+
+		/* Verify that the CRC are equal after DPMS or suspend. */
+		igt_pipe_crc_collect_crc(data->pipe_crc, &ref_crc);
+		test_cycle_flags(data, flags);
+		igt_pipe_crc_collect_crc(data->pipe_crc, &new_crc);
+
+		/* Drop back to 8bpc. */
+		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
+		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (is_amdgpu_device(data->fd))
+			assert_output_bpc(data, 8);
+
+		/* CRC capture is clamped to 8bpc, so capture should match. */
+		igt_assert_crc_equal(&ref_crc, &new_crc);
+
+		test_fini(data);
+		igt_remove_fb(data->fd, &afb);
+
+		/*
+		 * Testing a output with a pipe is enough for HDR
+		 * testing. No ROI in testing the connector with other
+		 * pipes. So break the loop on pipe.
+		 */
+		break;
+	}
+}
+
+/* Returns true if an output supports max bpc property. */
+static bool has_max_bpc(igt_output_t *output)
+{
+	return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
+	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
+}
+
+static void test_bpc_switch(data_t *data, uint32_t flags)
+{
+	igt_output_t *output;
+	int valid_tests = 0;
+
+	for_each_connected_output(&data->display, output) {
+		if (!has_max_bpc(output))
+			continue;
+
+		igt_info("BPC switch test execution on %s\n", output->name);
+		test_bpc_switch_on_output(data, output, flags);
+		valid_tests++;
+	}
+
+	igt_require_f(valid_tests, "No connector found with MAX BPC connector property\n");
+}
+
+igt_main
+{
+	data_t data = { 0 };
+
+	igt_fixture {
+		data.fd = drm_open_driver_master(DRIVER_AMDGPU | DRIVER_INTEL);
+
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.fd);
+		igt_require(data.display.is_atomic);
+
+		igt_display_require_output(&data.display);
+	}
+
+	igt_describe("Tests switching between different display output bpc modes");
+	igt_subtest("bpc-switch") test_bpc_switch(&data, TEST_NONE);
+	igt_describe("Tests bpc switch with dpms");
+	igt_subtest("bpc-switch-dpms") test_bpc_switch(&data, TEST_DPMS);
+	igt_describe("Tests bpc switch with suspend");
+	igt_subtest("bpc-switch-suspend") test_bpc_switch(&data, TEST_SUSPEND);
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index bc8652aa..6ac2c830 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -38,6 +38,7 @@ test_progs = [
 	'kms_frontbuffer_tracking',
 	'kms_getfb',
 	'kms_hdmi_inject',
+	'kms_hdr',
 	'kms_invalid_dotclock',
 	'kms_lease',
 	'kms_legacy_colorkey',
-- 
2.24.1

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

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

end of thread, other threads:[~2020-02-04  9:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 13:55 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
2020-01-29 13:55 ` [igt-dev] [PATCH 1/7] headers: Bump drm uapi headers Swati Sharma
2020-01-29 13:55 ` [igt-dev] [PATCH 2/7] lib/igt_kms: Add max bpc connector property Swati Sharma
2020-01-29 13:55 ` [igt-dev] [PATCH 3/7] lib/igt_kms: Add HDR_OUTPUT_METADATA " Swati Sharma
2020-01-29 13:55 ` [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests Swati Sharma
2020-02-03  8:49   ` Sharma, Swati2
2020-02-03 13:25     ` Kazlauskas, Nicholas
2020-02-03 13:58       ` Ville Syrjälä
2020-01-29 13:55 ` [igt-dev] [PATCH 5/7] tests/kms_hdr: Add function to check HDR panel Swati Sharma
2020-01-29 15:02   ` Shankar, Uma
2020-01-29 13:55 ` [igt-dev] [PATCH 6/7] tests/kms_hdr: Add static toggle SDR->HDR mode subtests Swati Sharma
2020-01-29 13:55 ` [igt-dev] [PATCH 7/7] tests/kms_hdr: Add subtest to swap static HDR metadata Swati Sharma
2020-01-29 14:16   ` Shankar, Uma
2020-01-29 17:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Add tests for HDR metadata interfaces and bpc switch (rev4) Patchwork
2020-02-01  2:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-02-04  9:42 [igt-dev] [PATCH 0/7] Add tests for HDR metadata interfaces and bpc switch Swati Sharma
2020-02-04  9:42 ` [igt-dev] [PATCH 4/7] tests/kms_hdr: Add bpc switch subtests Swati Sharma

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.