1. 13 Feb, 2021 2 commits
    • Matt Roper's avatar
      drm/i915: Try to detect sudden loss of MMIO access · 29b6f88d
      Matt Roper authored
      In rare circumstances bugs in PCI programming, broken BIOS, or failing
      hardware can cause the CPU to lose access to the MMIO BAR on dgfx
      platforms.  This is a pretty catastrophic failure since all register
      reads come back with values of 0xFFFFFFFF.  Let's check for this special
      case while doing our usual checks for unclaimed registers; the FPGA_DBG
      register we use for those checks on modern platforms has some unused
      bits that will always read back as 0 when things are behaving properly;
      we can use them as canaries to detect when MMIO itself has suddenly
      broken and try to print a more informative error message in the logs.
      
      v2: Let the detection function still return 'true' if we've lost our
          MMIO access.  We'll still get an extra false positive message about
          an unclaimed register access, but we'll still honor the 'mmio_debug'
          limit and not spam the log.  (Lucas)
      
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210212211925.3418280-2-matthew.d.roper@intel.comReviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      29b6f88d
    • Matt Roper's avatar
      drm/i915: FPGA_DBG is display-specific · a321c3c6
      Matt Roper authored
      Although the bspec's description doesn't make it very clear, the
      hardware architects have confirmed that the FPGA_DBG register that we
      use to check for unclaimed MMIO accesses is display-specific and will
      only properly flag unclaimed MMIO transactions for registers in the
      display range.  If a platform doesn't have display, FPGA_DBG itself will
      not be available and should not be checked.  Let's move the feature flag
      into intel_device_info.display to more accurately reflect this.
      
      Given that we now know FPGA_DBG is display-specific, it could be argued
      that we should only check it on out intel_de_*() functions.  However
      let's not make that change right now; keeping the checks in all of the
      existing locations still helps us catch cases where regular
      intel_uncore_*() functions use bad MMIO offset math / base addresses and
      accidentally wind up landing within an unused area within the display
      MMIO range.  It will also help catch cases where userspace-initiated
      MMIO (e.g., IGT's intel_reg tool) attempt to read bad offsets within the
      display range.
      
      v2:  Add missing hunk with the update to the HAS_FPGA_DBG_UNCLAIMED
           macro.  (CI)
      
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210212222049.3516344-1-matthew.d.roper@intel.com
      a321c3c6
  2. 12 Feb, 2021 5 commits
  3. 11 Feb, 2021 3 commits
  4. 10 Feb, 2021 1 commit
  5. 09 Feb, 2021 7 commits
  6. 08 Feb, 2021 9 commits
  7. 05 Feb, 2021 10 commits
  8. 04 Feb, 2021 2 commits
  9. 02 Feb, 2021 1 commit