igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 i-g-t 1/3] lib/dsc: Add helpers to disable force dsc
@ 2025-08-28  9:39 Chaitanya Kumar Borah
  2025-08-28  9:39 ` [PATCH v3 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; 9+ messages in thread
From: Chaitanya Kumar Borah @ 2025-08-28  9:39 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>
Reviewed-by: Swati Sharma <swati2.sharma@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] 9+ messages in thread

end of thread, other threads:[~2025-09-02  5:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28  9:39 [PATCH v3 i-g-t 1/3] lib/dsc: Add helpers to disable force dsc Chaitanya Kumar Borah
2025-08-28  9:39 ` [PATCH v3 i-g-t 2/3] tests/kms_hdr: Set HDR meta-data while testing for panel capability Chaitanya Kumar Borah
2025-08-28 19:18   ` Sharma, Swati2
2025-08-28  9:39 ` [PATCH v3 i-g-t 3/3] tests/kms_hdr: Handle HDR panels requiring DSC Chaitanya Kumar Borah
2025-09-02  5:44   ` Sharma, Swati2
2025-08-28 20:14 ` ✓ i915.CI.BAT: success for series starting with [v3,i-g-t,1/3] lib/dsc: Add helpers to disable force dsc Patchwork
2025-08-28 20:29 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-29  4:00 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-29  4:05 ` ✗ i915.CI.Full: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).