}
DEFINE_SHOW_ATTRIBUTE(vrr_range);
+/*
+ * Returns Connector's max supported bpc through debugfs file.
+ * 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;
+
+ if (connector->status != connector_status_connected)
+ return -ENODEV;
+
+ seq_printf(m, "Maximum: %u\n", connector->display_info.bpc);
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(output_bpc);
+
static const struct file_operations drm_edid_fops = {
.owner = THIS_MODULE,
.open = edid_open,
debugfs_create_file("vrr_range", S_IRUGO, root, connector,
&vrr_range_fops);
+ /* max bpc */
+ debugfs_create_file("output_bpc", 0444, root, connector,
+ &output_bpc_fops);
+
if (connector->funcs->debugfs_init)
connector->funcs->debugfs_init(connector, root);
}