drm/i915: Waterproof verification of gen9 forcewake table ranges
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 17 Nov 2016 13:13:55 +0000 (13:13 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 17 Nov 2016 15:37:44 +0000 (15:37 +0000)
We have to make sure there are no holes in the table in Gen9.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1479388435-12062-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/intel_uncore.c

index 868a195954a86eaae51c05822257a2ad67045c09..d7be0d94ba4d1786443230d19b01b6df1fcc3cde 100644 (file)
@@ -647,6 +647,8 @@ intel_fw_table_check(struct drm_i915_private *dev_priv)
        num_ranges = dev_priv->uncore.fw_domains_table_entries;
 
        for (i = 0, prev = -1; i < num_ranges; i++, ranges++) {
+               WARN_ON_ONCE(IS_GEN9(dev_priv) &&
+                            (prev + 1) != (s32)ranges->start);
                WARN_ON_ONCE(prev >= (s32)ranges->start);
                prev = ranges->start;
                WARN_ON_ONCE(prev >= (s32)ranges->end);