[PATCH i-g-t 3/5] tests/intel/kms_dsc_helper: Add helper to force compressed BPP
Swati Sharma
swati2.sharma at intel.com
Wed May 21 07:28:34 UTC 2025
Helper function is added to force compressed BPP.
Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
tests/intel/kms_dsc_helper.c | 10 ++++++++++
tests/intel/kms_dsc_helper.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
index cea4304e4..5bf1c6faa 100644
--- a/tests/intel/kms_dsc_helper.c
+++ b/tests/intel/kms_dsc_helper.c
@@ -29,6 +29,16 @@ void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
igt_assert_f(ret == 0, "forcing input dsc bpc debugfs_write failed\n");
}
+void force_dsc_enable_compressed_bpp(int drmfd, igt_output_t *output, float compressed_bpp)
+{
+ int ret;
+
+ igt_debug("Forcing compressed DSC BPP to %.2f on %s\n",
+ compressed_bpp, output->name);
+ ret = igt_force_dsc_enable_compressed_bpp(drmfd, output->name, compressed_bpp);
+ igt_assert_f(ret == 0, "forcing compressed dsc bpp debugfs_write failed\n");
+}
+
void save_force_dsc_en(int drmfd, igt_output_t *output)
{
force_dsc_en_orig =
diff --git a/tests/intel/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
index 4dbd88fe7..9479deb5f 100644
--- a/tests/intel/kms_dsc_helper.h
+++ b/tests/intel/kms_dsc_helper.h
@@ -23,6 +23,7 @@
void force_dsc_enable(int drmfd, igt_output_t *output);
void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc);
+void force_dsc_enable_compressed_bpp(int drmfd, igt_output_t *output, float compressed_bpp);
void save_force_dsc_en(int drmfd, igt_output_t *output);
void restore_force_dsc_en(void);
void kms_dsc_exit_handler(int sig);
--
2.25.1
More information about the igt-dev
mailing list