1. 24 May, 2018 4 commits
    • Vathsala Nagaraju's avatar
      drm/i915/psr: vbt change for psr · 77312ae8
      Vathsala Nagaraju authored
      For psr block #9, the vbt description has moved to options [0-3] for
      TP1,TP2,TP3 Wakeup time from decimal value without any change to vbt
      structure. Since spec does not  mention from which VBT version this
      change was added to vbt.bsf file, we cannot depend on bdb->version check
      to change for all the platforms.
      
      There is RCR inplace for GOP team to  provide the version number
      to make generic change. Since Kabylake with bdb version 209 is having this
      change, limiting this change to gen9_bc and version 209+ to unblock google.
      
      Tested on skl(bdb version 203,without options) and
      kabylake(bdb version 209,212) having new options.
      
      bspec 20131
      
      v2: (Jani and Rodrigo)
          move the 165 version check to intel_bios.c
      v3: Jani
          Move the abstraction to intel_bios.
      v4: Jani
          Rename tp*_wakeup_time to have "us" suffix.
          For values outside range[0-3],default to max 2500us.
          Old decimal value was wake up time in multiples of 100us.
      v5: Jani and Rodrigo
          Handle option 2 in default condition.
          Print oustide range value.
          For negetive values default to 2500us.
      v6: Jani
          Handle default first and then fall through for case 2.
      v7: Rodrigo
          Apply this change for IS_GEN9_BC and vbt version > 209
      v8: Puthik
          Add new function vbt_psr_to_us.
      v9: Jani
          Change to v7 version as it's more readable.
          DK
          add comment /*fall through*/ after case2.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Puthikorn Voravootivat <puthik@chromium.org>
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarMaulik V Vaghela <maulik.v.vaghela@intel.com>
      Signed-off-by: default avatarVathsala Nagaraju <vathsala.nagaraju@intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1526981243-2745-1-git-send-email-vathsala.nagaraju@intel.com
      77312ae8
    • Yunwei Zhang's avatar
      drm/i915: Implement WaProgramMgsrForL3BankSpecificMmioReads · fe864b76
      Yunwei Zhang authored
      L3Bank could be fused off in hardware for debug purpose, and it
      is possible that subslice is enabled while its corresponding L3Bank pairs
      are disabled. In such case, if MCR packet control register(0xFDC) is
      programed to point to a disabled bank pair, a MMIO read into L3Bank range
      will return 0 instead of correct values.
      
      However, this is not going to be the case in any production silicon.
      Therefore, we only check at initialization and issue a warning should
      this really happen.
      
      References: HSDES#1405586840
      
      v2:
       - use fls instead of find_last_bit (Chris)
       - use is_power_of_2() instead of counting bit set (Chris)
      v3:
       - rebase on latest tip
      v5:
       - Added references (Mika)
       - Move local variable into scope where they are used (Ursulin)
       - use a new local variable to reduce long line of code (Ursulin)
      v6:
       - Some coding style and use more local variables for clearer
         logic (Ursulin)
      
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: default avatarYunwei Zhang <yunwei.zhang@intel.com>
      Reviewed-by: default avatarOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1526683285-24861-1-git-send-email-yunwei.zhang@intel.com
      fe864b76
    • Yunwei Zhang's avatar
      drm/i915/icl: Enable WaProgramMgsrForCorrectSliceSpecificMmioReads · d78fa508
      Yunwei Zhang authored
      WaProgramMgsrForCorrectSliceSpecificMmioReads applies for Icelake as
      well.
      
      References: HSD#1405586840, BSID#0575
      
      v2:
       - GEN11 mask is different from its predecessors. (Oscar)
       - Better separate GEN10 and GEN11. (Oscar)
      
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: default avatarYunwei Zhang <yunwei.zhang@intel.com>
      Reviewed-by: default avatarOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1526683232-24753-1-git-send-email-yunwei.zhang@intel.com
      d78fa508
    • Yunwei Zhang's avatar
      drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads · 1e40d4ae
      Yunwei Zhang authored
      WaProgramMgsrForCorrectSliceSpecificMmioReads dictate that before any MMIO
      read into Slice/Subslice specific registers, MCR packet control
      register(0xFDC) needs to be programmed to point to any enabled
      slice/subslice pair. Otherwise, incorrect value will be returned.
      
      However, that means each subsequent MMIO read will be forwarded to a
      specific slice/subslice combination as read is unicast. This is OK since
      slice/subslice specific register values are consistent in almost all cases
      across slice/subslice. There are rare occasions such as INSTDONE that this
      value will be dependent on slice/subslice combo, in such cases, we need to
      program 0xFDC and recover this after. This is already covered by
      read_subslice_reg.
      
      Also, 0xFDC will lose its information after TDR/engine reset/power state
      change.
      
      References: HSD#1405586840, BSID#0575
      
      v2:
       - use fls() instead of find_last_bit() (Chris)
       - added INTEL_SSEU to extract sseu from device info. (Chris)
      v3:
       - rebase on latest tip
      v5:
       - Added references (Mika)
       - Change the ordered of passing arguments and etc. (Ursulin)
      v7:
       - Moved WA explanation Comments(Oscar)
       - Rebased.
      v8:
       - Renamed sanitize_mcr to calculate_s_ss_select. (Oscar)
       - calculate s/ss selector instead of whole mcr. (Oscar)
      v9:
       - Updated function name (Oscar)
       - Remove redundant variables (Oscar)
      v10:
       - Separate pre-GEN10 and GEN11 mask. (Oscar)
      
      Cc: Oscar Mateo <oscar.mateo@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: default avatarYunwei Zhang <yunwei.zhang@intel.com>
      Reviewed-by: default avatarOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1526683197-24656-1-git-send-email-yunwei.zhang@intel.com
      1e40d4ae
  2. 23 May, 2018 9 commits
  3. 22 May, 2018 8 commits
  4. 21 May, 2018 1 commit
  5. 19 May, 2018 6 commits
  6. 18 May, 2018 10 commits
  7. 17 May, 2018 2 commits