All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: bhanuprakash.modem@intel.com, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info via debugfs
Date: Sun, 26 Jul 2020 18:34:00 +0530	[thread overview]
Message-ID: <20200726130400.10160-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20200726130400.10160-1-bhanuprakash.modem@intel.com>

[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

Cc: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 .../drm/i915/display/intel_display_debugfs.c    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 3644752cc5ec..0877d029af77 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -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;
 }
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-07-26  5:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26 13:03 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs Bhanuprakash Modem
2020-07-26  5:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Expose crtc dither state and connector max bpc via debugfs (rev3) Patchwork
2020-07-26  5:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-07-26  5:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-07-26  6:56 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-26 13:03 ` [Intel-gfx] [PATCH 1/2] i915/debug: Expose crtc dither state via debugfs Bhanuprakash Modem
2020-07-26 13:04 ` Bhanuprakash Modem [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-30 18:49 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc " Bhanuprakash Modem
2020-07-30 18:49 ` [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info " Bhanuprakash Modem
2020-07-20 19:41 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc " Bhanuprakash Modem
2020-07-20 19:41 ` [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info " Bhanuprakash Modem
2020-07-20 19:40 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc " Bhanuprakash Modem
2020-07-20 19:40 ` [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info " Bhanuprakash Modem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200726130400.10160-3-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.