public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lyude <lyude@redhat.com>
To: igt-dev@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] lib/igt_kms: Hook up connector dithering prop
Date: Tue, 17 Mar 2020 21:00:46 -0400	[thread overview]
Message-ID: <20200318010047.237024-4-lyude@redhat.com> (raw)
In-Reply-To: <20200318010047.237024-1-lyude@redhat.com>

From: Lyude Paul <lyude@redhat.com>

Nvidia display hardware provides a set of flexible dithering options for
CRTCs. This dithering is actually noticeable in the CRC output for all
available tap points, and can be seen as CRC values for identical frames
cycling between either 2 or 4 values repeatedly (each one of these
values is a different dithering phase applied to the source output). Of
course, this is very likely to break tests using CRC readback since we
don't expect the CRC to change if the source content hasn't changed.

So, hook up support for configuring the dithering property and reset it
to off from igt_display_reset() when applicable.

Signed-off-by: Lyude Paul <lyude@redhat.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 54de45e5..2bbb363e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -418,6 +418,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	[IGT_CONNECTOR_LINK_STATUS] = "link-status",
 	[IGT_CONNECTOR_MAX_BPC] = "max bpc",
 	[IGT_CONNECTOR_HDR_OUTPUT_METADATA] = "HDR_OUTPUT_METADATA",
+	[IGT_CONNECTOR_DITHERING_MODE] = "dithering mode",
 };
 
 /*
@@ -1799,6 +1800,10 @@ static void igt_output_reset(igt_output_t *output)
 	if (igt_output_has_prop(output, IGT_CONNECTOR_HDR_OUTPUT_METADATA))
 		igt_output_set_prop_value(output,
 					  IGT_CONNECTOR_HDR_OUTPUT_METADATA, 0);
+
+	if (igt_output_has_prop(output, IGT_CONNECTOR_DITHERING_MODE))
+		igt_output_set_prop_enum(output, IGT_CONNECTOR_DITHERING_MODE,
+					 "off");
 }
 
 /**
@@ -1813,6 +1818,7 @@ static void igt_output_reset(igt_output_t *output)
  * - %IGT_CONNECTOR_BROADCAST_RGB (if applicable)
  *   %IGT_CONNECTOR_CONTENT_PROTECTION (if applicable)
  *   %IGT_CONNECTOR_HDR_OUTPUT_METADATA (if applicable)
+ * - %IGT_CONNECTOR_DITHERING_MODE (if applicable)
  * - igt_output_override_mode() to default.
  *
  * For pipes:
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index cd3fdbc0..998ed241 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -127,6 +127,7 @@ enum igt_atomic_connector_properties {
        IGT_CONNECTOR_LINK_STATUS,
        IGT_CONNECTOR_MAX_BPC,
        IGT_CONNECTOR_HDR_OUTPUT_METADATA,
+       IGT_CONNECTOR_DITHERING_MODE,
        IGT_NUM_CONNECTOR_PROPS
 };
 
-- 
2.24.1

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

  parent reply	other threads:[~2020-03-18  1:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  1:00 [igt-dev] [PATCH i-g-t 0/4] Add nouveau-crc tests Lyude
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 1/4] lib/igt_core: Add igt_require_fd() Lyude
2020-03-18  8:12   ` Petri Latvala
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_debugfs: Add igt_debugfs_pipe_dir() Lyude
2020-03-18  1:00 ` Lyude [this message]
2020-03-18  1:00 ` [igt-dev] [PATCH i-g-t 4/4] tests: Add nouveau-crc tests Lyude
2020-03-18  8:19   ` Petri Latvala
2020-03-18  1:47 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2020-03-18  2:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-03-18  8:32 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318010047.237024-4-lyude@redhat.com \
    --to=lyude@redhat.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox