drm/i915: Don't display nonsensical values in i915_ddb_info on gen < 9
authorDamien Lespiau <damien.lespiau@intel.com>
Wed, 3 Dec 2014 17:33:24 +0000 (17:33 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 4 Dec 2014 11:01:14 +0000 (12:01 +0100)
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.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c

index 6c169392f701095515c5ab6f5263a1050a9de853..d0e445eca9ce5fbee6a4b18fd903ca302b541730 100644 (file)
@@ -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;