1. 14 4月, 2021 1 次提交
  2. 25 3月, 2021 1 次提交
  3. 24 3月, 2021 2 次提交
    • M
      drm/i915/display: Simplify GLK display version tests · 2b5a4562
      Matt Roper 提交于
      GLK has always been a bit of a special case since it reports INTEL_GEN()
      as 9, but has version 10 display IP.  Now we can properly represent the
      display version as 10 and simplify the display generation tests
      throughout the display code.
      
      Aside from manually adding the version to the glk_info structure, the
      rest of this patch is generated with a Coccinelle semantic patch.  Note
      that we also need to switch any code that matches gen10 today but *not*
      GLK to be CNL-specific:
      
              @@ expression dev_priv; @@
              - DISPLAY_VER(dev_priv) > 9
              + DISPLAY_VER(dev_priv) >= 10
      
              @@ expression dev_priv, E; @@
              (
              - DISPLAY_VER(dev_priv) >= 10 && E
              + (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) && E
              |
              - DISPLAY_VER(dev_priv) >= 10
              + DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)
              |
              - IS_DISPLAY_RANGE(dev_priv, 10, E)
              + IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_CANNONLAKE(dev_priv)
              )
      
              @@ expression dev_priv, E, E2; @@
              (
              - (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - E || IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)
              + E || IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - IS_GEMINILAKE(dev_priv) || E || IS_CANNONLAKE(dev_priv)
              + E || IS_DISPLAY_VER(dev_priv, 10)
              |
              - E || IS_GEMINILAKE(dev_priv) || E2 || IS_CANNONLAKE(dev_priv)
              + E || E2 || IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_DISPLAY_VER(dev_priv, 10) || IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 10)
              |
              - (IS_GEMINILAKE(dev_priv) || IS_DISPLAY_VER(dev_priv, 10))
              + IS_DISPLAY_VER(dev_priv, 10)
              )
      
              @@ expression dev_priv; @@
              - (IS_DISPLAY_VER(dev_priv, 9) && !IS_GEMINILAKE(dev_priv))
              + IS_DISPLAY_VER(dev_priv, 9)
      
              @@ expression dev_priv; @@
              (
              - !(DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10))
              + DISPLAY_VER(dev_priv) < 10
              |
              - (DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10))
              + DISPLAY_VER(dev_priv) >= 10
              )
      
              @@ expression dev_priv, E; @@
              - E || DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10)
              + E || DISPLAY_VER(dev_priv) >= 10
      
              @@ expression dev_priv, E; @@
              - (IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_DISPLAY_VER(dev_priv, 10))
              + IS_DISPLAY_RANGE(dev_priv, 10, E)
      
              @@ expression dev_priv; @@
              (
              - DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv) || IS_GEN9_LP(dev_priv)
              + DISPLAY_VER(dev_priv) >= 10 || IS_GEN9_LP(dev_priv)
              |
              - IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)
              + IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 10
              )
      
              @@ expression dev_priv, E; @@
              - !(DISPLAY_VER(dev_priv) >= E)
              + DISPLAY_VER(dev_priv) < E
      
      v2:
       - Convert gen10 conditions that don't include GLK into CNL conditions.
         (Ville)
      
      v3:
       - Rework coccinelle rules so that "ver>=10" turns into "ver>=11||is_cnl." (Ville)
      
      v3.1:
       - Manually re-add the ".display.version = 10" to glk_info after
         regenerating patch via Coccinelle.
      
      v4:
       - Also apply cocci rules to intel_pm.c and i915_irq.c!  (CI)
      
      Cc: Ville Syrjälä <ville.syrjala@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210322233840.4056851-1-matthew.d.roper@intel.com
      2b5a4562
    • M
      drm/i915/display: Eliminate most usage of INTEL_GEN() · 005e9537
      Matt Roper 提交于
      Use Coccinelle to convert most of the usage of INTEL_GEN() and IS_GEN()
      in the display code to use DISPLAY_VER() comparisons instead.  The
      following semantic patch was used:
      
              @@ expression dev_priv, E; @@
              - INTEL_GEN(dev_priv) == E
              + IS_DISPLAY_VER(dev_priv, E)
      
              @@ expression dev_priv; @@
              - INTEL_GEN(dev_priv)
              + DISPLAY_VER(dev_priv)
      
              @@ expression dev_priv; expression E; @@
              - IS_GEN(dev_priv, E)
              + IS_DISPLAY_VER(dev_priv, E)
      
              @@
              expression dev_priv;
              expression from, until;
              @@
              - IS_GEN_RANGE(dev_priv, from, until)
              + IS_DISPLAY_RANGE(dev_priv, from, until)
      
      There are still some display-related uses of INTEL_GEN() in intel_pm.c
      (watermark code) and i915_irq.c.  Those will be updated separately.
      
      v2:
       - Use new IS_DISPLAY_RANGE and IS_DISPLAY_VER helpers.  (Jani)
      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/20210320044245.3920043-4-matthew.d.roper@intel.com
      005e9537
  4. 18 9月, 2020 1 次提交
  5. 04 5月, 2020 3 次提交
  6. 21 4月, 2020 1 次提交
  7. 20 4月, 2020 1 次提交
  8. 17 4月, 2020 1 次提交
  9. 15 4月, 2020 1 次提交
  10. 08 4月, 2020 1 次提交
    • J
      drm/i915/audio: use struct drm_device based logging · 9282a66c
      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-1-jani.nikula@intel.com
      9282a66c
  11. 27 3月, 2020 1 次提交
  12. 12 3月, 2020 1 次提交
  13. 26 2月, 2020 1 次提交
  14. 04 2月, 2020 1 次提交
    • C
      drm/i915/audio: Skip the cdclk modeset if no pipes attached · 08e3ed3a
      Chris Wilson 提交于
      If the display is not driving any pipes, we cannot change the bclk and
      doing so risks chasing NULL pointers:
      
      <6> [278.907105] snd_hda_intel 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
      <6> [278.909936] snd_hda_intel 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
      <7> [278.910078] i915 0000:00:02.0: [drm:intel_power_well_enable [i915]] enabling power well 2
      <1> [278.910228] BUG: kernel NULL pointer dereference, address: 0000000000000080
      <1> [278.910243] #PF: supervisor read access in kernel mode
      <1> [278.910251] #PF: error_code(0x0000) - not-present page
      <6> [278.910260] PGD 0 P4D 0
      <4> [278.910267] Oops: 0000 [#1] PREEMPT SMP PTI
      <4> [278.910276] CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G     U            5.5.0-CI-CI_DRM_7853+ #1
      <4> [278.910289] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017
      <4> [278.910312] Workqueue: events azx_probe_work [snd_hda_intel]
      <4> [278.910327] RIP: 0010:__ww_mutex_lock.constprop.15+0x5e/0x1090
      <4> [278.910338] Code: 75 88 be a7 03 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 4c 89 c3 e8 5e b3 6d ff 44 8b 3d 2f 24 37 02 45 85 ff 75 0a <4d> 3b 6d 58 0f 85 3f 07 00 00 48 85 db 74 22 49 8b 95 80 00 00 00
      <4> [278.910362] RSP: 0018:ffffc9000008bc10 EFLAGS: 00010246
      <4> [278.910371] RAX: 0000000000000246 RBX: ffffc9000008bd30 RCX: 0000000000000001
      <4> [278.910382] RDX: 0000000000000000 RSI: ffffffff82647c60 RDI: ffff88817b27d848
      <4> [278.910393] RBP: ffffc9000008bcc0 R08: 0000000000000000 R09: 0000000000000001
      <4> [278.910404] R10: ffffc9000008bce0 R11: 0000000000000000 R12: ffffffff8168f0fc
      <4> [278.910414] R13: 0000000000000028 R14: ffffc9000008bd60 R15: 0000000000000000
      <4> [278.910425] FS:  0000000000000000(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000
      <4> [278.910437] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [278.910446] CR2: 0000000000000080 CR3: 00000001650da000 CR4: 0000000000340ef0
      <4> [278.910456] Call Trace:
      <4> [278.910468]  ? mark_held_locks+0x49/0x70
      <4> [278.910479]  ? ww_mutex_lock+0x39/0x70
      <4> [278.910487]  ww_mutex_lock+0x39/0x70
      <4> [278.910497]  drm_modeset_lock+0x6c/0x120
      <4> [278.910575]  glk_force_audio_cdclk+0x7d/0x140 [i915]
      <4> [278.910656]  i915_audio_component_get_power+0xf2/0x110 [i915]
      <4> [278.910673]  snd_hdac_display_power+0x7d/0x120 [snd_hda_core]
      <4> [278.910686]  azx_probe_work+0x88/0x7e0 [snd_hda_intel]
      
      v2: Reorder glk_force_audio_cdclk() parameters to fit in with the norm.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1095Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200203133408.187493-1-chris@chris-wilson.co.uk
      08e3ed3a
  15. 02 2月, 2020 1 次提交
  16. 31 1月, 2020 3 次提交
  17. 27 1月, 2020 1 次提交
  18. 23 1月, 2020 1 次提交
    • W
      drm/i915/audio: convert to struct drm_device logging macros. · 63855149
      Wambui Karuga 提交于
      Converts the printk based logging macros in i915/display/intel_audio.c
      to the struct drm_device based logging macros.
      This transformation was achieved using the following coccinelle script
      that matches the existence of the struct drm_i915_private device:
      
      @rule1@
      identifier fn, T;
      @@
      
      fn(struct drm_i915_private *T,...) {
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      )
      ...+>
      }
      
      @rule2@
      identifier fn, T;
      @@
      
      fn(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      )
      ...+>
      }
      
      Checkpatch warnings were manually fixed.
      Signed-off-by: NWambui Karuga <wambui.karugax@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200121134559.17355-4-wambui.karugax@gmail.com
      63855149
  19. 14 1月, 2020 1 次提交
  20. 07 1月, 2020 2 次提交
  21. 01 11月, 2019 2 次提交
  22. 25 10月, 2019 1 次提交
    • V
      drm/i915: Rework global state locking · 1d5a95b5
      Ville Syrjälä 提交于
      So far we've sort of protected the global state under dev_priv with
      the connection_mutex. I wan to change that so that we can change the
      cdclk even for pure plane updates. To that end let's formalize the
      protection of the global state to follow what I started with the cdclk
      code already (though not entirely properly) such that any crtc mutex
      will suffice as a read lock, and all crtcs mutexes act as the write
      lock.
      
      We'll also pimp intel_atomic_state_clear() to clear the entire global
      state, so that we don't accidentally leak stale information between
      the locking retries.
      
      As a slight optimization we'll only lock the crtc mutexes to protect
      the global state, however if and when we actually have to poke the
      hw (eg. if the actual cdclk changes) we must serialize commits
      across all crtcs so that a parallel nonblocking commit can't get
      ahead of the cdclk reprogamming. We do that by adding all crtcs to
      the state.
      
      TODO: the old global state examined during commit may still
      be a problem since it always looks at the _latest_ swapped state
      in dev_priv. Need to add proper old/new state for that too I think.
      
      v2: Remeber to serialize the commits if necessary
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191015193035.25982-3-ville.syrjala@linux.intel.comReviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      1d5a95b5
  23. 04 10月, 2019 2 次提交
  24. 23 9月, 2019 1 次提交
  25. 02 9月, 2019 1 次提交
  26. 07 8月, 2019 1 次提交
  27. 04 7月, 2019 2 次提交
  28. 17 6月, 2019 1 次提交
  29. 03 5月, 2019 1 次提交
  30. 02 5月, 2019 2 次提交