summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2020-09-30 13:31:49 -0400
committerLyude Paul <lyude@redhat.com>2020-09-30 15:02:37 -0400
commit0229dfe4610102324edf91c2ffe7faa8af31c540 (patch)
tree75db346f9a8fd9cb7bb5ddf2f8d03500031fb50a
parent30032a72d441651b36cf73b751fed9b2e3165e8f (diff)
lib/igt_kms: Hook up connector dithering prop
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. Reviewed-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
-rw-r--r--lib/igt_kms.c5
-rw-r--r--lib/igt_kms.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4023811ae..7946555de 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -425,6 +425,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_WRITEBACK_PIXEL_FORMATS] = "WRITEBACK_PIXEL_FORMATS",
[IGT_CONNECTOR_WRITEBACK_FB_ID] = "WRITEBACK_FB_ID",
[IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR] = "WRITEBACK_OUT_FENCE_PTR",
+ [IGT_CONNECTOR_DITHERING_MODE] = "dithering mode",
};
/*
@@ -1825,6 +1826,9 @@ static void igt_output_reset(igt_output_t *output)
igt_output_clear_prop_changed(output, IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR);
output->writeback_out_fence_fd = -1;
}
+ if (igt_output_has_prop(output, IGT_CONNECTOR_DITHERING_MODE))
+ igt_output_set_prop_enum(output, IGT_CONNECTOR_DITHERING_MODE,
+ "off");
}
@@ -1840,6 +1844,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 f41eadaf4..6ad1a7ef8 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -132,6 +132,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_WRITEBACK_PIXEL_FORMATS,
IGT_CONNECTOR_WRITEBACK_FB_ID,
IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR,
+ IGT_CONNECTOR_DITHERING_MODE,
IGT_NUM_CONNECTOR_PROPS
};