Skip to contentSkip to conversation

drm/i915/debugfs: Add panel delays for eDP

PATCH In review David Weinehall 3 participants 4 messages Aug 23, 2016 – Aug 26, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/debugfs: Add panel delays for eDP

The eDP backlight and panel enable/disable delays are quite useful to know when measuring time consumed by suspend/resume, and while the information is printed to the kernel log as debug messages, having this information in debugfs makes things easier.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 42 +++++++++++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +40 -2
index 7d7b4d9280e9..d89359a50742 100644
@@ -5474,6 +5474,40 @@ static const struct file_operations i915_dpcd_fops = {
 	.release = single_release,
 };
 
+static int i915_panel_show(struct seq_file *m, void *data)
+{
+	struct drm_connector *connector = m->private;
+	struct intel_dp *intel_dp =
+		enc_to_intel_dp(&intel_attached_encoder(connector)->base);
+
+	if (connector->status != connector_status_connected)
+		return -ENODEV;
+
+	seq_printf(m, "Panel power up delay: %d\n",
+		   intel_dp->panel_power_up_delay);
+	seq_printf(m, "Panel power down delay: %d\n",
+		   intel_dp->panel_power_down_delay);
+	seq_printf(m, "Backlight on delay: %d\n",
+		   intel_dp->backlight_on_delay);
+	seq_printf(m, "Backlight off delay: %d\n",
+		   intel_dp->backlight_off_delay);
+
+	return 0;
+}
+
+static int i915_panel_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_panel_show, inode->i_private);
+}
+
+static const struct file_operations i915_panel_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_panel_open,
+	.read = seq_read,
+	.llseek = seq_lseek,
+	.release = single_release,
+};
+
 /**
  * i915_debugfs_connector_add - add i915 specific connector debugfs files
  * @connector: pointer to a registered drm_connector
@@ -5493,8 +5527,12 @@ int i915_debugfs_connector_add(struct drm_connector *connector)
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
 	    connector->connector_type == DRM_MODE_CONNECTOR_eDP)
-		debugfs_create_file("i915_dpcd", S_IRUGO, root, connector,
-				    &i915_dpcd_fops);
+		debugfs_create_file("i915_dpcd", S_IRUGO, root,
+				    connector, &i915_dpcd_fops);
+
+	if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
+		debugfs_create_file("i915_panel_timings", S_IRUGO, root,
+				    connector, &i915_panel_fops);
 
 	return 0;
 }
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · David Weinehall

The eDP backlight and panel enable/disable delays are quite useful to know when measuring time consumed by suspend/resume, and while the information is printed to the kernel log as debug messages, having this information in debugfs makes things easier.

Looks reasonable and useful, and surprisingly not available yet.

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: failure for drm/i915/debugfs: Add panel delays for eDP

In reply to David Weinehall
== Series Details ==

== Series Details ==

Series: drm/i915/debugfs: Add panel delays for eDP
URL : https://patchwork.freedesktop.org/series/11472/
State : failure

== Summary ==

Series 11472v1 drm/i915/debugfs: Add panel delays for eDP
http://patchwork.freedesktop.org/api/1.0/series/11472/revisions/1/mbox/

Test drv_module_reload_basic:

                skip       -> PASS       (fi-skl-6260u)
Test kms_cursor_legacy:
        Subgroup basic-cursor-vs-flip-varying-size:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-flip-vs-cursor-legacy:
                fail       -> PASS       (fi-bsw-n3050)
                fail       -> PASS       (fi-skl-6700k)
        Subgroup basic-flip-vs-cursor-varying-size:
                fail       -> PASS       (fi-byt-n2820)
Test prime_busy:
        Subgroup basic-after-default:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-before-default:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-wait-after-default:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-wait-before-default:
                pass       -> FAIL       (fi-bsw-n3050)
Test prime_vgem:
        Subgroup basic-busy-default:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-fence-flip:
                pass       -> DMESG-WARN (fi-hsw-4770k)
        Subgroup basic-gtt:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-sync-default:
                pass       -> FAIL       (fi-bsw-n3050)
        Subgroup basic-wait-default:
                pass       -> FAIL       (fi-bsw-n3050)
fi-bdw-5557u     total:249  pass:232  dwarn:0   dfail:0   fail:1   skip:16 
fi-bsw-n3050     total:249  pass:195  dwarn:0   dfail:0   fail:10  skip:44 
fi-byt-n2820     total:249  pass:205  dwarn:0   dfail:0   fail:3   skip:41 
fi-hsw-4770k     total:249  pass:219  dwarn:7   dfail:0   fail:1   skip:22 
fi-hsw-4770r     total:249  pass:222  dwarn:0   dfail:0   fail:1   skip:26 
fi-ivb-3520m     total:249  pass:217  dwarn:0   dfail:0   fail:1   skip:31 
fi-skl-6260u     total:249  pass:234  dwarn:0   dfail:0   fail:1   skip:14 
fi-skl-6700k     total:249  pass:215  dwarn:4   dfail:0   fail:2   skip:28 
fi-snb-2520m     total:249  pass:201  dwarn:4   dfail:0   fail:2   skip:42 
fi-snb-2600      total:249  pass:202  dwarn:4   dfail:0   fail:1   skip:42 

Results at /archive/results/CI_IGT_test/Patchwork_2407/

a0744f39d2948f39be393f4d065c2f383e277ee2 drm-intel-nightly: 2016y-08m-23d-15h-35m-47s UTC integration manifest 92229cc drm/i915/debugfs: Add panel delays for eDP

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to David Weinehall
Quoted 6 lines · David Weinehall

The eDP backlight and panel enable/disable delays are quite useful to know when measuring time consumed by suspend/resume, and while the information is printed to the kernel log as debug messages, having this information in debugfs makes things easier.

Pushed, thanks.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx