Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] lib/dsc: Add helpers to disable force dsc
@ 2025-08-11  7:58 Chaitanya Kumar Borah
  2025-08-11  7:58 ` [PATCH i-g-t 2/3] tests/kms_hdr: Set HDR meta-data while testing for panel capability Chaitanya Kumar Borah
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Chaitanya Kumar Borah @ 2025-08-11  7:58 UTC (permalink / raw)
  To: igt-dev; +Cc: chaitanya.kumar.borah, karthik.b.s, swati2.sharma

Add helpers to disable "force dsc" and verify that it is disabled

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
 lib/igt_dsc.c | 25 +++++++++++++++++++++++++
 lib/igt_dsc.h |  2 ++
 2 files changed, 27 insertions(+)

diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
index 4caad39db..3754eef07 100644
--- a/lib/igt_dsc.c
+++ b/lib/igt_dsc.c
@@ -124,6 +124,31 @@ int igt_force_dsc_enable(int drmfd, char *connector_name)
 	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_fec_support", "1");
 }
 
+/**
+ * igt_is_force_dsc_disabled:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC is force enable is disabled (via debugfs) for the given connector,
+ * false otherwise.
+ */
+bool igt_is_force_dsc_disabled(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "Force_DSC_Enable: no");
+}
+
+/**
+ * igt_force_dsc_disable:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: 0 on success or negative error code, in case of failure.
+ */
+int igt_force_dsc_disable(int drmfd, char *connector_name)
+{
+	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_fec_support", "0");
+}
+
 /**
  * igt_force_dsc_enable_bpc:
  * @drmfd: A drm file descriptor
diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
index 3cf2d4e76..f63345848 100644
--- a/lib/igt_dsc.h
+++ b/lib/igt_dsc.h
@@ -17,6 +17,8 @@ bool igt_is_dsc_enabled(int drmfd, char *connector_name);
 bool igt_is_force_dsc_enabled(int drmfd, char *connector_name);
 int igt_force_dsc_enable(int drmfd, char *connector_name);
 int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc);
+int igt_force_dsc_disable(int drmfd, char *connector_name);
+bool igt_is_force_dsc_disabled(int drmfd, char *connector_name);
 int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
 bool igt_is_dsc_output_format_supported_by_sink(int drmfd, char *connector_name,
 						enum dsc_output_format output_format);
-- 
2.25.1


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

end of thread, other threads:[~2025-08-21  9:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11  7:58 [PATCH i-g-t 1/3] lib/dsc: Add helpers to disable force dsc Chaitanya Kumar Borah
2025-08-11  7:58 ` [PATCH i-g-t 2/3] tests/kms_hdr: Set HDR meta-data while testing for panel capability Chaitanya Kumar Borah
2025-08-12  9:11   ` Sharma, Swati2
2025-08-21  9:48     ` Borah, Chaitanya Kumar
2025-08-11  7:58 ` [PATCH i-g-t 3/3] tests/kms_hdr: Handle HDR panels requiring DSC Chaitanya Kumar Borah
2025-08-14  8:16   ` Sharma, Swati2
2025-08-21  9:51     ` Borah, Chaitanya Kumar
2025-08-11 11:01 ` ✗ i915.CI.BAT: failure for series starting with [i-g-t,1/3] lib/dsc: Add helpers to disable force dsc Patchwork
2025-08-11 11:20 ` ✓ Xe.CI.BAT: success " Patchwork
2025-08-11 12:55 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-12  6:02 ` [PATCH i-g-t 1/3] " Sharma, Swati2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox