1. 18 2月, 2022 1 次提交
  2. 02 2月, 2022 1 次提交
    • M
      drm/i915: Only include i915_reg.h from .c files · ce2fce25
      Matt Roper 提交于
      Several of our i915 header files, have been including i915_reg.h.  This
      means that any change to i915_reg.h will trigger a full rebuild of
      pretty much every file of the driver, even those that don't have any
      kind of register access.  Let's delete the i915_reg.h include from all
      headers and add an explicit include from the .c files that truly
      need the register definitions; those that need a definition of
      i915_reg_t for a function definition can get it from i915_reg_defs.h
      instead.
      
      We also remove two non-register #define's (VLV_DISPLAY_BASE and
      GEN12_SFC_DONE_MAX) into i915_reg_defs.h to allow us to drop the
      i915_reg.h include from a couple of headers.
      
      There's probably a lot more header dependency optimization possible, but
      the changes here roughly cut the number of files compiled after 'touch
      i915_reg.h' in half --- a good first step.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-7-matthew.d.roper@intel.com
      ce2fce25
  3. 27 1月, 2022 1 次提交
  4. 12 1月, 2022 1 次提交
  5. 30 9月, 2021 12 次提交
  6. 17 6月, 2021 1 次提交
  7. 26 5月, 2021 2 次提交
  8. 20 5月, 2021 1 次提交
  9. 15 5月, 2021 2 次提交
  10. 21 4月, 2021 1 次提交
  11. 14 4月, 2021 1 次提交
    • L
      drm/i915/display: rename display version macros · 93e7e61e
      Lucas De Marchi 提交于
      While converting the rest of the driver to use GRAPHICS_VER() and
      MEDIA_VER(), following what was done for display, some discussions went
      back on what we did for display:
      
      	1) Why is the == comparison special that deserves a separate
      	macro instead of just getting the version and comparing directly
      	like is done for >, >=, <=?
      
      	2) IS_DISPLAY_RANGE() is weird in that it omits the "_VER" for
      	brevity. If we remove the current users of IS_DISPLAY_VER(), we
      	could actually repurpose it for a range check
      
      With (1) there could be an advantage if we used gen_mask since multiple
      conditionals be combined by the compiler in a single and instruction and
      check the result. However a) INTEL_GEN() doesn't use the mask since it
      would make the code bigger everywhere else and b) in the cases it made
      sense, it also made sense to convert to the _RANGE() variant.
      
      So here we repurpose IS_DISPLAY_VER() to work with a [ from, to ] range
      like was the IS_DISPLAY_RANGE() and convert the current IS_DISPLAY_VER()
      users to use == and != operators. Aside from the definition changes,
      this was done by the following semantic patch:
      
      	@@ expression dev_priv, E1; @@
      	- !IS_DISPLAY_VER(dev_priv, E1)
      	+ DISPLAY_VER(dev_priv) != E1
      
      	@@ expression dev_priv, E1; @@
      	- IS_DISPLAY_VER(dev_priv, E1)
      	+ DISPLAY_VER(dev_priv) == E1
      
      	@@ expression dev_priv, from, until; @@
      	- IS_DISPLAY_RANGE(dev_priv, from, until)
      	+ IS_DISPLAY_VER(dev_priv, from, until)
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      [Jani: Minor conflict resolve while applying.]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-4-lucas.demarchi@intel.com
      93e7e61e
  12. 24 3月, 2021 1 次提交
  13. 10 2月, 2021 1 次提交
  14. 09 2月, 2021 1 次提交
  15. 11 12月, 2020 1 次提交
  16. 31 10月, 2020 1 次提交
  17. 30 10月, 2020 1 次提交
  18. 24 8月, 2020 1 次提交
  19. 19 5月, 2020 1 次提交
  20. 11 5月, 2020 2 次提交
  21. 18 4月, 2020 3 次提交
    • J
      drm/i915/tc: Catch TC users accessing FIA registers without enable aux · 3ed347d1
      José Roberto de Souza 提交于
      As described in "drm/i915/tc/icl: Implement TC cold sequences" users
      of TC functions should held aux power well during access to avoid
      read garbage due HW in TC cold state.
      
      v3:
      - renamed is_tc_cold_blocked() to assert_tc_cold_blocked()
      - restored the removed 0xffffffff checks
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Tested-by: NYou-Sheng Yang <vicamo.yang@canonical.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200414194956.164323-7-jose.souza@intel.com
      3ed347d1
    • J
      drm/i915/tc/tgl: Implement TC cold sequences · 3c02934b
      José Roberto de Souza 提交于
      TC ports can enter in TCCOLD to save power and is required to request
      to PCODE to exit this state before use or read to TC registers.
      
      For TGL there is a new MBOX command to do that with a parameter to ask
      PCODE to exit and block TCCOLD entry or unblock TCCOLD entry.
      
      So adding a new power domain to reuse the refcount and only allow
      TC cold when all TC ports are not in use.
      
      v2:
      - fixed missing case in intel_display_power_domain_str()
      - moved tgl_tc_cold_request to intel_display_power.c
      - renamed TGL_TC_COLD_OFF to TGL_TC_COLD_OFF_POWER_DOMAINS
      - added all TC and TBT aux power domains to
      TGL_TC_COLD_OFF_POWER_DOMAINS
      
      v3:
      - added one msec sleep when PCODE returns -EAGAIN
      - added timeout of 5msec to not loop forever if
      sandybridge_pcode_write_timeout() keeps returning -EAGAIN
      
      v4:
      - Made failure to block or unblock TC cold a error
      - removed 5msec timeout, instead giving PCODE 1msec by up 3 times to
      recover from the internal error
      
      v5:
      - only sleeping 1msec when ret is -EAGAIN
      
      BSpec: 49294
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Cooper Chiou <cooper.chiou@intel.com>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200414194956.164323-6-jose.souza@intel.com
      3c02934b
    • J
      drm/i915/tc/icl: Implement TC cold sequences · feb7e0ef
      José Roberto de Souza 提交于
      This is required for legacy/static TC ports as IOM is not aware of
      the connection and will not trigger the TC cold exit.
      
      Just request PCODE to exit TCCOLD is not enough as it could enter
      again before driver makes use of the port, to prevent it BSpec states
      that aux powerwell should be held.
      
      So here embedding the TC cold exit sequence into ICL aux enable,
      it will enable aux and then request TC cold to exit.
      
      The TC cold block(exit and aux hold) and unblock was added to some
      exported TC functions for the others and to access PHY registers,
      callers should enable and keep aux powerwell enabled during access.
      
      Also adding TC cold check and warnig in tc_port_load_fia_params() as
      at this point of the driver initialization we can't request power
      wells, if we get this warning we will need to figure out how to handle
      it.
      
      v2:
      - moved ICL TC cold exit function to intel_display_power
      - using dig_port->tc_legacy_port to only execute sequences for legacy
      ports, hopefully VBTs will have this right
      - fixed check to call _hsw_power_well_continue_enable()
      - calling _hsw_power_well_continue_enable() unconditionally in
      icl_tc_phy_aux_power_well_enable(), if needed we will surpress timeout
      warnings of TC legacy ports
      - only blocking TC cold around fia access
      
      v3:
      - added timeout of 5msec to not loop forever if
      sandybridge_pcode_write_timeout() keeps returning -EAGAIN
      returning -EAGAIN in in icl_tc_cold_exit()
      - removed leftover tc_cold_wakeref
      - added one msec sleep when PCODE returns -EAGAIN
      
      v4:
      - removed 5msec timeout, instead giving 1msec to whoever is using
      PCODE to finish it up to 3 times
      - added a comment about turn TC cold exit failure as a error in future
      
      BSpec: 21750
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1296
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Cooper Chiou <cooper.chiou@intel.com>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200414194956.164323-4-jose.souza@intel.com
      feb7e0ef
  22. 08 4月, 2020 1 次提交
    • J
      drm/i915/tc: use struct drm_device based logging · 0383443d
      Jani Nikula 提交于
      Convert all the DRM_* logging macros to the struct drm_device based
      macros to provide device specific logging.
      
      No functional changes.
      
      Generated using the following semantic patch, originally written by
      Wambui Karuga <wambui.karugax@gmail.com>, with manual fixups on top:
      
      @@
      identifier fn, T;
      @@
      
      fn(...,struct drm_i915_private *T,...) {
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      @@
      identifier fn, T;
      @@
      
      fn(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      Cc: Wambui Karuga <wambui.karugax@gmail.com>
      Reviewed-by: NWambui Karuga <wambui.karugax@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200402114819.17232-3-jani.nikula@intel.com
      0383443d
  23. 04 2月, 2020 2 次提交