Skip to contentSkip to conversation

drm/i915: Don't display nonsensical values in i915_ddb_info on gen < 9

PATCH Applied Damien Lespiau 4 participants 4 messages Dec 3, 2014 – Dec 4, 2014

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

PATCH 1/1 drm/i915: Don't display nonsensical values in i915_ddb_info on gen < 9

When playing around with debugfs and a HSW machine I noticed that we were displaying some garbled value in i915_ddb_info. This debugfs file is only meaningful for gen9+, so don't display anything on earlier platforms.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +3 -0
index 6c16939..d0e445e 100644
@@ -2743,6 +2743,9 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
 	enum pipe pipe;
 	int plane;
 
+	if (INTEL_INFO(dev)->gen < 9)
+		return 0;
+
 	drm_modeset_lock_all(dev);
 
 	ddb = &dev_priv->wm.skl_hw.ddb;
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Damien Lespiau

When playing around with debugfs and a HSW machine I noticed that we were displaying some garbled value in i915_ddb_info. This debugfs file is only meaningful for gen9+, so don't display anything on earlier platforms.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
index 6c16939..d0e445e 100644

drivers/gpu/drm/i915/i915_debugfs.c static int i915_ddb_info(struct seq_file *m, void *unused) · line 2747

Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +2 -0
@@ -2743,6 +2743,9 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
 	enum pipe pipe;
 	int plane;
 
+	if (INTEL_INFO(dev)->gen < 9)
+		return 0;

-ENODEV or somesuch? But I guess we're not too consistent how we deal with such things, so seems OK as is too:

Quoted 11 lines
drivers/gpu/drm/i915/i915_debugfs.c +1 -0
+
 	drm_modeset_lock_all(dev);
 
 	ddb = &dev_priv->wm.skl_hw.ddb;
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 19 lines · Ville Syrjälä
Quoted 18 lines · Damien Lespiau

When playing around with debugfs and a HSW machine I noticed that we were displaying some garbled value in i915_ddb_info. This debugfs file is only meaningful for gen9+, so don't display anything on earlier platforms.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
index 6c16939..d0e445e 100644
@@ -2743,6 +2743,9 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
 	enum pipe pipe;
 	int plane;
 
Quoted 7 lines

drivers/gpu/drm/i915/i915_debugfs.c static int i915_ddb_info(struct seq_file *m, void *unused) · line 2747

Quoted 2 lines
drivers/gpu/drm/i915/i915_debugfs.c +2 -0
+	if (INTEL_INFO(dev)->gen < 9)
+		return 0;

-ENODEV or somesuch? But I guess we're not too consistent how we deal with such things, so seems OK as is too:

Queued for -next, thanks for the patch.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#3 lore raw
In reply to Damien Lespiau

-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 364/364 364/364
ILK +1 365/366 366/366

SNB                                  450/450              450/450
IVB                                  498/498              498/498
BYT                                  289/289              289/289
HSW                                  564/564              564/564
BDW                                  417/417              417/417

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
ILK igt_kms_flip_wf_vblank-ts-check DMESG_WARN(2, M26)PASS(15, M26M37) PASS(1, M37)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx