dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [V2 0/3] Expose max and current bpc via debugfs
@ 2022-04-11  9:51 Bhanuprakash Modem
  2022-04-11  9:51 ` [V2 1/3] drm/debug: Expose connector's max supported " Bhanuprakash Modem
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Bhanuprakash Modem @ 2022-04-11  9:51 UTC (permalink / raw)
  To: intel-gfx, dri-devel, amd-gfx, jani.nikula, ville.syrjala,
	harry.wentland, swati2.sharma
  Cc: Bhanuprakash Modem

This series will expose the Connector's max supported bpc via connector
debugfs and Crtc's current bpc via crtc debugfs. Also move the existing
vendor specific "output_bpc" logic to drm.

Test-with: 20220411094147.1650859-2-bhanuprakash.modem@intel.com

Bhanuprakash Modem (3):
  drm/debug: Expose connector's max supported bpc via debugfs
  drm/i915/display/debug: Expose crtc current bpc via debugfs
  drm/amd/display: Move connector debugfs to drm

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  4 --
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 38 +++++++------------
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.h |  2 -
 drivers/gpu/drm/drm_debugfs.c                 | 21 ++++++++++
 .../drm/i915/display/intel_display_debugfs.c  | 28 ++++++++++++++
 5 files changed, 62 insertions(+), 31 deletions(-)

--
2.35.1


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 1/3] drm/debug: Expose connector's max supported bpc via debugfs
@ 2022-04-08  6:53 Bhanuprakash Modem
  2022-04-11  3:57 ` [V2 " Bhanuprakash Modem
  0 siblings, 1 reply; 23+ messages in thread
From: Bhanuprakash Modem @ 2022-04-08  6:53 UTC (permalink / raw)
  To: intel-gfx, dri-devel, amd-gfx, jani.nikula, ville.syrjala,
	harry.wentland, swati2.sharma
  Cc: Bhanuprakash Modem

It's useful to know the connector's max supported bpc for IGT
testing. Expose it via a debugfs file on the connector "output_bpc".

Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 drivers/gpu/drm/drm_debugfs.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 7f1b82dbaebb..33e5345c6f3e 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -395,6 +395,23 @@ static int vrr_range_show(struct seq_file *m, void *data)
 }
 DEFINE_SHOW_ATTRIBUTE(vrr_range);
 
+/*
+ * Returns Connector's max supported bpc through debugfs file.
+ * Example usage: cat /sys/kernel/debug/dri/0/DP-1/max_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,
@@ -437,6 +454,10 @@ void drm_debugfs_connector_add(struct drm_connector *connector)
 	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);
 }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-05-18 14:08 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  9:51 [V2 0/3] Expose max and current bpc via debugfs Bhanuprakash Modem
2022-04-11  9:51 ` [V2 1/3] drm/debug: Expose connector's max supported " Bhanuprakash Modem
2022-04-12  3:07   ` [Intel-gfx] " Murthy, Arun R
2022-04-12  4:03     ` Modem, Bhanuprakash
2022-04-29 14:27   ` Murthy, Arun R
2022-05-02 11:49     ` Jani Nikula
2022-05-02 18:51   ` Harry Wentland
2022-04-11  9:51 ` [V2 2/3] drm/i915/display/debug: Expose crtc current " Bhanuprakash Modem
2022-04-12  3:10   ` [Intel-gfx] " Murthy, Arun R
2022-05-16  8:39     ` Jani Nikula
2022-04-11  9:51 ` [V2 3/3] drm/amd/display: Move connector debugfs to drm Bhanuprakash Modem
2022-04-29 14:32   ` [Intel-gfx] " Murthy, Arun R
2022-05-02 13:28     ` Modem, Bhanuprakash
2022-05-02 13:38       ` Harry Wentland
2022-05-02 14:27         ` Modem, Bhanuprakash
2022-05-02 14:29           ` Harry Wentland
2022-05-02 18:54             ` Harry Wentland
2022-05-16  8:39               ` Jani Nikula
2022-05-18  5:38                 ` Modem, Bhanuprakash
2022-05-18 14:08                   ` Harry Wentland
2022-05-02 18:51   ` Harry Wentland
2022-05-10 11:18 ` [V2 0/3] Expose max and current bpc via debugfs Modem, Bhanuprakash
  -- strict thread matches above, loose matches on Subject: below --
2022-04-08  6:53 [PATCH 1/3] drm/debug: Expose connector's max supported " Bhanuprakash Modem
2022-04-11  3:57 ` [V2 " Bhanuprakash Modem

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).