diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-07-24 11:38:34 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-07-26 09:12:22 +0300 |
commit | f8f1bfbd25559e01c59a55635477cb74b326ea0b (patch) | |
tree | 2d97540a246b0bd05ac824100144d0630c962aa9 /tests/i915/i915_pm_sseu.c | |
parent | dc3a0934a177226f323d1f3c1ea92b2591c375a2 (diff) |
tests/i915_pm_sseu: Don't try to get enabled subslices if it's not there
The debugfs contains "Enabled SliceX subslices:" line only if a given
slice is enabled. If we try to dbg_get_status() with everything shut
down we will get a confusing assertion failure:
CRITICAL: Test assertion failure function dbg_get_int, file ../tests/i915/i915_pm_sseu.c:120:
CRITICAL: Failed assertion: pos != NULL
To fix that let's just read the enabled subslices if the line is there,
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110593
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'tests/i915/i915_pm_sseu.c')
-rw-r--r-- | tests/i915/i915_pm_sseu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/i915_pm_sseu.c b/tests/i915/i915_pm_sseu.c index 252df7d3..0b936982 100644 --- a/tests/i915/i915_pm_sseu.c +++ b/tests/i915/i915_pm_sseu.c @@ -199,7 +199,7 @@ dbg_get_status(struct status *stat) if (dbg_has_line(first, last, "Enabled Subslice Per Slice:")) { stat->hw.subslice_per = dbg_get_int(first, last, "Enabled Subslice Per Slice:"); - } else { + } else if (dbg_has_line(first, last, "Enabled Slice0 subslices:")) { stat->hw.subslice_per = dbg_get_int(first, last, "Enabled Slice0 subslices:"); } |