From: Damien Lespiau Date: Wed, 3 Dec 2014 17:33:24 +0000 (+0000) Subject: drm/i915: Don't display nonsensical values in i915_ddb_info on gen < 9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fcffe195ed3329082ce22f2118543871bfbbcf0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: Damien Lespiau Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 6c169392f701..d0e445eca9ce 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -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;