@@ -2185,6 +2185,20 @@ static const struct file_operations i915_dsc_fec_support_fops = {
.write = i915_dsc_fec_support_write
};
+/*
+ * Returns the maximum output bpc for the connector.
+ * Example usage: cat /sys/kernel/debug/dri/0/DP-1/output_bpc
+ */
+static int output_bpc_show(struct seq_file *m, void *data)
+{
+ struct drm_connector *connector = m->private;
+
+ seq_printf(m, "Maximum: %u\n", connector->display_info.bpc);
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(output_bpc);
+
/**
* intel_connector_debugfs_add - add i915 specific connector debugfs files
* @connector: pointer to a registered drm_connector
@@ -2235,5 +2249,8 @@ int intel_connector_debugfs_add(struct drm_connector *connector)
debugfs_create_file("i915_lpsp_capability", 0444, root,
connector, &i915_lpsp_capability_fops);
+ debugfs_create_file("output_bpc", S_IRUGO, root,
+ connector, &output_bpc_fops);
+
return 0;
}
[Why] It's useful to know the max supported panel BPC for IGT testing. [How] Expose the max supported BPC for the panel via a debugfs file on the connector, "output_bpc". Example usage: cat /sys/kernel/debug/dri/0/DP-1/output_bpc Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> --- .../drm/i915/display/intel_display_debugfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)