All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs
@ 2020-07-20 19:40 Bhanuprakash Modem
  2020-07-20 19:40 ` [Intel-gfx] [PATCH 1/2] i915/debug: Expose crtc dither state " Bhanuprakash Modem
  2020-07-20 19:40 ` [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info " Bhanuprakash Modem
  0 siblings, 2 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-20 19:40 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[why]
It's useful to know the max supported panel BPC and PIPE dither state
for IGT testing.

[how]
* Expose the connector max supported BPC for the panel via a debugfs file on the
  connector, "output_bpc".
  Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

* Expose the dithering state for the crtc via a debugfs file "dither".
  Example: cat /sys/kernel/debug/dri/0/crtc-0/dither

Test-with: 20200720165011.23918-1-bhanuprakash.modem@intel.com 

Bhanuprakash Modem (2):
  i915/debug: Expose crtc dither state via debugfs
  i915/debug: Expose Max BPC info via debugfs

 .../drm/i915/display/intel_display_debugfs.c    | 17 +++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c             | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

-- 
2.20.1

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

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

* [Intel-gfx] [PATCH 1/2] i915/debug: Expose crtc dither state via debugfs
  2020-07-20 19:40 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs Bhanuprakash Modem
@ 2020-07-20 19:40 ` Bhanuprakash Modem
  2020-07-20 19:40 ` [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info " Bhanuprakash Modem
  1 sibling, 0 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-20 19:40 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[Why]
It's useful to know the dithering state for IGT testing.

[How]
Expose the dithering state for the crtc via a debugfs file "dither".

Example usage: cat /sys/kernel/debug/dri/0/crtc-0/dither

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 94ed442910d6..18646566f2ea 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1902,13 +1902,30 @@ static const struct i915_debugfs_files {
 #endif
 };
 
+static int dither_state_show(struct seq_file *m, void *data)
+{
+	struct intel_crtc *crtc = to_intel_crtc(m->private);
+	struct intel_crtc_state *crtc_state = to_intel_crtc_state(crtc->base.state);
+
+	seq_printf(m, "Dither: %u\n", crtc_state->dither);
+
+	return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(dither_state);
+
 void i915_debugfs_register(struct drm_i915_private *dev_priv)
 {
 	struct drm_minor *minor = dev_priv->drm.primary;
+	struct drm_device *dev = &dev_priv->drm;
+	struct drm_crtc *crtc;
 	int i;
 
 	i915_debugfs_params(dev_priv);
 
+	drm_for_each_crtc(crtc, dev)
+		debugfs_create_file("dither", S_IRUGO, crtc->debugfs_entry, crtc,
+				&dither_state_fops);
+
 	debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
 			    to_i915(minor->dev), &i915_forcewake_fops);
 	for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
-- 
2.20.1

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

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

* [Intel-gfx] [PATCH 2/2] i915/debug: Expose Max BPC info via debugfs
  2020-07-20 19:40 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs Bhanuprakash Modem
  2020-07-20 19:40 ` [Intel-gfx] [PATCH 1/2] i915/debug: Expose crtc dither state " Bhanuprakash Modem
@ 2020-07-20 19:40 ` Bhanuprakash Modem
  1 sibling, 0 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-20 19:40 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[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(+)

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

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

* [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs
@ 2020-07-30 18:49 Bhanuprakash Modem
  0 siblings, 0 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-30 18:49 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[why]
It's useful to know the max supported panel BPC and PIPE dither state
for IGT testing.

[how]
* Expose the connector max supported BPC for the panel via a debugfs file on the
  connector, "output_bpc".
  Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

* Expose the dithering state for the crtc via a debugfs file "dither".
  Example: cat /sys/kernel/debug/dri/0/crtc-0/dither

Test-with: 20200729184152.9236-1-bhanuprakash.modem@intel.com

Bhanuprakash Modem (2):
  i915/debug: Expose crtc dither state via debugfs
  i915/debug: Expose Max BPC info via debugfs

 .../drm/i915/display/intel_display_debugfs.c    | 17 +++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c             | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

-- 
2.20.1

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

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

* [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs
@ 2020-07-26 13:03 Bhanuprakash Modem
  0 siblings, 0 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-26 13:03 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[why]
It's useful to know the max supported panel BPC and PIPE dither state
for IGT testing.

[how]
* Expose the connector max supported BPC for the panel via a debugfs file on the
  connector, "output_bpc".
  Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

* Expose the dithering state for the crtc via a debugfs file "dither".
  Example: cat /sys/kernel/debug/dri/0/crtc-0/dither

Test-with: 20200726122944.9864-1-bhanuprakash.modem@intel.com

Bhanuprakash Modem (2):
  i915/debug: Expose crtc dither state via debugfs
  i915/debug: Expose Max BPC info via debugfs

 .../drm/i915/display/intel_display_debugfs.c    | 17 +++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c             | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

-- 
2.20.1

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

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

* [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs
@ 2020-07-20 19:41 Bhanuprakash Modem
  0 siblings, 0 replies; 6+ messages in thread
From: Bhanuprakash Modem @ 2020-07-20 19:41 UTC (permalink / raw)
  To: bhanuprakash.modem, intel-gfx

[why]
It's useful to know the max supported panel BPC and PIPE dither state
for IGT testing.

[how]
* Expose the connector max supported BPC for the panel via a debugfs file on the
  connector, "output_bpc".
  Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc

* Expose the dithering state for the crtc via a debugfs file "dither".
  Example: cat /sys/kernel/debug/dri/0/crtc-0/dither

Test-with: 20200720165011.23918-1-bhanuprakash.modem@intel.com 

Bhanuprakash Modem (2):
  i915/debug: Expose crtc dither state via debugfs
  i915/debug: Expose Max BPC info via debugfs

 .../drm/i915/display/intel_display_debugfs.c    | 17 +++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c             | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

-- 
2.20.1

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

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

end of thread, other threads:[~2020-07-30 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 19:40 [Intel-gfx] [PATCH 0/2] Expose crtc dither state and connector max bpc via debugfs Bhanuprakash Modem
2020-07-20 19:40 ` [Intel-gfx] [PATCH 1/2] i915/debug: Expose crtc dither state " Bhanuprakash Modem
2020-07-20 19:40 ` [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-26 13:03 Bhanuprakash Modem
2020-07-30 18:49 Bhanuprakash Modem

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.