All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Hotplug cleanups (rev4)
       [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
@ 2020-03-11 20:09 ` Patchwork
  2020-03-20 18:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev6) Patchwork
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-03-11 20:09 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Hotplug cleanups (rev4)
URL   : https://patchwork.freedesktop.org/series/72348/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8121 -> Patchwork_16932
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_16932 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_16932, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_16932:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@execlists:
    - fi-skl-lmem:        [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8121/fi-skl-lmem/igt@i915_selftest@live@execlists.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-skl-lmem/igt@i915_selftest@live@execlists.html

  * igt@runner@aborted:
    - fi-kbl-soraka:      NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-kbl-soraka/igt@runner@aborted.html

  
Known issues
------------

  Here are the changes found in Patchwork_16932 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@execlists:
    - fi-kbl-soraka:      [PASS][4] -> [INCOMPLETE][5] ([fdo#112259] / [i915#1430])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8121/fi-kbl-soraka/igt@i915_selftest@live@execlists.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-kbl-soraka/igt@i915_selftest@live@execlists.html

  * igt@i915_selftest@live@gem_contexts:
    - fi-cfl-8700k:       [PASS][6] -> [INCOMPLETE][7] ([i915#424])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8121/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][8] -> [FAIL][9] ([fdo#111407])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8121/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-tgl-y:           [FAIL][10] ([CI#94]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8121/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html

  
  [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#112259]: https://bugs.freedesktop.org/show_bug.cgi?id=112259
  [i915#1430]: https://gitlab.freedesktop.org/drm/intel/issues/1430
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424


Participating hosts (42 -> 40)
------------------------------

  Additional (4): fi-skl-6770hq fi-ivb-3770 fi-skl-6600u fi-snb-2600 
  Missing    (6): fi-cml-u2 fi-cml-s fi-bsw-cyan fi-ctg-p8600 fi-cfl-8109u fi-byt-clapper 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8121 -> Patchwork_16932

  CI-20190529: 20190529
  CI_DRM_8121: c2e15accdf0c2b6e8b766659acc8159dc19c8869 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5505: 8973d811f3fdfb4ace4aabab2095ce0309881648 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_16932: dc883e676b6f27f06fbcf4b9ef36677b87601b92 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

dc883e676b6f drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected()
27a0a05e1962 drm/i915: Stash hpd status bits under dev_priv
01ddfb49b798 drm/i915: Turn intel_digital_port_connected() in a vfunc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16932/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev6)
       [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
  2020-03-11 20:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Hotplug cleanups (rev4) Patchwork
@ 2020-03-20 18:28 ` Patchwork
  2020-03-21  0:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-03-20 18:28 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Hotplug cleanups (rev6)
URL   : https://patchwork.freedesktop.org/series/72348/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8167 -> Patchwork_17038
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/index.html

Known issues
------------

  Here are the changes found in Patchwork_17038 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@execlists:
    - fi-glk-dsi:         [PASS][1] -> [INCOMPLETE][2] ([i915#58] / [i915#656] / [k.org#198133])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/fi-glk-dsi/igt@i915_selftest@live@execlists.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/fi-glk-dsi/igt@i915_selftest@live@execlists.html

  
#### Possible fixes ####

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-icl-u2:          [FAIL][3] ([fdo#109635] / [i915#217]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html

  
#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][5] ([fdo#111407]) -> [FAIL][6] ([i915#323])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@runner@aborted:
    - fi-kbl-8809g:       [FAIL][7] ([i915#1209]) -> [FAIL][8] ([i915#1485] / [i915#192] / [i915#193] / [i915#194])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/fi-kbl-8809g/igt@runner@aborted.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/fi-kbl-8809g/igt@runner@aborted.html

  
  [fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [i915#1209]: https://gitlab.freedesktop.org/drm/intel/issues/1209
  [i915#1485]: https://gitlab.freedesktop.org/drm/intel/issues/1485
  [i915#192]: https://gitlab.freedesktop.org/drm/intel/issues/192
  [i915#193]: https://gitlab.freedesktop.org/drm/intel/issues/193
  [i915#194]: https://gitlab.freedesktop.org/drm/intel/issues/194
  [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
  [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
  [i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
  [i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (49 -> 37)
------------------------------

  Additional (2): fi-skl-6770hq fi-kbl-7560u 
  Missing    (14): fi-cml-u2 fi-ilk-m540 fi-bdw-5557u fi-cml-s fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-cfl-8109u fi-bsw-kefka fi-blb-e6850 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8167 -> Patchwork_17038

  CI-20190529: 20190529
  CI_DRM_8167: b51a7e7f4f72cf780661a1e4b479e2b27ddbafc8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5526: f49ebeee9f54d6f23c60a842f75f65561d452ab0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17038: 5ea9c1e2721b47853a773f52d426920ac5c4c633 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

5ea9c1e2721b drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected()
9bdedc5134f0 drm/i915: Stash hpd status bits under dev_priv
7a2933ed6c37 drm/i915: Turn intel_digital_port_connected() in a vfunc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Hotplug cleanups (rev6)
       [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
  2020-03-11 20:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Hotplug cleanups (rev4) Patchwork
  2020-03-20 18:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev6) Patchwork
@ 2020-03-21  0:18 ` Patchwork
       [not found] ` <20200311155422.3043-2-ville.syrjala@linux.intel.com>
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-03-21  0:18 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Hotplug cleanups (rev6)
URL   : https://patchwork.freedesktop.org/series/72348/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8167_full -> Patchwork_17038_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_17038_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_17038_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_17038_full:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_flip@plain-flip-fb-recreate:
    - shard-skl:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl10/igt@kms_flip@plain-flip-fb-recreate.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl5/igt@kms_flip@plain-flip-fb-recreate.html

  
#### Warnings ####

  * igt@gem_ctx_persistence@close-replace-race:
    - shard-apl:          [INCOMPLETE][3] ([fdo#103927] / [i915#1402]) -> [DMESG-WARN][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-apl6/igt@gem_ctx_persistence@close-replace-race.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-apl8/igt@gem_ctx_persistence@close-replace-race.html
    - shard-skl:          [TIMEOUT][5] ([i915#1340]) -> [DMESG-WARN][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl10/igt@gem_ctx_persistence@close-replace-race.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl8/igt@gem_ctx_persistence@close-replace-race.html

  
Known issues
------------

  Here are the changes found in Patchwork_17038_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_busy@busy-vcs1:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#112080]) +12 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb2/igt@gem_busy@busy-vcs1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb3/igt@gem_busy@busy-vcs1.html

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-kbl:          [PASS][9] -> [DMESG-WARN][10] ([i915#180]) +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-kbl2/igt@gem_ctx_isolation@rcs0-s3.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-kbl6/igt@gem_ctx_isolation@rcs0-s3.html

  * igt@gem_exec_balancer@hang:
    - shard-tglb:         [PASS][11] -> [FAIL][12] ([i915#1277])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-tglb6/igt@gem_exec_balancer@hang.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-tglb6/igt@gem_exec_balancer@hang.html

  * igt@gem_exec_schedule@implicit-read-write-bsd2:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#109276] / [i915#677])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb2/igt@gem_exec_schedule@implicit-read-write-bsd2.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb3/igt@gem_exec_schedule@implicit-read-write-bsd2.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-skl:          [PASS][15] -> [FAIL][16] ([i915#454])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl6/igt@i915_pm_dc@dc6-psr.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl1/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [PASS][17] -> [DMESG-WARN][18] ([i915#180])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-apl2/igt@i915_suspend@debugfs-reader.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-apl6/igt@i915_suspend@debugfs-reader.html

  * igt@kms_cursor_crc@pipe-c-cursor-256x256-onscreen:
    - shard-skl:          [PASS][19] -> [FAIL][20] ([i915#54]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl9/igt@kms_cursor_crc@pipe-c-cursor-256x256-onscreen.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl9/igt@kms_cursor_crc@pipe-c-cursor-256x256-onscreen.html

  * igt@kms_flip@busy-flip:
    - shard-skl:          [PASS][21] -> [FAIL][22] ([i915#275])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl10/igt@kms_flip@busy-flip.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl5/igt@kms_flip@busy-flip.html

  * igt@kms_hdr@bpc-switch-dpms:
    - shard-skl:          [PASS][23] -> [FAIL][24] ([i915#1188])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl8/igt@kms_hdr@bpc-switch-dpms.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl2/igt@kms_hdr@bpc-switch-dpms.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
    - shard-skl:          [PASS][25] -> [FAIL][26] ([i915#53])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl9/igt@kms_pipe_crc_basic@hang-read-crc-pipe-c.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl9/igt@kms_pipe_crc_basic@hang-read-crc-pipe-c.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][27] -> [FAIL][28] ([fdo#108145] / [i915#265]) +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         [PASS][29] -> [SKIP][30] ([fdo#109441])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb3/igt@kms_psr@psr2_primary_mmap_gtt.html

  * igt@kms_setmode@basic:
    - shard-skl:          [PASS][31] -> [FAIL][32] ([i915#31])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl4/igt@kms_setmode@basic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl3/igt@kms_setmode@basic.html

  * igt@prime_vgem@fence-wait-bsd2:
    - shard-iclb:         [PASS][33] -> [SKIP][34] ([fdo#109276]) +9 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb2/igt@prime_vgem@fence-wait-bsd2.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb3/igt@prime_vgem@fence-wait-bsd2.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd1:
    - shard-iclb:         [SKIP][35] ([fdo#109276]) -> [PASS][36] +8 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb6/igt@gem_ctx_shared@exec-single-timeline-bsd1.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb4/igt@gem_ctx_shared@exec-single-timeline-bsd1.html

  * igt@gem_exec_schedule@implicit-both-bsd1:
    - shard-iclb:         [SKIP][37] ([fdo#109276] / [i915#677]) -> [PASS][38] +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb8/igt@gem_exec_schedule@implicit-both-bsd1.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb2/igt@gem_exec_schedule@implicit-both-bsd1.html

  * igt@gem_exec_schedule@pi-common-bsd:
    - shard-iclb:         [SKIP][39] ([i915#677]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb1/igt@gem_exec_schedule@pi-common-bsd.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb8/igt@gem_exec_schedule@pi-common-bsd.html

  * igt@gem_exec_schedule@wide-bsd:
    - shard-iclb:         [SKIP][41] ([fdo#112146]) -> [PASS][42] +5 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb1/igt@gem_exec_schedule@wide-bsd.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb8/igt@gem_exec_schedule@wide-bsd.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [FAIL][43] ([i915#79]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_flip@plain-flip-ts-check:
    - shard-skl:          [FAIL][45] ([i915#34]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl9/igt@kms_flip@plain-flip-ts-check.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl1/igt@kms_flip@plain-flip-ts-check.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-skl:          [INCOMPLETE][47] ([i915#198]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-skl4/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-apl:          [DMESG-WARN][49] ([i915#180]) -> [PASS][50] +1 similar issue
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-apl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-apl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
    - shard-kbl:          [DMESG-WARN][51] ([i915#180]) -> [PASS][52] +2 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-kbl7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-kbl2/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [SKIP][53] ([fdo#109441]) -> [PASS][54] +4 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-glk:          [FAIL][55] ([i915#31]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-glk2/igt@kms_setmode@basic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-glk6/igt@kms_setmode@basic.html

  * igt@perf_pmu@busy-no-semaphores-vcs1:
    - shard-iclb:         [SKIP][57] ([fdo#112080]) -> [PASS][58] +7 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb6/igt@perf_pmu@busy-no-semaphores-vcs1.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb1/igt@perf_pmu@busy-no-semaphores-vcs1.html

  * {igt@sysfs_preempt_timeout@timeout@vecs0}:
    - shard-glk:          [FAIL][59] -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-glk6/igt@sysfs_preempt_timeout@timeout@vecs0.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-glk1/igt@sysfs_preempt_timeout@timeout@vecs0.html

  
#### Warnings ####

  * igt@gem_ctx_persistence@close-replace-race:
    - shard-kbl:          [DMESG-WARN][61] -> [TIMEOUT][62] ([i915#1340])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-kbl1/igt@gem_ctx_persistence@close-replace-race.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-kbl7/igt@gem_ctx_persistence@close-replace-race.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][63] ([i915#588]) -> [SKIP][64] ([i915#658])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-iclb3/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         [SKIP][65] ([i915#468]) -> [FAIL][66] ([i915#454])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-tglb1/igt@i915_pm_dc@dc6-psr.html

  * igt@runner@aborted:
    - shard-glk:          [FAIL][67] ([i915#1402] / [k.org#202321]) -> [FAIL][68] ([i915#1402] / [i915#1485] / [k.org#202321])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8167/shard-glk8/igt@runner@aborted.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/shard-glk8/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#1277]: https://gitlab.freedesktop.org/drm/intel/issues/1277
  [i915#1340]: https://gitlab.freedesktop.org/drm/intel/issues/1340
  [i915#1402]: https://gitlab.freedesktop.org/drm/intel/issues/1402
  [i915#1485]: https://gitlab.freedesktop.org/drm/intel/issues/1485
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#275]: https://gitlab.freedesktop.org/drm/intel/issues/275
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
  [i915#53]: https://gitlab.freedesktop.org/drm/intel/issues/53
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8167 -> Patchwork_17038

  CI-20190529: 20190529
  CI_DRM_8167: b51a7e7f4f72cf780661a1e4b479e2b27ddbafc8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5526: f49ebeee9f54d6f23c60a842f75f65561d452ab0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17038: 5ea9c1e2721b47853a773f52d426920ac5c4c633 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17038/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: Turn intel_digital_port_connected() in a vfunc
       [not found] ` <20200311155422.3043-2-ville.syrjala@linux.intel.com>
@ 2020-05-06 15:15   ` Imre Deak
  2020-05-07  6:56     ` Ville Syrjälä
  0 siblings, 1 reply; 14+ messages in thread
From: Imre Deak @ 2020-05-06 15:15 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Wed, Mar 11, 2020 at 05:54:20PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Let's get rid of the platform if ladders in
> intel_digital_port_connected() and make it a vfunc. Now the if
> ladders are at the encoder initialization which makes them a bit
> less convoluted.
> 
> v2: Add forward decl for intel_encoder in intel_tc.h
> v3: Duplicate stuff to avoid exposing platform specific
>     functions across files (Jani)
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Nice to see the CPU and PCH handlers in their own vfunc:
Reviewed-by: Imre Deak <imre.deak@intel.com>

nit: Looks like you could've also added mcc_digital_port_connected() for
PHY_C.

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c      | 109 +++++++++++++
>  .../drm/i915/display/intel_display_types.h    |   1 +
>  drivers/gpu/drm/i915/display/intel_dp.c       | 147 +++---------------
>  drivers/gpu/drm/i915/display/intel_tc.c       |   3 +-
>  drivers/gpu/drm/i915/display/intel_tc.h       |   3 +-
>  5 files changed, 135 insertions(+), 128 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 73d0f4648c06..c8ceb08f8d05 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4343,6 +4343,96 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
>  	return state;
>  }
>  
> +static bool lpt_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	u32 bit;
> +
> +	switch (encoder->hpd_pin) {
> +	case HPD_PORT_B:
> +		bit = SDE_PORTB_HOTPLUG_CPT;
> +		break;
> +	case HPD_PORT_C:
> +		bit = SDE_PORTC_HOTPLUG_CPT;
> +		break;
> +	case HPD_PORT_D:
> +		bit = SDE_PORTD_HOTPLUG_CPT;
> +		break;
> +	default:
> +		MISSING_CASE(encoder->hpd_pin);
> +		return false;
> +	}
> +
> +	return intel_de_read(dev_priv, SDEISR) & bit;
> +}
> +
> +static bool spt_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	u32 bit;
> +
> +	switch (encoder->hpd_pin) {
> +	case HPD_PORT_A:
> +		bit = SDE_PORTA_HOTPLUG_SPT;
> +		break;
> +	case HPD_PORT_E:
> +		bit = SDE_PORTE_HOTPLUG_SPT;
> +		break;
> +	default:
> +		return lpt_digital_port_connected(encoder);
> +	}
> +
> +	return intel_de_read(dev_priv, SDEISR) & bit;
> +}
> +
> +static bool hsw_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +
> +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> +}
> +
> +static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +
> +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> +}
> +
> +static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	u32 bit;
> +
> +	switch (encoder->hpd_pin) {
> +	case HPD_PORT_A:
> +		bit = BXT_DE_PORT_HP_DDIA;
> +		break;
> +	case HPD_PORT_B:
> +		bit = BXT_DE_PORT_HP_DDIB;
> +		break;
> +	case HPD_PORT_C:
> +		bit = BXT_DE_PORT_HP_DDIC;
> +		break;
> +	default:
> +		MISSING_CASE(encoder->hpd_pin);
> +		return false;
> +	}
> +
> +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> +}
> +
> +static bool icp_digital_port_connected(struct intel_encoder *encoder)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> +
> +	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> +		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> +
> +	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> +}
> +
>  static struct intel_connector *
>  intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)
>  {
> @@ -4534,6 +4624,25 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
>  				port_name(port));
>  	}
>  
> +	if (INTEL_GEN(dev_priv) >= 11) {
> +		if (intel_phy_is_tc(dev_priv, phy))
> +			intel_dig_port->connected = intel_tc_port_connected;
> +		else
> +			intel_dig_port->connected = icp_digital_port_connected;
> +	} else if (IS_GEN9_LP(dev_priv)) {
> +		intel_dig_port->connected = bxt_digital_port_connected;
> +	} else if (port == PORT_A) {
> +		if (INTEL_GEN(dev_priv) >= 8)
> +			intel_dig_port->connected = bdw_digital_port_connected;
> +		else
> +			intel_dig_port->connected = hsw_digital_port_connected;
> +	} else {
> +		if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> +			intel_dig_port->connected = spt_digital_port_connected;
> +		else
> +			intel_dig_port->connected = lpt_digital_port_connected;
> +	}
> +
>  	intel_infoframe_init(intel_dig_port);
>  
>  	return;
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 5e00e611f077..3aab12f69ff8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1401,6 +1401,7 @@ struct intel_digital_port {
>  			       const struct drm_connector_state *conn_state);
>  	u32 (*infoframes_enabled)(struct intel_encoder *encoder,
>  				  const struct intel_crtc_state *pipe_config);
> +	bool (*connected)(struct intel_encoder *encoder);
>  };
>  
>  struct intel_dp_mst_encoder {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 0a417cd2af2b..cff14f52c391 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5447,25 +5447,6 @@ static bool cpt_digital_port_connected(struct intel_encoder *encoder)
>  	return intel_de_read(dev_priv, SDEISR) & bit;
>  }
>  
> -static bool spt_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_A:
> -		bit = SDE_PORTA_HOTPLUG_SPT;
> -		break;
> -	case HPD_PORT_E:
> -		bit = SDE_PORTE_HOTPLUG_SPT;
> -		break;
> -	default:
> -		return cpt_digital_port_connected(encoder);
> -	}
> -
> -	return intel_de_read(dev_priv, SDEISR) & bit;
> -}
> -
>  static bool g4x_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> @@ -5516,88 +5497,14 @@ static bool ilk_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  
> -	if (encoder->hpd_pin == HPD_PORT_A)
> -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> -	else
> -		return ibx_digital_port_connected(encoder);
> -}
> -
> -static bool snb_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> -	if (encoder->hpd_pin == HPD_PORT_A)
> -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> -	else
> -		return cpt_digital_port_connected(encoder);
> +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
>  }
>  
>  static bool ivb_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  
> -	if (encoder->hpd_pin == HPD_PORT_A)
> -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> -	else
> -		return cpt_digital_port_connected(encoder);
> -}
> -
> -static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> -	if (encoder->hpd_pin == HPD_PORT_A)
> -		return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> -	else
> -		return cpt_digital_port_connected(encoder);
> -}
> -
> -static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_A:
> -		bit = BXT_DE_PORT_HP_DDIA;
> -		break;
> -	case HPD_PORT_B:
> -		bit = BXT_DE_PORT_HP_DDIB;
> -		break;
> -	case HPD_PORT_C:
> -		bit = BXT_DE_PORT_HP_DDIC;
> -		break;
> -	default:
> -		MISSING_CASE(encoder->hpd_pin);
> -		return false;
> -	}
> -
> -	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> -}
> -
> -static bool intel_combo_phy_connected(struct drm_i915_private *dev_priv,
> -				      enum phy phy)
> -{
> -	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> -		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> -
> -	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> -}
> -
> -static bool icp_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> -	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> -
> -	if (intel_phy_is_combo(dev_priv, phy))
> -		return intel_combo_phy_connected(dev_priv, phy);
> -	else if (intel_phy_is_tc(dev_priv, phy))
> -		return intel_tc_port_connected(dig_port);
> -	else
> -		MISSING_CASE(encoder->hpd_pin);
> -
> -	return false;
> +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
>  }
>  
>  /*
> @@ -5611,44 +5518,15 @@ static bool icp_digital_port_connected(struct intel_encoder *encoder)
>   *
>   * Return %true if port is connected, %false otherwise.
>   */
> -static bool __intel_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> -	if (HAS_GMCH(dev_priv)) {
> -		if (IS_GM45(dev_priv))
> -			return gm45_digital_port_connected(encoder);
> -		else
> -			return g4x_digital_port_connected(encoder);
> -	}
> -
> -	if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> -		return icp_digital_port_connected(encoder);
> -	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> -		return spt_digital_port_connected(encoder);
> -	else if (IS_GEN9_LP(dev_priv))
> -		return bxt_digital_port_connected(encoder);
> -	else if (IS_GEN(dev_priv, 8))
> -		return bdw_digital_port_connected(encoder);
> -	else if (IS_GEN(dev_priv, 7))
> -		return ivb_digital_port_connected(encoder);
> -	else if (IS_GEN(dev_priv, 6))
> -		return snb_digital_port_connected(encoder);
> -	else if (IS_GEN(dev_priv, 5))
> -		return ilk_digital_port_connected(encoder);
> -
> -	MISSING_CASE(INTEL_GEN(dev_priv));
> -	return false;
> -}
> -
>  bool intel_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
>  	bool is_connected = false;
>  	intel_wakeref_t wakeref;
>  
>  	with_intel_display_power(dev_priv, POWER_DOMAIN_DISPLAY_CORE, wakeref)
> -		is_connected = __intel_digital_port_connected(encoder);
> +		is_connected = dig_port->connected(encoder);
>  
>  	return is_connected;
>  }
> @@ -7852,6 +7730,23 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
>  
>  	intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
>  
> +	if (HAS_GMCH(dev_priv)) {
> +		if (IS_GM45(dev_priv))
> +			intel_dig_port->connected = gm45_digital_port_connected;
> +		else
> +			intel_dig_port->connected = g4x_digital_port_connected;
> +	} else if (port == PORT_A) {
> +		if (IS_IVYBRIDGE(dev_priv))
> +			intel_dig_port->connected = ivb_digital_port_connected;
> +		else
> +			intel_dig_port->connected = ilk_digital_port_connected;
> +	} else {
> +		if (HAS_PCH_CPT(dev_priv))
> +			intel_dig_port->connected = cpt_digital_port_connected;
> +		else
> +			intel_dig_port->connected = ibx_digital_port_connected;
> +	}
> +
>  	if (port != PORT_A)
>  		intel_infoframe_init(intel_dig_port);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index 9b850c11aa78..1e64b4c92eec 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -484,8 +484,9 @@ static bool intel_tc_port_needs_reset(struct intel_digital_port *dig_port)
>   * connected ports are usable, and avoids exposing to the users objects they
>   * can't really use.
>   */
> -bool intel_tc_port_connected(struct intel_digital_port *dig_port)
> +bool intel_tc_port_connected(struct intel_encoder *encoder)
>  {
> +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
>  	bool is_connected;
>  
>  	intel_tc_port_lock(dig_port);
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
> index 463f1b3c836f..b619e4736f85 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.h
> +++ b/drivers/gpu/drm/i915/display/intel_tc.h
> @@ -10,8 +10,9 @@
>  #include <linux/types.h>
>  
>  struct intel_digital_port;
> +struct intel_encoder;
>  
> -bool intel_tc_port_connected(struct intel_digital_port *dig_port);
> +bool intel_tc_port_connected(struct intel_encoder *encoder);
>  u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port);
>  u32 intel_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port);
>  int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port);
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv
       [not found] ` <20200311155422.3043-3-ville.syrjala@linux.intel.com>
@ 2020-05-06 16:03   ` Imre Deak
  2020-05-07  6:53     ` Ville Syrjälä
  2020-05-07 11:48   ` [Intel-gfx] [PATCH v4 " Ville Syrjala
  1 sibling, 1 reply; 14+ messages in thread
From: Imre Deak @ 2020-05-06 16:03 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Wed, Mar 11, 2020 at 05:54:21PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Instead of constnantly having to figure out which hpd status bit
> array to use let's store them under dev_priv.
> 
> Should perhaps take this further and stash even more stuff to
> make the hpd handling more abstract yet.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h |   2 +
>  drivers/gpu/drm/i915/i915_irq.c | 198 ++++++++++++++++++--------------
>  2 files changed, 111 insertions(+), 89 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 19195bde4921..b5afbabf4c3b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -149,6 +149,8 @@ enum hpd_pin {
>  struct i915_hotplug {
>  	struct delayed_work hotplug_work;
>  
> +	const u32 *hpd, *pch_hpd;
> +
>  	struct {
>  		unsigned long last_jiffies;
>  		int count;
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 9f0653cf0510..b95d952bd47d 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -124,7 +124,6 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
>  	[HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS,
>  };
>  
> -/* BXT hpd list */
>  static const u32 hpd_bxt[HPD_NUM_PINS] = {
>  	[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
>  	[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
> @@ -168,6 +167,44 @@ static const u32 hpd_tgp[HPD_NUM_PINS] = {
>  	[HPD_PORT_I] = SDE_TC_HOTPLUG_ICP(PORT_TC6),
>  };
>  
> +static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
> +{
> +	struct i915_hotplug *hpd = &dev_priv->hotplug;
> +
> +	if (HAS_GMCH(dev_priv)) {
> +		if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> +		    IS_CHERRYVIEW(dev_priv))
> +			hpd->hpd = hpd_status_g4x;
> +		else
> +			hpd->hpd = hpd_status_i915;
> +		return;
> +	}
> +
> +	if (INTEL_GEN(dev_priv) >= 12)
> +		hpd->hpd = hpd_gen12;
> +	else if (INTEL_GEN(dev_priv) >= 11)
> +		hpd->hpd = hpd_gen11;
> +	else if (IS_GEN9_LP(dev_priv))
> +		hpd->hpd = hpd_bxt;
> +	else if (INTEL_GEN(dev_priv) >= 8)
> +		hpd->hpd = hpd_bdw;
> +	else if (INTEL_GEN(dev_priv) >= 7)
> +		hpd->hpd = hpd_ivb;
> +	else
> +		hpd->hpd = hpd_ilk;
> +
> +	if (HAS_PCH_TGP(dev_priv) || HAS_PCH_JSP(dev_priv))
> +		hpd->pch_hpd = hpd_tgp;
> +	else if (HAS_PCH_ICP(dev_priv) || HAS_PCH_MCC(dev_priv))
> +		hpd->pch_hpd = hpd_icp;
> +	else if (HAS_PCH_SPT(dev_priv))

What about CNP?

> +		hpd->pch_hpd = hpd_spt;
> +	else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_CPT(dev_priv))
> +		hpd->pch_hpd = hpd_cpt;
> +	else if (HAS_PCH_IBX(dev_priv))
> +		hpd->pch_hpd = hpd_ibx;

Can we add MISSING_CASE for PCH platforms?

> +}
> +
>  static void
>  intel_handle_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
>  {
> @@ -1504,33 +1541,27 @@ static void i9xx_hpd_irq_handler(struct drm_i915_private *dev_priv,
>  				 u32 hotplug_status)
>  {
>  	u32 pin_mask = 0, long_mask = 0;
> +	u32 hotplug_trigger;
>  
> -	if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> -	    IS_CHERRYVIEW(dev_priv)) {
> -		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
> +	if (IS_G4X(dev_priv) ||
> +	    IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> +		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
> +	else
> +		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
>  
> -		if (hotplug_trigger) {
> -			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -					   hotplug_trigger, hotplug_trigger,
> -					   hpd_status_g4x,
> -					   i9xx_port_hotplug_long_detect);
> +	if (hotplug_trigger) {
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   hotplug_trigger, hotplug_trigger,
> +				   dev_priv->hotplug.hpd,
> +				   i9xx_port_hotplug_long_detect);
>  
> -			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> -		}
> -
> -		if (hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
> -			dp_aux_irq_handler(dev_priv);
> -	} else {
> -		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
> -
> -		if (hotplug_trigger) {
> -			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -					   hotplug_trigger, hotplug_trigger,
> -					   hpd_status_i915,
> -					   i9xx_port_hotplug_long_detect);
> -			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> -		}
> +		intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
>  	}
> +
> +	if ((IS_G4X(dev_priv) ||
> +	     IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> +	    hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
> +		dp_aux_irq_handler(dev_priv);
>  }
>  
>  static irqreturn_t valleyview_irq_handler(int irq, void *arg)
> @@ -1696,8 +1727,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)
>  }
>  
>  static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
> @@ -1720,8 +1750,9 @@ static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
>  	if (!hotplug_trigger)
>  		return;
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.pch_hpd,
>  			   pch_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -1732,7 +1763,7 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	enum pipe pipe;
>  	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK;
>  
> -	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ibx);
> +	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (pch_iir & SDE_AUDIO_POWER_MASK) {
>  		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >>
> @@ -1820,7 +1851,7 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	enum pipe pipe;
>  	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT;
>  
> -	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_cpt);
> +	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) {
>  		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
> @@ -1857,22 +1888,18 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	u32 ddi_hotplug_trigger, tc_hotplug_trigger;
>  	u32 pin_mask = 0, long_mask = 0;
>  	bool (*tc_port_hotplug_long_detect)(enum hpd_pin pin, u32 val);
> -	const u32 *pins;
>  
>  	if (HAS_PCH_TGP(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_TGP;
>  		tc_port_hotplug_long_detect = tgp_tc_port_hotplug_long_detect;
> -		pins = hpd_tgp;
>  	} else if (HAS_PCH_JSP(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
>  		tc_hotplug_trigger = 0;
> -		pins = hpd_tgp;
>  	} else if (HAS_PCH_MCC(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_HOTPLUG_ICP(PORT_TC1);
>  		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
> -		pins = hpd_icp;
>  	} else {
>  		drm_WARN(&dev_priv->drm, !HAS_PCH_ICP(dev_priv),
>  			 "Unrecognized PCH type 0x%x\n",
> @@ -1881,7 +1908,6 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_ICP;
>  		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
> -		pins = hpd_icp;
>  	}
>  
>  	if (ddi_hotplug_trigger) {
> @@ -1891,8 +1917,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(SHOTPLUG_CTL_DDI, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   ddi_hotplug_trigger,
> -				   dig_hotplug_reg, pins,
> +				   ddi_hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   icp_ddi_port_hotplug_long_detect);
>  	}
>  
> @@ -1903,8 +1929,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(SHOTPLUG_CTL_TC, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   tc_hotplug_trigger,
> -				   dig_hotplug_reg, pins,
> +				   tc_hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   tc_port_hotplug_long_detect);
>  	}
>  
> @@ -1929,7 +1955,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   hotplug_trigger, dig_hotplug_reg, hpd_spt,
> +				   hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   spt_port_hotplug_long_detect);
>  	}
>  
> @@ -1940,7 +1967,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(PCH_PORT_HOTPLUG2, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   hotplug2_trigger, dig_hotplug_reg, hpd_spt,
> +				   hotplug2_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   spt_port_hotplug2_long_detect);
>  	}
>  
> @@ -1952,16 +1980,16 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  }
>  
>  static void ilk_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
>  	dig_hotplug_reg = I915_READ(DIGITAL_PORT_HOTPLUG_CNTRL);
>  	I915_WRITE(DIGITAL_PORT_HOTPLUG_CNTRL, dig_hotplug_reg);
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.hpd,
>  			   ilk_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -1974,7 +2002,7 @@ static void ilk_display_irq_handler(struct drm_i915_private *dev_priv,
>  	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG;
>  
>  	if (hotplug_trigger)
> -		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ilk);
> +		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (de_iir & DE_AUX_CHANNEL_A)
>  		dp_aux_irq_handler(dev_priv);
> @@ -2020,7 +2048,7 @@ static void ivb_display_irq_handler(struct drm_i915_private *dev_priv,
>  	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG_IVB;
>  
>  	if (hotplug_trigger)
> -		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ivb);
> +		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (de_iir & DE_ERR_INT_IVB)
>  		ivb_err_int_handler(dev_priv);
> @@ -2130,16 +2158,16 @@ static irqreturn_t ilk_irq_handler(int irq, void *arg)
>  }
>  
>  static void bxt_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
>  	dig_hotplug_reg = I915_READ(PCH_PORT_HOTPLUG);
>  	I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.hpd,
>  			   bxt_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -2151,15 +2179,11 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  	u32 trigger_tc = iir & GEN11_DE_TC_HOTPLUG_MASK;
>  	u32 trigger_tbt = iir & GEN11_DE_TBT_HOTPLUG_MASK;
>  	long_pulse_detect_func long_pulse_detect;
> -	const u32 *hpd;
>  
> -	if (INTEL_GEN(dev_priv) >= 12) {
> +	if (INTEL_GEN(dev_priv) >= 12)
>  		long_pulse_detect = gen12_port_hotplug_long_detect;
> -		hpd = hpd_gen12;
> -	} else {
> +	else
>  		long_pulse_detect = gen11_port_hotplug_long_detect;
> -		hpd = hpd_gen11;
> -	}
>  
>  	if (trigger_tc) {
>  		u32 dig_hotplug_reg;
> @@ -2167,8 +2191,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  		dig_hotplug_reg = I915_READ(GEN11_TC_HOTPLUG_CTL);
>  		I915_WRITE(GEN11_TC_HOTPLUG_CTL, dig_hotplug_reg);
>  
> -		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tc,
> -				   dig_hotplug_reg, hpd, long_pulse_detect);
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   trigger_tc, dig_hotplug_reg,
> +				   dev_priv->hotplug.hpd,
> +				   long_pulse_detect);
>  	}
>  
>  	if (trigger_tbt) {
> @@ -2177,8 +2203,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  		dig_hotplug_reg = I915_READ(GEN11_TBT_HOTPLUG_CTL);
>  		I915_WRITE(GEN11_TBT_HOTPLUG_CTL, dig_hotplug_reg);
>  
> -		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tbt,
> -				   dig_hotplug_reg, hpd, long_pulse_detect);
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   trigger_tbt, dig_hotplug_reg,
> +				   dev_priv->hotplug.hpd,
> +				   long_pulse_detect);
>  	}
>  
>  	if (pin_mask)
> @@ -2309,15 +2337,13 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
>  			if (IS_GEN9_LP(dev_priv)) {
>  				tmp_mask = iir & BXT_DE_PORT_HOTPLUG_MASK;
>  				if (tmp_mask) {
> -					bxt_hpd_irq_handler(dev_priv, tmp_mask,
> -							    hpd_bxt);
> +					bxt_hpd_irq_handler(dev_priv, tmp_mask);
>  					found = true;
>  				}
>  			} else if (IS_BROADWELL(dev_priv)) {
>  				tmp_mask = iir & GEN8_PORT_DP_A_HOTPLUG;
>  				if (tmp_mask) {
> -					ilk_hpd_irq_handler(dev_priv,
> -							    tmp_mask, hpd_bdw);
> +					ilk_hpd_irq_handler(dev_priv, tmp_mask);
>  					found = true;
>  				}
>  			}
> @@ -2989,13 +3015,12 @@ static void ibx_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
> -	if (HAS_PCH_IBX(dev_priv)) {
> +	if (HAS_PCH_IBX(dev_priv))
>  		hotplug_irqs = SDE_HOTPLUG_MASK;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ibx);
> -	} else {
> +	else
>  		hotplug_irqs = SDE_HOTPLUG_MASK_CPT;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_cpt);
> -	}
> +
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
>  
> @@ -3021,13 +3046,12 @@ static void icp_hpd_detection_setup(struct drm_i915_private *dev_priv,
>  
>  static void icp_hpd_irq_setup(struct drm_i915_private *dev_priv,
>  			      u32 sde_ddi_mask, u32 sde_tc_mask,
> -			      u32 ddi_enable_mask, u32 tc_enable_mask,
> -			      const u32 *pins)
> +			      u32 ddi_enable_mask, u32 tc_enable_mask)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
>  	hotplug_irqs = sde_ddi_mask | sde_tc_mask;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, pins);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
>  
> @@ -3044,8 +3068,7 @@ static void mcc_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	icp_hpd_irq_setup(dev_priv,
>  			  SDE_DDI_MASK_ICP, SDE_TC_HOTPLUG_ICP(PORT_TC1),
> -			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1),
> -			  hpd_icp);
> +			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1));
>  }
>  
>  /*
> @@ -3057,8 +3080,7 @@ static void jsp_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	icp_hpd_irq_setup(dev_priv,
>  			  SDE_DDI_MASK_TGP, 0,
> -			  TGP_DDI_HPD_ENABLE_MASK, 0,
> -			  hpd_tgp);
> +			  TGP_DDI_HPD_ENABLE_MASK, 0);
>  }
>  
>  static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
> @@ -3083,11 +3105,9 @@ static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
>  static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
> -	const u32 *hpd;
>  	u32 val;
>  
> -	hpd = INTEL_GEN(dev_priv) >= 12 ? hpd_gen12 : hpd_gen11;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  	hotplug_irqs = GEN11_DE_TC_HOTPLUG_MASK | GEN11_DE_TBT_HOTPLUG_MASK;
>  
>  	val = I915_READ(GEN11_DE_HPD_IMR);
> @@ -3099,12 +3119,10 @@ static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  
>  	if (INTEL_PCH_TYPE(dev_priv) >= PCH_TGP)
>  		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_TGP, SDE_TC_MASK_TGP,
> -				  TGP_DDI_HPD_ENABLE_MASK,
> -				  TGP_TC_HPD_ENABLE_MASK, hpd_tgp);
> +				  TGP_DDI_HPD_ENABLE_MASK, TGP_TC_HPD_ENABLE_MASK);
>  	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
>  		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_ICP, SDE_TC_MASK_ICP,
> -				  ICP_DDI_HPD_ENABLE_MASK,
> -				  ICP_TC_HPD_ENABLE_MASK, hpd_icp);
> +				  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE_MASK);
>  }
>  
>  static void spt_hpd_detection_setup(struct drm_i915_private *dev_priv)
> @@ -3140,7 +3158,7 @@ static void spt_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  		I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
>  
>  	hotplug_irqs = SDE_HOTPLUG_MASK_SPT;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_spt);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
>  
> @@ -3169,17 +3187,17 @@ static void ilk_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  
>  	if (INTEL_GEN(dev_priv) >= 8) {
>  		hotplug_irqs = GEN8_PORT_DP_A_HOTPLUG;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bdw);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	} else if (INTEL_GEN(dev_priv) >= 7) {
>  		hotplug_irqs = DE_DP_A_HOTPLUG_IVB;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ivb);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	} else {
>  		hotplug_irqs = DE_DP_A_HOTPLUG;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ilk);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	}
> @@ -3230,7 +3248,7 @@ static void bxt_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bxt);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  	hotplug_irqs = BXT_DE_PORT_HOTPLUG_MASK;
>  
>  	bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
> @@ -3936,6 +3954,8 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
>  	struct drm_device *dev = &dev_priv->drm;
>  	int i;
>  
> +	intel_hpd_init_pins(dev_priv);
> +
>  	intel_hpd_init_work(dev_priv);
>  
>  	INIT_WORK(&dev_priv->l3_parity.error_work, ivb_parity_work);
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected()
       [not found] ` <20200311155422.3043-4-ville.syrjala@linux.intel.com>
@ 2020-05-06 16:32   ` Imre Deak
  0 siblings, 0 replies; 14+ messages in thread
From: Imre Deak @ 2020-05-06 16:32 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Wed, Mar 11, 2020 at 05:54:22PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Get rid of several platform specific variants of
> intel_digital_port_connected() and just use the ISR bits we've
> stashed away.
> 
> v2: Duplicate stuff to avoid exposing platform specific
>     functions across files (Jani)
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 88 +++---------------------
>  drivers/gpu/drm/i915/display/intel_dp.c  | 59 ++--------------
>  drivers/gpu/drm/i915/display/intel_tc.c  |  4 +-
>  3 files changed, 17 insertions(+), 134 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index c8ceb08f8d05..d64fcc18ae4d 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4346,41 +4346,7 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
>  static bool lpt_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_B:
> -		bit = SDE_PORTB_HOTPLUG_CPT;
> -		break;
> -	case HPD_PORT_C:
> -		bit = SDE_PORTC_HOTPLUG_CPT;
> -		break;
> -	case HPD_PORT_D:
> -		bit = SDE_PORTD_HOTPLUG_CPT;
> -		break;
> -	default:
> -		MISSING_CASE(encoder->hpd_pin);
> -		return false;
> -	}
> -
> -	return intel_de_read(dev_priv, SDEISR) & bit;
> -}
> -
> -static bool spt_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_A:
> -		bit = SDE_PORTA_HOTPLUG_SPT;
> -		break;
> -	case HPD_PORT_E:
> -		bit = SDE_PORTE_HOTPLUG_SPT;
> -		break;
> -	default:
> -		return lpt_digital_port_connected(encoder);
> -	}
> +	u32 bit = dev_priv->hotplug.pch_hpd[encoder->hpd_pin];
>  
>  	return intel_de_read(dev_priv, SDEISR) & bit;
>  }
> @@ -4388,51 +4354,19 @@ static bool spt_digital_port_connected(struct intel_encoder *encoder)
>  static bool hsw_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	u32 bit = dev_priv->hotplug.hpd[encoder->hpd_pin];
>  
> -	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> +	return intel_de_read(dev_priv, DEISR) & bit;
>  }
>  
>  static bool bdw_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> -	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> -}
> -
> -static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_A:
> -		bit = BXT_DE_PORT_HP_DDIA;
> -		break;
> -	case HPD_PORT_B:
> -		bit = BXT_DE_PORT_HP_DDIB;
> -		break;
> -	case HPD_PORT_C:
> -		bit = BXT_DE_PORT_HP_DDIC;
> -		break;
> -	default:
> -		MISSING_CASE(encoder->hpd_pin);
> -		return false;
> -	}
> +	u32 bit = dev_priv->hotplug.hpd[encoder->hpd_pin];
>  
>  	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
>  }
>  
> -static bool icp_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> -
> -	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> -		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> -
> -	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> -}
> -
>  static struct intel_connector *
>  intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)
>  {
> @@ -4628,17 +4562,15 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
>  		if (intel_phy_is_tc(dev_priv, phy))
>  			intel_dig_port->connected = intel_tc_port_connected;
>  		else
> -			intel_dig_port->connected = icp_digital_port_connected;
> -	} else if (IS_GEN9_LP(dev_priv)) {
> -		intel_dig_port->connected = bxt_digital_port_connected;
> -	} else if (port == PORT_A) {
> -		if (INTEL_GEN(dev_priv) >= 8)
> +			intel_dig_port->connected = lpt_digital_port_connected;
> +	} else if (INTEL_GEN(dev_priv) >= 8) {
> +		if (port == PORT_A || IS_GEN9_LP(dev_priv))
>  			intel_dig_port->connected = bdw_digital_port_connected;
>  		else
> +			intel_dig_port->connected = lpt_digital_port_connected;
> +	} else {
> +		if (port == PORT_A)
>  			intel_dig_port->connected = hsw_digital_port_connected;
> -	} else {
> -		if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> -			intel_dig_port->connected = spt_digital_port_connected;
>  		else
>  			intel_dig_port->connected = lpt_digital_port_connected;
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index cff14f52c391..b34933959e54 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5404,45 +5404,7 @@ edp_detect(struct intel_dp *intel_dp)
>  static bool ibx_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_B:
> -		bit = SDE_PORTB_HOTPLUG;
> -		break;
> -	case HPD_PORT_C:
> -		bit = SDE_PORTC_HOTPLUG;
> -		break;
> -	case HPD_PORT_D:
> -		bit = SDE_PORTD_HOTPLUG;
> -		break;
> -	default:
> -		MISSING_CASE(encoder->hpd_pin);
> -		return false;
> -	}
> -
> -	return intel_de_read(dev_priv, SDEISR) & bit;
> -}
> -
> -static bool cpt_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -	u32 bit;
> -
> -	switch (encoder->hpd_pin) {
> -	case HPD_PORT_B:
> -		bit = SDE_PORTB_HOTPLUG_CPT;
> -		break;
> -	case HPD_PORT_C:
> -		bit = SDE_PORTC_HOTPLUG_CPT;
> -		break;
> -	case HPD_PORT_D:
> -		bit = SDE_PORTD_HOTPLUG_CPT;
> -		break;
> -	default:
> -		MISSING_CASE(encoder->hpd_pin);
> -		return false;
> -	}
> +	u32 bit = dev_priv->hotplug.pch_hpd[encoder->hpd_pin];
>  
>  	return intel_de_read(dev_priv, SDEISR) & bit;
>  }
> @@ -5496,15 +5458,9 @@ static bool gm45_digital_port_connected(struct intel_encoder *encoder)
>  static bool ilk_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	u32 bit = dev_priv->hotplug.hpd[encoder->hpd_pin];
>  
> -	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> -}
> -
> -static bool ivb_digital_port_connected(struct intel_encoder *encoder)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> -	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> +	return intel_de_read(dev_priv, DEISR) & bit;
>  }
>  
>  /*
> @@ -7735,14 +7691,9 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
>  			intel_dig_port->connected = gm45_digital_port_connected;
>  		else
>  			intel_dig_port->connected = g4x_digital_port_connected;
> -	} else if (port == PORT_A) {
> -		if (IS_IVYBRIDGE(dev_priv))
> -			intel_dig_port->connected = ivb_digital_port_connected;
> -		else
> +	} else {
> +		if (port == PORT_A)
>  			intel_dig_port->connected = ilk_digital_port_connected;
> -	} else {
> -		if (HAS_PCH_CPT(dev_priv))
> -			intel_dig_port->connected = cpt_digital_port_connected;
>  		else
>  			intel_dig_port->connected = ibx_digital_port_connected;
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index 1e64b4c92eec..0b6c1950ec6d 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -173,8 +173,8 @@ static void tc_port_fixup_legacy_flag(struct intel_digital_port *dig_port,
>  static u32 tc_port_live_status_mask(struct intel_digital_port *dig_port)
>  {
>  	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
> -	enum tc_port tc_port = intel_port_to_tc(i915, dig_port->base.port);
>  	struct intel_uncore *uncore = &i915->uncore;
> +	u32 isr_bit = i915->hotplug.pch_hpd[dig_port->base.hpd_pin];
>  	u32 mask = 0;
>  	u32 val;
>  
> @@ -193,7 +193,7 @@ static u32 tc_port_live_status_mask(struct intel_digital_port *dig_port)
>  	if (val & TC_LIVE_STATE_TC(dig_port->tc_phy_fia_idx))
>  		mask |= BIT(TC_PORT_DP_ALT);
>  
> -	if (intel_uncore_read(uncore, SDEISR) & SDE_TC_HOTPLUG_ICP(tc_port))
> +	if (intel_uncore_read(uncore, SDEISR) & isr_bit)
>  		mask |= BIT(TC_PORT_LEGACY);
>  
>  	/* The sink can be connected only in a single mode. */
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv
  2020-05-06 16:03   ` [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv Imre Deak
@ 2020-05-07  6:53     ` Ville Syrjälä
  2020-05-07  8:48       ` Imre Deak
  0 siblings, 1 reply; 14+ messages in thread
From: Ville Syrjälä @ 2020-05-07  6:53 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

On Wed, May 06, 2020 at 07:03:41PM +0300, Imre Deak wrote:
> On Wed, Mar 11, 2020 at 05:54:21PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Instead of constnantly having to figure out which hpd status bit
> > array to use let's store them under dev_priv.
> > 
> > Should perhaps take this further and stash even more stuff to
> > make the hpd handling more abstract yet.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h |   2 +
> >  drivers/gpu/drm/i915/i915_irq.c | 198 ++++++++++++++++++--------------
> >  2 files changed, 111 insertions(+), 89 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 19195bde4921..b5afbabf4c3b 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -149,6 +149,8 @@ enum hpd_pin {
> >  struct i915_hotplug {
> >  	struct delayed_work hotplug_work;
> >  
> > +	const u32 *hpd, *pch_hpd;
> > +
> >  	struct {
> >  		unsigned long last_jiffies;
> >  		int count;
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index 9f0653cf0510..b95d952bd47d 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -124,7 +124,6 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
> >  	[HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS,
> >  };
> >  
> > -/* BXT hpd list */
> >  static const u32 hpd_bxt[HPD_NUM_PINS] = {
> >  	[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
> >  	[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
> > @@ -168,6 +167,44 @@ static const u32 hpd_tgp[HPD_NUM_PINS] = {
> >  	[HPD_PORT_I] = SDE_TC_HOTPLUG_ICP(PORT_TC6),
> >  };
> >  
> > +static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
> > +{
> > +	struct i915_hotplug *hpd = &dev_priv->hotplug;
> > +
> > +	if (HAS_GMCH(dev_priv)) {
> > +		if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> > +		    IS_CHERRYVIEW(dev_priv))
> > +			hpd->hpd = hpd_status_g4x;
> > +		else
> > +			hpd->hpd = hpd_status_i915;
> > +		return;
> > +	}
> > +
> > +	if (INTEL_GEN(dev_priv) >= 12)
> > +		hpd->hpd = hpd_gen12;
> > +	else if (INTEL_GEN(dev_priv) >= 11)
> > +		hpd->hpd = hpd_gen11;
> > +	else if (IS_GEN9_LP(dev_priv))
> > +		hpd->hpd = hpd_bxt;
> > +	else if (INTEL_GEN(dev_priv) >= 8)
> > +		hpd->hpd = hpd_bdw;
> > +	else if (INTEL_GEN(dev_priv) >= 7)
> > +		hpd->hpd = hpd_ivb;
> > +	else
> > +		hpd->hpd = hpd_ilk;
> > +
> > +	if (HAS_PCH_TGP(dev_priv) || HAS_PCH_JSP(dev_priv))
> > +		hpd->pch_hpd = hpd_tgp;
> > +	else if (HAS_PCH_ICP(dev_priv) || HAS_PCH_MCC(dev_priv))
> > +		hpd->pch_hpd = hpd_icp;
> > +	else if (HAS_PCH_SPT(dev_priv))
> 
> What about CNP?

Argh. We have too many of these. Do we even need all of them?

> 
> > +		hpd->pch_hpd = hpd_spt;
> > +	else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_CPT(dev_priv))
> > +		hpd->pch_hpd = hpd_cpt;
> > +	else if (HAS_PCH_IBX(dev_priv))
> > +		hpd->pch_hpd = hpd_ibx;
> 
> Can we add MISSING_CASE for PCH platforms?

else if (HAS_PCH_SPLIT())
	MISSING_CASE(INTEL_PCH_TYPE())
?

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: Turn intel_digital_port_connected() in a vfunc
  2020-05-06 15:15   ` [Intel-gfx] [PATCH v3 1/3] drm/i915: Turn intel_digital_port_connected() in a vfunc Imre Deak
@ 2020-05-07  6:56     ` Ville Syrjälä
  2020-05-07  8:23       ` Imre Deak
  0 siblings, 1 reply; 14+ messages in thread
From: Ville Syrjälä @ 2020-05-07  6:56 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

On Wed, May 06, 2020 at 06:15:28PM +0300, Imre Deak wrote:
> On Wed, Mar 11, 2020 at 05:54:20PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Let's get rid of the platform if ladders in
> > intel_digital_port_connected() and make it a vfunc. Now the if
> > ladders are at the encoder initialization which makes them a bit
> > less convoluted.
> > 
> > v2: Add forward decl for intel_encoder in intel_tc.h
> > v3: Duplicate stuff to avoid exposing platform specific
> >     functions across files (Jani)
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Nice to see the CPU and PCH handlers in their own vfunc:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
> 
> nit: Looks like you could've also added mcc_digital_port_connected() for
> PHY_C.

I suppose. IIRC I originally wrote this before the MCC special
case was added, and then didn't pay too much attention during the
rebase. It's all going away in the end though so not sure it's
worth the hassle to redo this.

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_ddi.c      | 109 +++++++++++++
> >  .../drm/i915/display/intel_display_types.h    |   1 +
> >  drivers/gpu/drm/i915/display/intel_dp.c       | 147 +++---------------
> >  drivers/gpu/drm/i915/display/intel_tc.c       |   3 +-
> >  drivers/gpu/drm/i915/display/intel_tc.h       |   3 +-
> >  5 files changed, 135 insertions(+), 128 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > index 73d0f4648c06..c8ceb08f8d05 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > @@ -4343,6 +4343,96 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
> >  	return state;
> >  }
> >  
> > +static bool lpt_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	u32 bit;
> > +
> > +	switch (encoder->hpd_pin) {
> > +	case HPD_PORT_B:
> > +		bit = SDE_PORTB_HOTPLUG_CPT;
> > +		break;
> > +	case HPD_PORT_C:
> > +		bit = SDE_PORTC_HOTPLUG_CPT;
> > +		break;
> > +	case HPD_PORT_D:
> > +		bit = SDE_PORTD_HOTPLUG_CPT;
> > +		break;
> > +	default:
> > +		MISSING_CASE(encoder->hpd_pin);
> > +		return false;
> > +	}
> > +
> > +	return intel_de_read(dev_priv, SDEISR) & bit;
> > +}
> > +
> > +static bool spt_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	u32 bit;
> > +
> > +	switch (encoder->hpd_pin) {
> > +	case HPD_PORT_A:
> > +		bit = SDE_PORTA_HOTPLUG_SPT;
> > +		break;
> > +	case HPD_PORT_E:
> > +		bit = SDE_PORTE_HOTPLUG_SPT;
> > +		break;
> > +	default:
> > +		return lpt_digital_port_connected(encoder);
> > +	}
> > +
> > +	return intel_de_read(dev_priv, SDEISR) & bit;
> > +}
> > +
> > +static bool hsw_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +
> > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> > +}
> > +
> > +static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +
> > +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> > +}
> > +
> > +static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	u32 bit;
> > +
> > +	switch (encoder->hpd_pin) {
> > +	case HPD_PORT_A:
> > +		bit = BXT_DE_PORT_HP_DDIA;
> > +		break;
> > +	case HPD_PORT_B:
> > +		bit = BXT_DE_PORT_HP_DDIB;
> > +		break;
> > +	case HPD_PORT_C:
> > +		bit = BXT_DE_PORT_HP_DDIC;
> > +		break;
> > +	default:
> > +		MISSING_CASE(encoder->hpd_pin);
> > +		return false;
> > +	}
> > +
> > +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> > +}
> > +
> > +static bool icp_digital_port_connected(struct intel_encoder *encoder)
> > +{
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> > +
> > +	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> > +		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> > +
> > +	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> > +}
> > +
> >  static struct intel_connector *
> >  intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)
> >  {
> > @@ -4534,6 +4624,25 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
> >  				port_name(port));
> >  	}
> >  
> > +	if (INTEL_GEN(dev_priv) >= 11) {
> > +		if (intel_phy_is_tc(dev_priv, phy))
> > +			intel_dig_port->connected = intel_tc_port_connected;
> > +		else
> > +			intel_dig_port->connected = icp_digital_port_connected;
> > +	} else if (IS_GEN9_LP(dev_priv)) {
> > +		intel_dig_port->connected = bxt_digital_port_connected;
> > +	} else if (port == PORT_A) {
> > +		if (INTEL_GEN(dev_priv) >= 8)
> > +			intel_dig_port->connected = bdw_digital_port_connected;
> > +		else
> > +			intel_dig_port->connected = hsw_digital_port_connected;
> > +	} else {
> > +		if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> > +			intel_dig_port->connected = spt_digital_port_connected;
> > +		else
> > +			intel_dig_port->connected = lpt_digital_port_connected;
> > +	}
> > +
> >  	intel_infoframe_init(intel_dig_port);
> >  
> >  	return;
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 5e00e611f077..3aab12f69ff8 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -1401,6 +1401,7 @@ struct intel_digital_port {
> >  			       const struct drm_connector_state *conn_state);
> >  	u32 (*infoframes_enabled)(struct intel_encoder *encoder,
> >  				  const struct intel_crtc_state *pipe_config);
> > +	bool (*connected)(struct intel_encoder *encoder);
> >  };
> >  
> >  struct intel_dp_mst_encoder {
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 0a417cd2af2b..cff14f52c391 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -5447,25 +5447,6 @@ static bool cpt_digital_port_connected(struct intel_encoder *encoder)
> >  	return intel_de_read(dev_priv, SDEISR) & bit;
> >  }
> >  
> > -static bool spt_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -	u32 bit;
> > -
> > -	switch (encoder->hpd_pin) {
> > -	case HPD_PORT_A:
> > -		bit = SDE_PORTA_HOTPLUG_SPT;
> > -		break;
> > -	case HPD_PORT_E:
> > -		bit = SDE_PORTE_HOTPLUG_SPT;
> > -		break;
> > -	default:
> > -		return cpt_digital_port_connected(encoder);
> > -	}
> > -
> > -	return intel_de_read(dev_priv, SDEISR) & bit;
> > -}
> > -
> >  static bool g4x_digital_port_connected(struct intel_encoder *encoder)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > @@ -5516,88 +5497,14 @@ static bool ilk_digital_port_connected(struct intel_encoder *encoder)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> >  
> > -	if (encoder->hpd_pin == HPD_PORT_A)
> > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> > -	else
> > -		return ibx_digital_port_connected(encoder);
> > -}
> > -
> > -static bool snb_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -
> > -	if (encoder->hpd_pin == HPD_PORT_A)
> > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> > -	else
> > -		return cpt_digital_port_connected(encoder);
> > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> >  }
> >  
> >  static bool ivb_digital_port_connected(struct intel_encoder *encoder)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> >  
> > -	if (encoder->hpd_pin == HPD_PORT_A)
> > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> > -	else
> > -		return cpt_digital_port_connected(encoder);
> > -}
> > -
> > -static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -
> > -	if (encoder->hpd_pin == HPD_PORT_A)
> > -		return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> > -	else
> > -		return cpt_digital_port_connected(encoder);
> > -}
> > -
> > -static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -	u32 bit;
> > -
> > -	switch (encoder->hpd_pin) {
> > -	case HPD_PORT_A:
> > -		bit = BXT_DE_PORT_HP_DDIA;
> > -		break;
> > -	case HPD_PORT_B:
> > -		bit = BXT_DE_PORT_HP_DDIB;
> > -		break;
> > -	case HPD_PORT_C:
> > -		bit = BXT_DE_PORT_HP_DDIC;
> > -		break;
> > -	default:
> > -		MISSING_CASE(encoder->hpd_pin);
> > -		return false;
> > -	}
> > -
> > -	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> > -}
> > -
> > -static bool intel_combo_phy_connected(struct drm_i915_private *dev_priv,
> > -				      enum phy phy)
> > -{
> > -	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> > -		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> > -
> > -	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> > -}
> > -
> > -static bool icp_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> > -	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> > -
> > -	if (intel_phy_is_combo(dev_priv, phy))
> > -		return intel_combo_phy_connected(dev_priv, phy);
> > -	else if (intel_phy_is_tc(dev_priv, phy))
> > -		return intel_tc_port_connected(dig_port);
> > -	else
> > -		MISSING_CASE(encoder->hpd_pin);
> > -
> > -	return false;
> > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> >  }
> >  
> >  /*
> > @@ -5611,44 +5518,15 @@ static bool icp_digital_port_connected(struct intel_encoder *encoder)
> >   *
> >   * Return %true if port is connected, %false otherwise.
> >   */
> > -static bool __intel_digital_port_connected(struct intel_encoder *encoder)
> > -{
> > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > -
> > -	if (HAS_GMCH(dev_priv)) {
> > -		if (IS_GM45(dev_priv))
> > -			return gm45_digital_port_connected(encoder);
> > -		else
> > -			return g4x_digital_port_connected(encoder);
> > -	}
> > -
> > -	if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> > -		return icp_digital_port_connected(encoder);
> > -	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> > -		return spt_digital_port_connected(encoder);
> > -	else if (IS_GEN9_LP(dev_priv))
> > -		return bxt_digital_port_connected(encoder);
> > -	else if (IS_GEN(dev_priv, 8))
> > -		return bdw_digital_port_connected(encoder);
> > -	else if (IS_GEN(dev_priv, 7))
> > -		return ivb_digital_port_connected(encoder);
> > -	else if (IS_GEN(dev_priv, 6))
> > -		return snb_digital_port_connected(encoder);
> > -	else if (IS_GEN(dev_priv, 5))
> > -		return ilk_digital_port_connected(encoder);
> > -
> > -	MISSING_CASE(INTEL_GEN(dev_priv));
> > -	return false;
> > -}
> > -
> >  bool intel_digital_port_connected(struct intel_encoder *encoder)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> >  	bool is_connected = false;
> >  	intel_wakeref_t wakeref;
> >  
> >  	with_intel_display_power(dev_priv, POWER_DOMAIN_DISPLAY_CORE, wakeref)
> > -		is_connected = __intel_digital_port_connected(encoder);
> > +		is_connected = dig_port->connected(encoder);
> >  
> >  	return is_connected;
> >  }
> > @@ -7852,6 +7730,23 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
> >  
> >  	intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> >  
> > +	if (HAS_GMCH(dev_priv)) {
> > +		if (IS_GM45(dev_priv))
> > +			intel_dig_port->connected = gm45_digital_port_connected;
> > +		else
> > +			intel_dig_port->connected = g4x_digital_port_connected;
> > +	} else if (port == PORT_A) {
> > +		if (IS_IVYBRIDGE(dev_priv))
> > +			intel_dig_port->connected = ivb_digital_port_connected;
> > +		else
> > +			intel_dig_port->connected = ilk_digital_port_connected;
> > +	} else {
> > +		if (HAS_PCH_CPT(dev_priv))
> > +			intel_dig_port->connected = cpt_digital_port_connected;
> > +		else
> > +			intel_dig_port->connected = ibx_digital_port_connected;
> > +	}
> > +
> >  	if (port != PORT_A)
> >  		intel_infoframe_init(intel_dig_port);
> >  
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> > index 9b850c11aa78..1e64b4c92eec 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -484,8 +484,9 @@ static bool intel_tc_port_needs_reset(struct intel_digital_port *dig_port)
> >   * connected ports are usable, and avoids exposing to the users objects they
> >   * can't really use.
> >   */
> > -bool intel_tc_port_connected(struct intel_digital_port *dig_port)
> > +bool intel_tc_port_connected(struct intel_encoder *encoder)
> >  {
> > +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> >  	bool is_connected;
> >  
> >  	intel_tc_port_lock(dig_port);
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
> > index 463f1b3c836f..b619e4736f85 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.h
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.h
> > @@ -10,8 +10,9 @@
> >  #include <linux/types.h>
> >  
> >  struct intel_digital_port;
> > +struct intel_encoder;
> >  
> > -bool intel_tc_port_connected(struct intel_digital_port *dig_port);
> > +bool intel_tc_port_connected(struct intel_encoder *encoder);
> >  u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port);
> >  u32 intel_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port);
> >  int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port);
> > -- 
> > 2.24.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: Turn intel_digital_port_connected() in a vfunc
  2020-05-07  6:56     ` Ville Syrjälä
@ 2020-05-07  8:23       ` Imre Deak
  0 siblings, 0 replies; 14+ messages in thread
From: Imre Deak @ 2020-05-07  8:23 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Thu, May 07, 2020 at 09:56:49AM +0300, Ville Syrjälä wrote:
> On Wed, May 06, 2020 at 06:15:28PM +0300, Imre Deak wrote:
> > On Wed, Mar 11, 2020 at 05:54:20PM +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Let's get rid of the platform if ladders in
> > > intel_digital_port_connected() and make it a vfunc. Now the if
> > > ladders are at the encoder initialization which makes them a bit
> > > less convoluted.
> > > 
> > > v2: Add forward decl for intel_encoder in intel_tc.h
> > > v3: Duplicate stuff to avoid exposing platform specific
> > >     functions across files (Jani)
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Nice to see the CPU and PCH handlers in their own vfunc:
> > Reviewed-by: Imre Deak <imre.deak@intel.com>
> > 
> > nit: Looks like you could've also added mcc_digital_port_connected() for
> > PHY_C.
> 
> I suppose. IIRC I originally wrote this before the MCC special
> case was added, and then didn't pay too much attention during the
> rebase. It's all going away in the end though so not sure it's
> worth the hassle to redo this.

Ok, didn't notice that you remove it in patch 3.

> > > ---
> > >  drivers/gpu/drm/i915/display/intel_ddi.c      | 109 +++++++++++++
> > >  .../drm/i915/display/intel_display_types.h    |   1 +
> > >  drivers/gpu/drm/i915/display/intel_dp.c       | 147 +++---------------
> > >  drivers/gpu/drm/i915/display/intel_tc.c       |   3 +-
> > >  drivers/gpu/drm/i915/display/intel_tc.h       |   3 +-
> > >  5 files changed, 135 insertions(+), 128 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > index 73d0f4648c06..c8ceb08f8d05 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > @@ -4343,6 +4343,96 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
> > >  	return state;
> > >  }
> > >  
> > > +static bool lpt_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +	u32 bit;
> > > +
> > > +	switch (encoder->hpd_pin) {
> > > +	case HPD_PORT_B:
> > > +		bit = SDE_PORTB_HOTPLUG_CPT;
> > > +		break;
> > > +	case HPD_PORT_C:
> > > +		bit = SDE_PORTC_HOTPLUG_CPT;
> > > +		break;
> > > +	case HPD_PORT_D:
> > > +		bit = SDE_PORTD_HOTPLUG_CPT;
> > > +		break;
> > > +	default:
> > > +		MISSING_CASE(encoder->hpd_pin);
> > > +		return false;
> > > +	}
> > > +
> > > +	return intel_de_read(dev_priv, SDEISR) & bit;
> > > +}
> > > +
> > > +static bool spt_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +	u32 bit;
> > > +
> > > +	switch (encoder->hpd_pin) {
> > > +	case HPD_PORT_A:
> > > +		bit = SDE_PORTA_HOTPLUG_SPT;
> > > +		break;
> > > +	case HPD_PORT_E:
> > > +		bit = SDE_PORTE_HOTPLUG_SPT;
> > > +		break;
> > > +	default:
> > > +		return lpt_digital_port_connected(encoder);
> > > +	}
> > > +
> > > +	return intel_de_read(dev_priv, SDEISR) & bit;
> > > +}
> > > +
> > > +static bool hsw_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +
> > > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> > > +}
> > > +
> > > +static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +
> > > +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> > > +}
> > > +
> > > +static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +	u32 bit;
> > > +
> > > +	switch (encoder->hpd_pin) {
> > > +	case HPD_PORT_A:
> > > +		bit = BXT_DE_PORT_HP_DDIA;
> > > +		break;
> > > +	case HPD_PORT_B:
> > > +		bit = BXT_DE_PORT_HP_DDIB;
> > > +		break;
> > > +	case HPD_PORT_C:
> > > +		bit = BXT_DE_PORT_HP_DDIC;
> > > +		break;
> > > +	default:
> > > +		MISSING_CASE(encoder->hpd_pin);
> > > +		return false;
> > > +	}
> > > +
> > > +	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> > > +}
> > > +
> > > +static bool icp_digital_port_connected(struct intel_encoder *encoder)
> > > +{
> > > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> > > +
> > > +	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> > > +		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> > > +
> > > +	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> > > +}
> > > +
> > >  static struct intel_connector *
> > >  intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port)
> > >  {
> > > @@ -4534,6 +4624,25 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
> > >  				port_name(port));
> > >  	}
> > >  
> > > +	if (INTEL_GEN(dev_priv) >= 11) {
> > > +		if (intel_phy_is_tc(dev_priv, phy))
> > > +			intel_dig_port->connected = intel_tc_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = icp_digital_port_connected;
> > > +	} else if (IS_GEN9_LP(dev_priv)) {
> > > +		intel_dig_port->connected = bxt_digital_port_connected;
> > > +	} else if (port == PORT_A) {
> > > +		if (INTEL_GEN(dev_priv) >= 8)
> > > +			intel_dig_port->connected = bdw_digital_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = hsw_digital_port_connected;
> > > +	} else {
> > > +		if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> > > +			intel_dig_port->connected = spt_digital_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = lpt_digital_port_connected;
> > > +	}
> > > +
> > >  	intel_infoframe_init(intel_dig_port);
> > >  
> > >  	return;
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> > > index 5e00e611f077..3aab12f69ff8 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > > @@ -1401,6 +1401,7 @@ struct intel_digital_port {
> > >  			       const struct drm_connector_state *conn_state);
> > >  	u32 (*infoframes_enabled)(struct intel_encoder *encoder,
> > >  				  const struct intel_crtc_state *pipe_config);
> > > +	bool (*connected)(struct intel_encoder *encoder);
> > >  };
> > >  
> > >  struct intel_dp_mst_encoder {
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index 0a417cd2af2b..cff14f52c391 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -5447,25 +5447,6 @@ static bool cpt_digital_port_connected(struct intel_encoder *encoder)
> > >  	return intel_de_read(dev_priv, SDEISR) & bit;
> > >  }
> > >  
> > > -static bool spt_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -	u32 bit;
> > > -
> > > -	switch (encoder->hpd_pin) {
> > > -	case HPD_PORT_A:
> > > -		bit = SDE_PORTA_HOTPLUG_SPT;
> > > -		break;
> > > -	case HPD_PORT_E:
> > > -		bit = SDE_PORTE_HOTPLUG_SPT;
> > > -		break;
> > > -	default:
> > > -		return cpt_digital_port_connected(encoder);
> > > -	}
> > > -
> > > -	return intel_de_read(dev_priv, SDEISR) & bit;
> > > -}
> > > -
> > >  static bool g4x_digital_port_connected(struct intel_encoder *encoder)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > @@ -5516,88 +5497,14 @@ static bool ilk_digital_port_connected(struct intel_encoder *encoder)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > >  
> > > -	if (encoder->hpd_pin == HPD_PORT_A)
> > > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> > > -	else
> > > -		return ibx_digital_port_connected(encoder);
> > > -}
> > > -
> > > -static bool snb_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -
> > > -	if (encoder->hpd_pin == HPD_PORT_A)
> > > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> > > -	else
> > > -		return cpt_digital_port_connected(encoder);
> > > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG;
> > >  }
> > >  
> > >  static bool ivb_digital_port_connected(struct intel_encoder *encoder)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > >  
> > > -	if (encoder->hpd_pin == HPD_PORT_A)
> > > -		return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> > > -	else
> > > -		return cpt_digital_port_connected(encoder);
> > > -}
> > > -
> > > -static bool bdw_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -
> > > -	if (encoder->hpd_pin == HPD_PORT_A)
> > > -		return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & GEN8_PORT_DP_A_HOTPLUG;
> > > -	else
> > > -		return cpt_digital_port_connected(encoder);
> > > -}
> > > -
> > > -static bool bxt_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -	u32 bit;
> > > -
> > > -	switch (encoder->hpd_pin) {
> > > -	case HPD_PORT_A:
> > > -		bit = BXT_DE_PORT_HP_DDIA;
> > > -		break;
> > > -	case HPD_PORT_B:
> > > -		bit = BXT_DE_PORT_HP_DDIB;
> > > -		break;
> > > -	case HPD_PORT_C:
> > > -		bit = BXT_DE_PORT_HP_DDIC;
> > > -		break;
> > > -	default:
> > > -		MISSING_CASE(encoder->hpd_pin);
> > > -		return false;
> > > -	}
> > > -
> > > -	return intel_de_read(dev_priv, GEN8_DE_PORT_ISR) & bit;
> > > -}
> > > -
> > > -static bool intel_combo_phy_connected(struct drm_i915_private *dev_priv,
> > > -				      enum phy phy)
> > > -{
> > > -	if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
> > > -		return intel_de_read(dev_priv, SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
> > > -
> > > -	return intel_de_read(dev_priv, SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
> > > -}
> > > -
> > > -static bool icp_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> > > -	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> > > -
> > > -	if (intel_phy_is_combo(dev_priv, phy))
> > > -		return intel_combo_phy_connected(dev_priv, phy);
> > > -	else if (intel_phy_is_tc(dev_priv, phy))
> > > -		return intel_tc_port_connected(dig_port);
> > > -	else
> > > -		MISSING_CASE(encoder->hpd_pin);
> > > -
> > > -	return false;
> > > +	return intel_de_read(dev_priv, DEISR) & DE_DP_A_HOTPLUG_IVB;
> > >  }
> > >  
> > >  /*
> > > @@ -5611,44 +5518,15 @@ static bool icp_digital_port_connected(struct intel_encoder *encoder)
> > >   *
> > >   * Return %true if port is connected, %false otherwise.
> > >   */
> > > -static bool __intel_digital_port_connected(struct intel_encoder *encoder)
> > > -{
> > > -	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > -
> > > -	if (HAS_GMCH(dev_priv)) {
> > > -		if (IS_GM45(dev_priv))
> > > -			return gm45_digital_port_connected(encoder);
> > > -		else
> > > -			return g4x_digital_port_connected(encoder);
> > > -	}
> > > -
> > > -	if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> > > -		return icp_digital_port_connected(encoder);
> > > -	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
> > > -		return spt_digital_port_connected(encoder);
> > > -	else if (IS_GEN9_LP(dev_priv))
> > > -		return bxt_digital_port_connected(encoder);
> > > -	else if (IS_GEN(dev_priv, 8))
> > > -		return bdw_digital_port_connected(encoder);
> > > -	else if (IS_GEN(dev_priv, 7))
> > > -		return ivb_digital_port_connected(encoder);
> > > -	else if (IS_GEN(dev_priv, 6))
> > > -		return snb_digital_port_connected(encoder);
> > > -	else if (IS_GEN(dev_priv, 5))
> > > -		return ilk_digital_port_connected(encoder);
> > > -
> > > -	MISSING_CASE(INTEL_GEN(dev_priv));
> > > -	return false;
> > > -}
> > > -
> > >  bool intel_digital_port_connected(struct intel_encoder *encoder)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > > +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> > >  	bool is_connected = false;
> > >  	intel_wakeref_t wakeref;
> > >  
> > >  	with_intel_display_power(dev_priv, POWER_DOMAIN_DISPLAY_CORE, wakeref)
> > > -		is_connected = __intel_digital_port_connected(encoder);
> > > +		is_connected = dig_port->connected(encoder);
> > >  
> > >  	return is_connected;
> > >  }
> > > @@ -7852,6 +7730,23 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
> > >  
> > >  	intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> > >  
> > > +	if (HAS_GMCH(dev_priv)) {
> > > +		if (IS_GM45(dev_priv))
> > > +			intel_dig_port->connected = gm45_digital_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = g4x_digital_port_connected;
> > > +	} else if (port == PORT_A) {
> > > +		if (IS_IVYBRIDGE(dev_priv))
> > > +			intel_dig_port->connected = ivb_digital_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = ilk_digital_port_connected;
> > > +	} else {
> > > +		if (HAS_PCH_CPT(dev_priv))
> > > +			intel_dig_port->connected = cpt_digital_port_connected;
> > > +		else
> > > +			intel_dig_port->connected = ibx_digital_port_connected;
> > > +	}
> > > +
> > >  	if (port != PORT_A)
> > >  		intel_infoframe_init(intel_dig_port);
> > >  
> > > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> > > index 9b850c11aa78..1e64b4c92eec 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > > @@ -484,8 +484,9 @@ static bool intel_tc_port_needs_reset(struct intel_digital_port *dig_port)
> > >   * connected ports are usable, and avoids exposing to the users objects they
> > >   * can't really use.
> > >   */
> > > -bool intel_tc_port_connected(struct intel_digital_port *dig_port)
> > > +bool intel_tc_port_connected(struct intel_encoder *encoder)
> > >  {
> > > +	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> > >  	bool is_connected;
> > >  
> > >  	intel_tc_port_lock(dig_port);
> > > diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
> > > index 463f1b3c836f..b619e4736f85 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_tc.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_tc.h
> > > @@ -10,8 +10,9 @@
> > >  #include <linux/types.h>
> > >  
> > >  struct intel_digital_port;
> > > +struct intel_encoder;
> > >  
> > > -bool intel_tc_port_connected(struct intel_digital_port *dig_port);
> > > +bool intel_tc_port_connected(struct intel_encoder *encoder);
> > >  u32 intel_tc_port_get_lane_mask(struct intel_digital_port *dig_port);
> > >  u32 intel_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port);
> > >  int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port);
> > > -- 
> > > 2.24.1
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv
  2020-05-07  6:53     ` Ville Syrjälä
@ 2020-05-07  8:48       ` Imre Deak
  0 siblings, 0 replies; 14+ messages in thread
From: Imre Deak @ 2020-05-07  8:48 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Thu, May 07, 2020 at 09:53:13AM +0300, Ville Syrjälä wrote:
> On Wed, May 06, 2020 at 07:03:41PM +0300, Imre Deak wrote:
> > On Wed, Mar 11, 2020 at 05:54:21PM +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Instead of constnantly having to figure out which hpd status bit
> > > array to use let's store them under dev_priv.
> > > 
> > > Should perhaps take this further and stash even more stuff to
> > > make the hpd handling more abstract yet.
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.h |   2 +
> > >  drivers/gpu/drm/i915/i915_irq.c | 198 ++++++++++++++++++--------------
> > >  2 files changed, 111 insertions(+), 89 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > > index 19195bde4921..b5afbabf4c3b 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > @@ -149,6 +149,8 @@ enum hpd_pin {
> > >  struct i915_hotplug {
> > >  	struct delayed_work hotplug_work;
> > >  
> > > +	const u32 *hpd, *pch_hpd;
> > > +
> > >  	struct {
> > >  		unsigned long last_jiffies;
> > >  		int count;
> > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > > index 9f0653cf0510..b95d952bd47d 100644
> > > --- a/drivers/gpu/drm/i915/i915_irq.c
> > > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > > @@ -124,7 +124,6 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
> > >  	[HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS,
> > >  };
> > >  
> > > -/* BXT hpd list */
> > >  static const u32 hpd_bxt[HPD_NUM_PINS] = {
> > >  	[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
> > >  	[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
> > > @@ -168,6 +167,44 @@ static const u32 hpd_tgp[HPD_NUM_PINS] = {
> > >  	[HPD_PORT_I] = SDE_TC_HOTPLUG_ICP(PORT_TC6),
> > >  };
> > >  
> > > +static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
> > > +{
> > > +	struct i915_hotplug *hpd = &dev_priv->hotplug;
> > > +
> > > +	if (HAS_GMCH(dev_priv)) {
> > > +		if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> > > +		    IS_CHERRYVIEW(dev_priv))
> > > +			hpd->hpd = hpd_status_g4x;
> > > +		else
> > > +			hpd->hpd = hpd_status_i915;
> > > +		return;
> > > +	}
> > > +
> > > +	if (INTEL_GEN(dev_priv) >= 12)
> > > +		hpd->hpd = hpd_gen12;
> > > +	else if (INTEL_GEN(dev_priv) >= 11)
> > > +		hpd->hpd = hpd_gen11;
> > > +	else if (IS_GEN9_LP(dev_priv))
> > > +		hpd->hpd = hpd_bxt;
> > > +	else if (INTEL_GEN(dev_priv) >= 8)
> > > +		hpd->hpd = hpd_bdw;
> > > +	else if (INTEL_GEN(dev_priv) >= 7)
> > > +		hpd->hpd = hpd_ivb;
> > > +	else
> > > +		hpd->hpd = hpd_ilk;
> > > +
> > > +	if (HAS_PCH_TGP(dev_priv) || HAS_PCH_JSP(dev_priv))
> > > +		hpd->pch_hpd = hpd_tgp;
> > > +	else if (HAS_PCH_ICP(dev_priv) || HAS_PCH_MCC(dev_priv))
> > > +		hpd->pch_hpd = hpd_icp;
> > > +	else if (HAS_PCH_SPT(dev_priv))
> > 
> > What about CNP?
> 
> Argh. We have too many of these. Do we even need all of them?

Not sure, but atm it's special cased in a few places (ddc/hpd setup, and
rawclk readout). Here it's just the same as SPT.

> > > +		hpd->pch_hpd = hpd_spt;
> > > +	else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_CPT(dev_priv))
> > > +		hpd->pch_hpd = hpd_cpt;
> > > +	else if (HAS_PCH_IBX(dev_priv))
> > > +		hpd->pch_hpd = hpd_ibx;
> > 
> > Can we add MISSING_CASE for PCH platforms?
> 
> else if (HAS_PCH_SPLIT())
> 	MISSING_CASE(INTEL_PCH_TYPE())
> ?

Yes, with && !PCH_NOP.

> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Intel-gfx] [PATCH v4 2/3] drm/i915: Stash hpd status bits under dev_priv
       [not found] ` <20200311155422.3043-3-ville.syrjala@linux.intel.com>
  2020-05-06 16:03   ` [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv Imre Deak
@ 2020-05-07 11:48   ` Ville Syrjala
  2020-05-07 13:02     ` Imre Deak
  1 sibling, 1 reply; 14+ messages in thread
From: Ville Syrjala @ 2020-05-07 11:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Instead of constnantly having to figure out which hpd status bit
array to use let's store them under dev_priv.

Should perhaps take this further and stash even more stuff to
make the hpd handling more abstract yet.

v2: Remeber cnp (Imre)
    Add MISSING_CASE() for unknown PCHs (Imre)

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h |   2 +
 drivers/gpu/drm/i915/i915_irq.c | 203 ++++++++++++++++++--------------
 2 files changed, 116 insertions(+), 89 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6af69555733e..155f3fa3286c 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -148,6 +148,8 @@ enum hpd_pin {
 struct i915_hotplug {
 	struct delayed_work hotplug_work;
 
+	const u32 *hpd, *pch_hpd;
+
 	struct {
 		unsigned long last_jiffies;
 		int count;
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index ea4c87784a27..4dc601dffc08 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -124,7 +124,6 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
 	[HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS,
 };
 
-/* BXT hpd list */
 static const u32 hpd_bxt[HPD_NUM_PINS] = {
 	[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
 	[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
@@ -168,6 +167,49 @@ static const u32 hpd_tgp[HPD_NUM_PINS] = {
 	[HPD_PORT_I] = SDE_TC_HOTPLUG_ICP(PORT_TC6),
 };
 
+static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
+{
+	struct i915_hotplug *hpd = &dev_priv->hotplug;
+
+	if (HAS_GMCH(dev_priv)) {
+		if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
+		    IS_CHERRYVIEW(dev_priv))
+			hpd->hpd = hpd_status_g4x;
+		else
+			hpd->hpd = hpd_status_i915;
+		return;
+	}
+
+	if (INTEL_GEN(dev_priv) >= 12)
+		hpd->hpd = hpd_gen12;
+	else if (INTEL_GEN(dev_priv) >= 11)
+		hpd->hpd = hpd_gen11;
+	else if (IS_GEN9_LP(dev_priv))
+		hpd->hpd = hpd_bxt;
+	else if (INTEL_GEN(dev_priv) >= 8)
+		hpd->hpd = hpd_bdw;
+	else if (INTEL_GEN(dev_priv) >= 7)
+		hpd->hpd = hpd_ivb;
+	else
+		hpd->hpd = hpd_ilk;
+
+	if (!HAS_PCH_SPLIT(dev_priv) || HAS_PCH_NOP(dev_priv))
+		return;
+
+	if (HAS_PCH_TGP(dev_priv) || HAS_PCH_JSP(dev_priv))
+		hpd->pch_hpd = hpd_tgp;
+	else if (HAS_PCH_ICP(dev_priv) || HAS_PCH_MCC(dev_priv))
+		hpd->pch_hpd = hpd_icp;
+	else if (HAS_PCH_CNP(dev_priv) || HAS_PCH_SPT(dev_priv))
+		hpd->pch_hpd = hpd_spt;
+	else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_CPT(dev_priv))
+		hpd->pch_hpd = hpd_cpt;
+	else if (HAS_PCH_IBX(dev_priv))
+		hpd->pch_hpd = hpd_ibx;
+	else
+		MISSING_CASE(INTEL_PCH_TYPE(dev_priv));
+}
+
 static void
 intel_handle_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
@@ -1504,33 +1546,27 @@ static void i9xx_hpd_irq_handler(struct drm_i915_private *dev_priv,
 				 u32 hotplug_status)
 {
 	u32 pin_mask = 0, long_mask = 0;
+	u32 hotplug_trigger;
 
-	if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
-	    IS_CHERRYVIEW(dev_priv)) {
-		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
-
-		if (hotplug_trigger) {
-			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-					   hotplug_trigger, hotplug_trigger,
-					   hpd_status_g4x,
-					   i9xx_port_hotplug_long_detect);
+	if (IS_G4X(dev_priv) ||
+	    IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
+	else
+		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
 
-			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
-		}
+	if (hotplug_trigger) {
+		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+				   hotplug_trigger, hotplug_trigger,
+				   dev_priv->hotplug.hpd,
+				   i9xx_port_hotplug_long_detect);
 
-		if (hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
-			dp_aux_irq_handler(dev_priv);
-	} else {
-		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
-
-		if (hotplug_trigger) {
-			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-					   hotplug_trigger, hotplug_trigger,
-					   hpd_status_i915,
-					   i9xx_port_hotplug_long_detect);
-			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
-		}
+		intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
 	}
+
+	if ((IS_G4X(dev_priv) ||
+	     IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
+	    hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
+		dp_aux_irq_handler(dev_priv);
 }
 
 static irqreturn_t valleyview_irq_handler(int irq, void *arg)
@@ -1696,8 +1732,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)
 }
 
 static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
-				u32 hotplug_trigger,
-				const u32 hpd[HPD_NUM_PINS])
+				u32 hotplug_trigger)
 {
 	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
 
@@ -1720,8 +1755,9 @@ static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
 	if (!hotplug_trigger)
 		return;
 
-	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
-			   dig_hotplug_reg, hpd,
+	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+			   hotplug_trigger, dig_hotplug_reg,
+			   dev_priv->hotplug.pch_hpd,
 			   pch_port_hotplug_long_detect);
 
 	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
@@ -1732,7 +1768,7 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	enum pipe pipe;
 	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK;
 
-	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ibx);
+	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
 
 	if (pch_iir & SDE_AUDIO_POWER_MASK) {
 		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >>
@@ -1820,7 +1856,7 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	enum pipe pipe;
 	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT;
 
-	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_cpt);
+	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
 
 	if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) {
 		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
@@ -1857,22 +1893,18 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	u32 ddi_hotplug_trigger, tc_hotplug_trigger;
 	u32 pin_mask = 0, long_mask = 0;
 	bool (*tc_port_hotplug_long_detect)(enum hpd_pin pin, u32 val);
-	const u32 *pins;
 
 	if (HAS_PCH_TGP(dev_priv)) {
 		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
 		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_TGP;
 		tc_port_hotplug_long_detect = tgp_tc_port_hotplug_long_detect;
-		pins = hpd_tgp;
 	} else if (HAS_PCH_JSP(dev_priv)) {
 		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
 		tc_hotplug_trigger = 0;
-		pins = hpd_tgp;
 	} else if (HAS_PCH_MCC(dev_priv)) {
 		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
 		tc_hotplug_trigger = pch_iir & SDE_TC_HOTPLUG_ICP(PORT_TC1);
 		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
-		pins = hpd_icp;
 	} else {
 		drm_WARN(&dev_priv->drm, !HAS_PCH_ICP(dev_priv),
 			 "Unrecognized PCH type 0x%x\n",
@@ -1881,7 +1913,6 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
 		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_ICP;
 		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
-		pins = hpd_icp;
 	}
 
 	if (ddi_hotplug_trigger) {
@@ -1891,8 +1922,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 		I915_WRITE(SHOTPLUG_CTL_DDI, dig_hotplug_reg);
 
 		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-				   ddi_hotplug_trigger,
-				   dig_hotplug_reg, pins,
+				   ddi_hotplug_trigger, dig_hotplug_reg,
+				   dev_priv->hotplug.pch_hpd,
 				   icp_ddi_port_hotplug_long_detect);
 	}
 
@@ -1903,8 +1934,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 		I915_WRITE(SHOTPLUG_CTL_TC, dig_hotplug_reg);
 
 		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-				   tc_hotplug_trigger,
-				   dig_hotplug_reg, pins,
+				   tc_hotplug_trigger, dig_hotplug_reg,
+				   dev_priv->hotplug.pch_hpd,
 				   tc_port_hotplug_long_detect);
 	}
 
@@ -1929,7 +1960,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 		I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
 
 		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-				   hotplug_trigger, dig_hotplug_reg, hpd_spt,
+				   hotplug_trigger, dig_hotplug_reg,
+				   dev_priv->hotplug.pch_hpd,
 				   spt_port_hotplug_long_detect);
 	}
 
@@ -1940,7 +1972,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 		I915_WRITE(PCH_PORT_HOTPLUG2, dig_hotplug_reg);
 
 		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
-				   hotplug2_trigger, dig_hotplug_reg, hpd_spt,
+				   hotplug2_trigger, dig_hotplug_reg,
+				   dev_priv->hotplug.pch_hpd,
 				   spt_port_hotplug2_long_detect);
 	}
 
@@ -1952,16 +1985,16 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 }
 
 static void ilk_hpd_irq_handler(struct drm_i915_private *dev_priv,
-				u32 hotplug_trigger,
-				const u32 hpd[HPD_NUM_PINS])
+				u32 hotplug_trigger)
 {
 	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
 
 	dig_hotplug_reg = I915_READ(DIGITAL_PORT_HOTPLUG_CNTRL);
 	I915_WRITE(DIGITAL_PORT_HOTPLUG_CNTRL, dig_hotplug_reg);
 
-	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
-			   dig_hotplug_reg, hpd,
+	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+			   hotplug_trigger, dig_hotplug_reg,
+			   dev_priv->hotplug.hpd,
 			   ilk_port_hotplug_long_detect);
 
 	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
@@ -1974,7 +2007,7 @@ static void ilk_display_irq_handler(struct drm_i915_private *dev_priv,
 	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG;
 
 	if (hotplug_trigger)
-		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ilk);
+		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
 
 	if (de_iir & DE_AUX_CHANNEL_A)
 		dp_aux_irq_handler(dev_priv);
@@ -2020,7 +2053,7 @@ static void ivb_display_irq_handler(struct drm_i915_private *dev_priv,
 	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG_IVB;
 
 	if (hotplug_trigger)
-		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ivb);
+		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
 
 	if (de_iir & DE_ERR_INT_IVB)
 		ivb_err_int_handler(dev_priv);
@@ -2130,16 +2163,16 @@ static irqreturn_t ilk_irq_handler(int irq, void *arg)
 }
 
 static void bxt_hpd_irq_handler(struct drm_i915_private *dev_priv,
-				u32 hotplug_trigger,
-				const u32 hpd[HPD_NUM_PINS])
+				u32 hotplug_trigger)
 {
 	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
 
 	dig_hotplug_reg = I915_READ(PCH_PORT_HOTPLUG);
 	I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
 
-	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
-			   dig_hotplug_reg, hpd,
+	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+			   hotplug_trigger, dig_hotplug_reg,
+			   dev_priv->hotplug.hpd,
 			   bxt_port_hotplug_long_detect);
 
 	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
@@ -2151,15 +2184,11 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
 	u32 trigger_tc = iir & GEN11_DE_TC_HOTPLUG_MASK;
 	u32 trigger_tbt = iir & GEN11_DE_TBT_HOTPLUG_MASK;
 	long_pulse_detect_func long_pulse_detect;
-	const u32 *hpd;
 
-	if (INTEL_GEN(dev_priv) >= 12) {
+	if (INTEL_GEN(dev_priv) >= 12)
 		long_pulse_detect = gen12_port_hotplug_long_detect;
-		hpd = hpd_gen12;
-	} else {
+	else
 		long_pulse_detect = gen11_port_hotplug_long_detect;
-		hpd = hpd_gen11;
-	}
 
 	if (trigger_tc) {
 		u32 dig_hotplug_reg;
@@ -2167,8 +2196,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
 		dig_hotplug_reg = I915_READ(GEN11_TC_HOTPLUG_CTL);
 		I915_WRITE(GEN11_TC_HOTPLUG_CTL, dig_hotplug_reg);
 
-		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tc,
-				   dig_hotplug_reg, hpd, long_pulse_detect);
+		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+				   trigger_tc, dig_hotplug_reg,
+				   dev_priv->hotplug.hpd,
+				   long_pulse_detect);
 	}
 
 	if (trigger_tbt) {
@@ -2177,8 +2208,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
 		dig_hotplug_reg = I915_READ(GEN11_TBT_HOTPLUG_CTL);
 		I915_WRITE(GEN11_TBT_HOTPLUG_CTL, dig_hotplug_reg);
 
-		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tbt,
-				   dig_hotplug_reg, hpd, long_pulse_detect);
+		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
+				   trigger_tbt, dig_hotplug_reg,
+				   dev_priv->hotplug.hpd,
+				   long_pulse_detect);
 	}
 
 	if (pin_mask)
@@ -2309,15 +2342,13 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 			if (IS_GEN9_LP(dev_priv)) {
 				tmp_mask = iir & BXT_DE_PORT_HOTPLUG_MASK;
 				if (tmp_mask) {
-					bxt_hpd_irq_handler(dev_priv, tmp_mask,
-							    hpd_bxt);
+					bxt_hpd_irq_handler(dev_priv, tmp_mask);
 					found = true;
 				}
 			} else if (IS_BROADWELL(dev_priv)) {
 				tmp_mask = iir & GEN8_PORT_DP_A_HOTPLUG;
 				if (tmp_mask) {
-					ilk_hpd_irq_handler(dev_priv,
-							    tmp_mask, hpd_bdw);
+					ilk_hpd_irq_handler(dev_priv, tmp_mask);
 					found = true;
 				}
 			}
@@ -2997,13 +3028,12 @@ static void ibx_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
 	u32 hotplug_irqs, enabled_irqs;
 
-	if (HAS_PCH_IBX(dev_priv)) {
+	if (HAS_PCH_IBX(dev_priv))
 		hotplug_irqs = SDE_HOTPLUG_MASK;
-		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ibx);
-	} else {
+	else
 		hotplug_irqs = SDE_HOTPLUG_MASK_CPT;
-		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_cpt);
-	}
+
+	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
 
 	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
 
@@ -3029,13 +3059,12 @@ static void icp_hpd_detection_setup(struct drm_i915_private *dev_priv,
 
 static void icp_hpd_irq_setup(struct drm_i915_private *dev_priv,
 			      u32 sde_ddi_mask, u32 sde_tc_mask,
-			      u32 ddi_enable_mask, u32 tc_enable_mask,
-			      const u32 *pins)
+			      u32 ddi_enable_mask, u32 tc_enable_mask)
 {
 	u32 hotplug_irqs, enabled_irqs;
 
 	hotplug_irqs = sde_ddi_mask | sde_tc_mask;
-	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, pins);
+	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
 
 	I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
 
@@ -3052,8 +3081,7 @@ static void mcc_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
 	icp_hpd_irq_setup(dev_priv,
 			  SDE_DDI_MASK_ICP, SDE_TC_HOTPLUG_ICP(PORT_TC1),
-			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1),
-			  hpd_icp);
+			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1));
 }
 
 /*
@@ -3065,8 +3093,7 @@ static void jsp_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
 	icp_hpd_irq_setup(dev_priv,
 			  SDE_DDI_MASK_TGP, 0,
-			  TGP_DDI_HPD_ENABLE_MASK, 0,
-			  hpd_tgp);
+			  TGP_DDI_HPD_ENABLE_MASK, 0);
 }
 
 static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
@@ -3091,11 +3118,9 @@ static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
 static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
 	u32 hotplug_irqs, enabled_irqs;
-	const u32 *hpd;
 	u32 val;
 
-	hpd = INTEL_GEN(dev_priv) >= 12 ? hpd_gen12 : hpd_gen11;
-	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd);
+	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
 	hotplug_irqs = GEN11_DE_TC_HOTPLUG_MASK | GEN11_DE_TBT_HOTPLUG_MASK;
 
 	val = I915_READ(GEN11_DE_HPD_IMR);
@@ -3107,12 +3132,10 @@ static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
 
 	if (INTEL_PCH_TYPE(dev_priv) >= PCH_TGP)
 		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_TGP, SDE_TC_MASK_TGP,
-				  TGP_DDI_HPD_ENABLE_MASK,
-				  TGP_TC_HPD_ENABLE_MASK, hpd_tgp);
+				  TGP_DDI_HPD_ENABLE_MASK, TGP_TC_HPD_ENABLE_MASK);
 	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
 		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_ICP, SDE_TC_MASK_ICP,
-				  ICP_DDI_HPD_ENABLE_MASK,
-				  ICP_TC_HPD_ENABLE_MASK, hpd_icp);
+				  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE_MASK);
 }
 
 static void spt_hpd_detection_setup(struct drm_i915_private *dev_priv)
@@ -3148,7 +3171,7 @@ static void spt_hpd_irq_setup(struct drm_i915_private *dev_priv)
 		I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
 
 	hotplug_irqs = SDE_HOTPLUG_MASK_SPT;
-	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_spt);
+	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
 
 	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
 
@@ -3177,17 +3200,17 @@ static void ilk_hpd_irq_setup(struct drm_i915_private *dev_priv)
 
 	if (INTEL_GEN(dev_priv) >= 8) {
 		hotplug_irqs = GEN8_PORT_DP_A_HOTPLUG;
-		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bdw);
+		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
 
 		bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
 	} else if (INTEL_GEN(dev_priv) >= 7) {
 		hotplug_irqs = DE_DP_A_HOTPLUG_IVB;
-		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ivb);
+		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
 
 		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
 	} else {
 		hotplug_irqs = DE_DP_A_HOTPLUG;
-		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ilk);
+		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
 
 		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
 	}
@@ -3238,7 +3261,7 @@ static void bxt_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
 	u32 hotplug_irqs, enabled_irqs;
 
-	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bxt);
+	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
 	hotplug_irqs = BXT_DE_PORT_HOTPLUG_MASK;
 
 	bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
@@ -3932,6 +3955,8 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
 	struct drm_device *dev = &dev_priv->drm;
 	int i;
 
+	intel_hpd_init_pins(dev_priv);
+
 	intel_hpd_init_work(dev_priv);
 
 	INIT_WORK(&dev_priv->l3_parity.error_work, ivb_parity_work);
-- 
2.24.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev7)
       [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
                   ` (5 preceding siblings ...)
       [not found] ` <20200311155422.3043-3-ville.syrjala@linux.intel.com>
@ 2020-05-07 12:26 ` Patchwork
  2020-05-07 14:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  7 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-05-07 12:26 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Hotplug cleanups (rev7)
URL   : https://patchwork.freedesktop.org/series/72348/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8442 -> Patchwork_17599
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/index.html

Known issues
------------

  Here are the changes found in Patchwork_17599 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * {igt@kms_flip@basic-flip-vs-wf_vblank@b-dvi-d1}:
    - fi-bwr-2160:        [FAIL][1] ([i915#34]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank@b-dvi-d1.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/fi-bwr-2160/igt@kms_flip@basic-flip-vs-wf_vblank@b-dvi-d1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34


Participating hosts (50 -> 44)
------------------------------

  Additional (1): fi-kbl-7560u 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8442 -> Patchwork_17599

  CI-20190529: 20190529
  CI_DRM_8442: 05cbc9bc4cf15e838086241abfc734022c7adc2e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17599: 84534bb4dc5ed21993fb88de48afa2f8239e6ac1 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

84534bb4dc5e drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected()
2b7a794ec44a drm/i915: Stash hpd status bits under dev_priv
b7c529044516 drm/i915: Turn intel_digital_port_connected() in a vfunc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v4 2/3] drm/i915: Stash hpd status bits under dev_priv
  2020-05-07 11:48   ` [Intel-gfx] [PATCH v4 " Ville Syrjala
@ 2020-05-07 13:02     ` Imre Deak
  0 siblings, 0 replies; 14+ messages in thread
From: Imre Deak @ 2020-05-07 13:02 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, May 07, 2020 at 02:48:08PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Instead of constnantly having to figure out which hpd status bit
> array to use let's store them under dev_priv.
> 
> Should perhaps take this further and stash even more stuff to
> make the hpd handling more abstract yet.
> 
> v2: Remeber cnp (Imre)
>     Add MISSING_CASE() for unknown PCHs (Imre)
> 
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h |   2 +
>  drivers/gpu/drm/i915/i915_irq.c | 203 ++++++++++++++++++--------------
>  2 files changed, 116 insertions(+), 89 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 6af69555733e..155f3fa3286c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -148,6 +148,8 @@ enum hpd_pin {
>  struct i915_hotplug {
>  	struct delayed_work hotplug_work;
>  
> +	const u32 *hpd, *pch_hpd;
> +
>  	struct {
>  		unsigned long last_jiffies;
>  		int count;
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index ea4c87784a27..4dc601dffc08 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -124,7 +124,6 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
>  	[HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS,
>  };
>  
> -/* BXT hpd list */
>  static const u32 hpd_bxt[HPD_NUM_PINS] = {
>  	[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
>  	[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
> @@ -168,6 +167,49 @@ static const u32 hpd_tgp[HPD_NUM_PINS] = {
>  	[HPD_PORT_I] = SDE_TC_HOTPLUG_ICP(PORT_TC6),
>  };
>  
> +static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
> +{
> +	struct i915_hotplug *hpd = &dev_priv->hotplug;
> +
> +	if (HAS_GMCH(dev_priv)) {
> +		if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> +		    IS_CHERRYVIEW(dev_priv))
> +			hpd->hpd = hpd_status_g4x;
> +		else
> +			hpd->hpd = hpd_status_i915;
> +		return;
> +	}
> +
> +	if (INTEL_GEN(dev_priv) >= 12)
> +		hpd->hpd = hpd_gen12;
> +	else if (INTEL_GEN(dev_priv) >= 11)
> +		hpd->hpd = hpd_gen11;
> +	else if (IS_GEN9_LP(dev_priv))
> +		hpd->hpd = hpd_bxt;
> +	else if (INTEL_GEN(dev_priv) >= 8)
> +		hpd->hpd = hpd_bdw;
> +	else if (INTEL_GEN(dev_priv) >= 7)
> +		hpd->hpd = hpd_ivb;
> +	else
> +		hpd->hpd = hpd_ilk;
> +
> +	if (!HAS_PCH_SPLIT(dev_priv) || HAS_PCH_NOP(dev_priv))
> +		return;
> +
> +	if (HAS_PCH_TGP(dev_priv) || HAS_PCH_JSP(dev_priv))
> +		hpd->pch_hpd = hpd_tgp;
> +	else if (HAS_PCH_ICP(dev_priv) || HAS_PCH_MCC(dev_priv))
> +		hpd->pch_hpd = hpd_icp;
> +	else if (HAS_PCH_CNP(dev_priv) || HAS_PCH_SPT(dev_priv))
> +		hpd->pch_hpd = hpd_spt;
> +	else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_CPT(dev_priv))
> +		hpd->pch_hpd = hpd_cpt;
> +	else if (HAS_PCH_IBX(dev_priv))
> +		hpd->pch_hpd = hpd_ibx;
> +	else
> +		MISSING_CASE(INTEL_PCH_TYPE(dev_priv));
> +}
> +
>  static void
>  intel_handle_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
>  {
> @@ -1504,33 +1546,27 @@ static void i9xx_hpd_irq_handler(struct drm_i915_private *dev_priv,
>  				 u32 hotplug_status)
>  {
>  	u32 pin_mask = 0, long_mask = 0;
> +	u32 hotplug_trigger;
>  
> -	if (IS_G4X(dev_priv) || IS_VALLEYVIEW(dev_priv) ||
> -	    IS_CHERRYVIEW(dev_priv)) {
> -		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
> -
> -		if (hotplug_trigger) {
> -			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -					   hotplug_trigger, hotplug_trigger,
> -					   hpd_status_g4x,
> -					   i9xx_port_hotplug_long_detect);
> +	if (IS_G4X(dev_priv) ||
> +	    IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> +		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
> +	else
> +		hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
>  
> -			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> -		}
> +	if (hotplug_trigger) {
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   hotplug_trigger, hotplug_trigger,
> +				   dev_priv->hotplug.hpd,
> +				   i9xx_port_hotplug_long_detect);
>  
> -		if (hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
> -			dp_aux_irq_handler(dev_priv);
> -	} else {
> -		u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
> -
> -		if (hotplug_trigger) {
> -			intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -					   hotplug_trigger, hotplug_trigger,
> -					   hpd_status_i915,
> -					   i9xx_port_hotplug_long_detect);
> -			intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> -		}
> +		intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
>  	}
> +
> +	if ((IS_G4X(dev_priv) ||
> +	     IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> +	    hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
> +		dp_aux_irq_handler(dev_priv);
>  }
>  
>  static irqreturn_t valleyview_irq_handler(int irq, void *arg)
> @@ -1696,8 +1732,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)
>  }
>  
>  static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
> @@ -1720,8 +1755,9 @@ static void ibx_hpd_irq_handler(struct drm_i915_private *dev_priv,
>  	if (!hotplug_trigger)
>  		return;
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.pch_hpd,
>  			   pch_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -1732,7 +1768,7 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	enum pipe pipe;
>  	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK;
>  
> -	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ibx);
> +	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (pch_iir & SDE_AUDIO_POWER_MASK) {
>  		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >>
> @@ -1820,7 +1856,7 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	enum pipe pipe;
>  	u32 hotplug_trigger = pch_iir & SDE_HOTPLUG_MASK_CPT;
>  
> -	ibx_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_cpt);
> +	ibx_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) {
>  		int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
> @@ -1857,22 +1893,18 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  	u32 ddi_hotplug_trigger, tc_hotplug_trigger;
>  	u32 pin_mask = 0, long_mask = 0;
>  	bool (*tc_port_hotplug_long_detect)(enum hpd_pin pin, u32 val);
> -	const u32 *pins;
>  
>  	if (HAS_PCH_TGP(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_TGP;
>  		tc_port_hotplug_long_detect = tgp_tc_port_hotplug_long_detect;
> -		pins = hpd_tgp;
>  	} else if (HAS_PCH_JSP(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
>  		tc_hotplug_trigger = 0;
> -		pins = hpd_tgp;
>  	} else if (HAS_PCH_MCC(dev_priv)) {
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_HOTPLUG_ICP(PORT_TC1);
>  		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
> -		pins = hpd_icp;
>  	} else {
>  		drm_WARN(&dev_priv->drm, !HAS_PCH_ICP(dev_priv),
>  			 "Unrecognized PCH type 0x%x\n",
> @@ -1881,7 +1913,6 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
>  		tc_hotplug_trigger = pch_iir & SDE_TC_MASK_ICP;
>  		tc_port_hotplug_long_detect = icp_tc_port_hotplug_long_detect;
> -		pins = hpd_icp;
>  	}
>  
>  	if (ddi_hotplug_trigger) {
> @@ -1891,8 +1922,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(SHOTPLUG_CTL_DDI, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   ddi_hotplug_trigger,
> -				   dig_hotplug_reg, pins,
> +				   ddi_hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   icp_ddi_port_hotplug_long_detect);
>  	}
>  
> @@ -1903,8 +1934,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(SHOTPLUG_CTL_TC, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   tc_hotplug_trigger,
> -				   dig_hotplug_reg, pins,
> +				   tc_hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   tc_port_hotplug_long_detect);
>  	}
>  
> @@ -1929,7 +1960,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   hotplug_trigger, dig_hotplug_reg, hpd_spt,
> +				   hotplug_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   spt_port_hotplug_long_detect);
>  	}
>  
> @@ -1940,7 +1972,8 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  		I915_WRITE(PCH_PORT_HOTPLUG2, dig_hotplug_reg);
>  
>  		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> -				   hotplug2_trigger, dig_hotplug_reg, hpd_spt,
> +				   hotplug2_trigger, dig_hotplug_reg,
> +				   dev_priv->hotplug.pch_hpd,
>  				   spt_port_hotplug2_long_detect);
>  	}
>  
> @@ -1952,16 +1985,16 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
>  }
>  
>  static void ilk_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
>  	dig_hotplug_reg = I915_READ(DIGITAL_PORT_HOTPLUG_CNTRL);
>  	I915_WRITE(DIGITAL_PORT_HOTPLUG_CNTRL, dig_hotplug_reg);
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.hpd,
>  			   ilk_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -1974,7 +2007,7 @@ static void ilk_display_irq_handler(struct drm_i915_private *dev_priv,
>  	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG;
>  
>  	if (hotplug_trigger)
> -		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ilk);
> +		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (de_iir & DE_AUX_CHANNEL_A)
>  		dp_aux_irq_handler(dev_priv);
> @@ -2020,7 +2053,7 @@ static void ivb_display_irq_handler(struct drm_i915_private *dev_priv,
>  	u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG_IVB;
>  
>  	if (hotplug_trigger)
> -		ilk_hpd_irq_handler(dev_priv, hotplug_trigger, hpd_ivb);
> +		ilk_hpd_irq_handler(dev_priv, hotplug_trigger);
>  
>  	if (de_iir & DE_ERR_INT_IVB)
>  		ivb_err_int_handler(dev_priv);
> @@ -2130,16 +2163,16 @@ static irqreturn_t ilk_irq_handler(int irq, void *arg)
>  }
>  
>  static void bxt_hpd_irq_handler(struct drm_i915_private *dev_priv,
> -				u32 hotplug_trigger,
> -				const u32 hpd[HPD_NUM_PINS])
> +				u32 hotplug_trigger)
>  {
>  	u32 dig_hotplug_reg, pin_mask = 0, long_mask = 0;
>  
>  	dig_hotplug_reg = I915_READ(PCH_PORT_HOTPLUG);
>  	I915_WRITE(PCH_PORT_HOTPLUG, dig_hotplug_reg);
>  
> -	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger,
> -			   dig_hotplug_reg, hpd,
> +	intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +			   hotplug_trigger, dig_hotplug_reg,
> +			   dev_priv->hotplug.hpd,
>  			   bxt_port_hotplug_long_detect);
>  
>  	intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
> @@ -2151,15 +2184,11 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  	u32 trigger_tc = iir & GEN11_DE_TC_HOTPLUG_MASK;
>  	u32 trigger_tbt = iir & GEN11_DE_TBT_HOTPLUG_MASK;
>  	long_pulse_detect_func long_pulse_detect;
> -	const u32 *hpd;
>  
> -	if (INTEL_GEN(dev_priv) >= 12) {
> +	if (INTEL_GEN(dev_priv) >= 12)
>  		long_pulse_detect = gen12_port_hotplug_long_detect;
> -		hpd = hpd_gen12;
> -	} else {
> +	else
>  		long_pulse_detect = gen11_port_hotplug_long_detect;
> -		hpd = hpd_gen11;
> -	}
>  
>  	if (trigger_tc) {
>  		u32 dig_hotplug_reg;
> @@ -2167,8 +2196,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  		dig_hotplug_reg = I915_READ(GEN11_TC_HOTPLUG_CTL);
>  		I915_WRITE(GEN11_TC_HOTPLUG_CTL, dig_hotplug_reg);
>  
> -		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tc,
> -				   dig_hotplug_reg, hpd, long_pulse_detect);
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   trigger_tc, dig_hotplug_reg,
> +				   dev_priv->hotplug.hpd,
> +				   long_pulse_detect);
>  	}
>  
>  	if (trigger_tbt) {
> @@ -2177,8 +2208,10 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
>  		dig_hotplug_reg = I915_READ(GEN11_TBT_HOTPLUG_CTL);
>  		I915_WRITE(GEN11_TBT_HOTPLUG_CTL, dig_hotplug_reg);
>  
> -		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tbt,
> -				   dig_hotplug_reg, hpd, long_pulse_detect);
> +		intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask,
> +				   trigger_tbt, dig_hotplug_reg,
> +				   dev_priv->hotplug.hpd,
> +				   long_pulse_detect);
>  	}
>  
>  	if (pin_mask)
> @@ -2309,15 +2342,13 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
>  			if (IS_GEN9_LP(dev_priv)) {
>  				tmp_mask = iir & BXT_DE_PORT_HOTPLUG_MASK;
>  				if (tmp_mask) {
> -					bxt_hpd_irq_handler(dev_priv, tmp_mask,
> -							    hpd_bxt);
> +					bxt_hpd_irq_handler(dev_priv, tmp_mask);
>  					found = true;
>  				}
>  			} else if (IS_BROADWELL(dev_priv)) {
>  				tmp_mask = iir & GEN8_PORT_DP_A_HOTPLUG;
>  				if (tmp_mask) {
> -					ilk_hpd_irq_handler(dev_priv,
> -							    tmp_mask, hpd_bdw);
> +					ilk_hpd_irq_handler(dev_priv, tmp_mask);
>  					found = true;
>  				}
>  			}
> @@ -2997,13 +3028,12 @@ static void ibx_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
> -	if (HAS_PCH_IBX(dev_priv)) {
> +	if (HAS_PCH_IBX(dev_priv))
>  		hotplug_irqs = SDE_HOTPLUG_MASK;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ibx);
> -	} else {
> +	else
>  		hotplug_irqs = SDE_HOTPLUG_MASK_CPT;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_cpt);
> -	}
> +
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
>  
> @@ -3029,13 +3059,12 @@ static void icp_hpd_detection_setup(struct drm_i915_private *dev_priv,
>  
>  static void icp_hpd_irq_setup(struct drm_i915_private *dev_priv,
>  			      u32 sde_ddi_mask, u32 sde_tc_mask,
> -			      u32 ddi_enable_mask, u32 tc_enable_mask,
> -			      const u32 *pins)
> +			      u32 ddi_enable_mask, u32 tc_enable_mask)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
>  	hotplug_irqs = sde_ddi_mask | sde_tc_mask;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, pins);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
>  
> @@ -3052,8 +3081,7 @@ static void mcc_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	icp_hpd_irq_setup(dev_priv,
>  			  SDE_DDI_MASK_ICP, SDE_TC_HOTPLUG_ICP(PORT_TC1),
> -			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1),
> -			  hpd_icp);
> +			  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1));
>  }
>  
>  /*
> @@ -3065,8 +3093,7 @@ static void jsp_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	icp_hpd_irq_setup(dev_priv,
>  			  SDE_DDI_MASK_TGP, 0,
> -			  TGP_DDI_HPD_ENABLE_MASK, 0,
> -			  hpd_tgp);
> +			  TGP_DDI_HPD_ENABLE_MASK, 0);
>  }
>  
>  static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
> @@ -3091,11 +3118,9 @@ static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)
>  static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
> -	const u32 *hpd;
>  	u32 val;
>  
> -	hpd = INTEL_GEN(dev_priv) >= 12 ? hpd_gen12 : hpd_gen11;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  	hotplug_irqs = GEN11_DE_TC_HOTPLUG_MASK | GEN11_DE_TBT_HOTPLUG_MASK;
>  
>  	val = I915_READ(GEN11_DE_HPD_IMR);
> @@ -3107,12 +3132,10 @@ static void gen11_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  
>  	if (INTEL_PCH_TYPE(dev_priv) >= PCH_TGP)
>  		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_TGP, SDE_TC_MASK_TGP,
> -				  TGP_DDI_HPD_ENABLE_MASK,
> -				  TGP_TC_HPD_ENABLE_MASK, hpd_tgp);
> +				  TGP_DDI_HPD_ENABLE_MASK, TGP_TC_HPD_ENABLE_MASK);
>  	else if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
>  		icp_hpd_irq_setup(dev_priv, SDE_DDI_MASK_ICP, SDE_TC_MASK_ICP,
> -				  ICP_DDI_HPD_ENABLE_MASK,
> -				  ICP_TC_HPD_ENABLE_MASK, hpd_icp);
> +				  ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE_MASK);
>  }
>  
>  static void spt_hpd_detection_setup(struct drm_i915_private *dev_priv)
> @@ -3148,7 +3171,7 @@ static void spt_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  		I915_WRITE(SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
>  
>  	hotplug_irqs = SDE_HOTPLUG_MASK_SPT;
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_spt);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.pch_hpd);
>  
>  	ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
>  
> @@ -3177,17 +3200,17 @@ static void ilk_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  
>  	if (INTEL_GEN(dev_priv) >= 8) {
>  		hotplug_irqs = GEN8_PORT_DP_A_HOTPLUG;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bdw);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	} else if (INTEL_GEN(dev_priv) >= 7) {
>  		hotplug_irqs = DE_DP_A_HOTPLUG_IVB;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ivb);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	} else {
>  		hotplug_irqs = DE_DP_A_HOTPLUG;
> -		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_ilk);
> +		enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  
>  		ilk_update_display_irq(dev_priv, hotplug_irqs, enabled_irqs);
>  	}
> @@ -3238,7 +3261,7 @@ static void bxt_hpd_irq_setup(struct drm_i915_private *dev_priv)
>  {
>  	u32 hotplug_irqs, enabled_irqs;
>  
> -	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, hpd_bxt);
> +	enabled_irqs = intel_hpd_enabled_irqs(dev_priv, dev_priv->hotplug.hpd);
>  	hotplug_irqs = BXT_DE_PORT_HOTPLUG_MASK;
>  
>  	bdw_update_port_irq(dev_priv, hotplug_irqs, enabled_irqs);
> @@ -3932,6 +3955,8 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
>  	struct drm_device *dev = &dev_priv->drm;
>  	int i;
>  
> +	intel_hpd_init_pins(dev_priv);
> +
>  	intel_hpd_init_work(dev_priv);
>  
>  	INIT_WORK(&dev_priv->l3_parity.error_work, ivb_parity_work);
> -- 
> 2.24.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Hotplug cleanups (rev7)
       [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
                   ` (6 preceding siblings ...)
  2020-05-07 12:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev7) Patchwork
@ 2020-05-07 14:14 ` Patchwork
  7 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-05-07 14:14 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Hotplug cleanups (rev7)
URL   : https://patchwork.freedesktop.org/series/72348/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8442_full -> Patchwork_17599_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_17599_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@in-flight-suspend:
    - shard-apl:          [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl7/igt@gem_eio@in-flight-suspend.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl6/igt@gem_eio@in-flight-suspend.html

  * igt@kms_big_fb@linear-32bpp-rotate-0:
    - shard-kbl:          [PASS][3] -> [FAIL][4] ([i915#1119] / [i915#93] / [i915#95])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl2/igt@kms_big_fb@linear-32bpp-rotate-0.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl3/igt@kms_big_fb@linear-32bpp-rotate-0.html

  * igt@kms_color@pipe-a-ctm-green-to-red:
    - shard-skl:          [PASS][5] -> [FAIL][6] ([i915#129])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl5/igt@kms_color@pipe-a-ctm-green-to-red.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl8/igt@kms_color@pipe-a-ctm-green-to-red.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-kbl:          [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +7 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-skl:          [PASS][9] -> [FAIL][10] ([IGT#5])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         [PASS][11] -> [SKIP][12] ([fdo#109349])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-iclb4/igt@kms_dp_dsc@basic-dsc-enable-edp.html

  * igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled:
    - shard-apl:          [PASS][13] -> [FAIL][14] ([i915#52] / [i915#54] / [i915#95])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl1/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl6/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-untiled.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
    - shard-glk:          [PASS][15] -> [FAIL][16] ([i915#49])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-glk4/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-skl:          [PASS][17] -> [FAIL][18] ([i915#1188])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl5/igt@kms_hdr@bpc-switch-suspend.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          [PASS][19] -> [FAIL][20] ([fdo#108145] / [i915#265])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl8/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl2/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [PASS][21] -> [SKIP][22] ([fdo#109441]) +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-iclb4/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_setmode@basic:
    - shard-hsw:          [PASS][23] -> [FAIL][24] ([i915#31])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-hsw1/igt@kms_setmode@basic.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-hsw4/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-skl:          [PASS][25] -> [INCOMPLETE][26] ([i915#69]) +2 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl5/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl8/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-kbl:          [PASS][27] -> [INCOMPLETE][28] ([i915#155] / [i915#794])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl7/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl6/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@kms_cursor_crc@pipe-c-cursor-64x64-random:
    - shard-kbl:          [DMESG-WARN][29] ([i915#78]) -> [PASS][30] +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-64x64-random.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl6/igt@kms_cursor_crc@pipe-c-cursor-64x64-random.html

  * {igt@kms_flip@flip-vs-rmfb-interruptible@c-vga1}:
    - shard-hsw:          [INCOMPLETE][31] ([i915#61]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-hsw7/igt@kms_flip@flip-vs-rmfb-interruptible@c-vga1.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-hsw6/igt@kms_flip@flip-vs-rmfb-interruptible@c-vga1.html

  * {igt@kms_flip@flip-vs-suspend-interruptible@a-dp1}:
    - shard-apl:          [DMESG-WARN][33] ([i915#180]) -> [PASS][34] +3 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * {igt@kms_flip@flip-vs-suspend@a-vga1}:
    - shard-snb:          [DMESG-WARN][35] ([i915#42]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-snb1/igt@kms_flip@flip-vs-suspend@a-vga1.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-snb5/igt@kms_flip@flip-vs-suspend@a-vga1.html

  * igt@kms_hdr@bpc-switch-dpms:
    - shard-skl:          [FAIL][37] ([i915#1188]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-skl7/igt@kms_hdr@bpc-switch-dpms.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-skl6/igt@kms_hdr@bpc-switch-dpms.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [DMESG-WARN][39] ([i915#180]) -> [PASS][40] +6 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [SKIP][41] ([fdo#109441]) -> [PASS][42] +4 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-iclb7/igt@kms_psr@psr2_primary_mmap_cpu.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][43] ([i915#31]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl7/igt@kms_setmode@basic.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl8/igt@kms_setmode@basic.html

  * {igt@perf@blocking-parameterized}:
    - shard-kbl:          [DMESG-WARN][45] ([i915#165]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-kbl2/igt@perf@blocking-parameterized.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-kbl3/igt@perf@blocking-parameterized.html

  
#### Warnings ####

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][47] ([i915#588]) -> [SKIP][48] ([i915#658])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-iclb1/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-tglb:         [FAIL][49] ([i915#454]) -> [SKIP][50] ([i915#468])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-tglb1/igt@i915_pm_dc@dc6-dpms.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-tglb2/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         [SKIP][51] ([i915#468]) -> [FAIL][52] ([i915#454])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-tglb8/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_rpm@modeset-pc8-residency-stress:
    - shard-snb:          [SKIP][53] ([fdo#109271]) -> [INCOMPLETE][54] ([i915#82])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-snb1/igt@i915_pm_rpm@modeset-pc8-residency-stress.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-snb6/igt@i915_pm_rpm@modeset-pc8-residency-stress.html

  * igt@kms_content_protection@lic:
    - shard-apl:          [TIMEOUT][55] ([i915#1319]) -> [FAIL][56] ([fdo#110321])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl1/igt@kms_content_protection@lic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl6/igt@kms_content_protection@lic.html

  * igt@kms_content_protection@srm:
    - shard-apl:          [FAIL][57] ([fdo#110321] / [i915#95]) -> [TIMEOUT][58] ([i915#1319])
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8442/shard-apl1/igt@kms_content_protection@srm.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/shard-apl6/igt@kms_content_protection@srm.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [IGT#5]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/5
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
  [i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#129]: https://gitlab.freedesktop.org/drm/intel/issues/129
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
  [i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
  [i915#1731]: https://gitlab.freedesktop.org/drm/intel/issues/1731
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#42]: https://gitlab.freedesktop.org/drm/intel/issues/42
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
  [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
  [i915#78]: https://gitlab.freedesktop.org/drm/intel/issues/78
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
  [i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8442 -> Patchwork_17599

  CI-20190529: 20190529
  CI_DRM_8442: 05cbc9bc4cf15e838086241abfc734022c7adc2e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5638: 50868ab3c532a86aa147fb555b69a1078c572b13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_17599: 84534bb4dc5ed21993fb88de48afa2f8239e6ac1 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17599/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-05-07 14:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200311155422.3043-1-ville.syrjala@linux.intel.com>
2020-03-11 20:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Hotplug cleanups (rev4) Patchwork
2020-03-20 18:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev6) Patchwork
2020-03-21  0:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
     [not found] ` <20200311155422.3043-2-ville.syrjala@linux.intel.com>
2020-05-06 15:15   ` [Intel-gfx] [PATCH v3 1/3] drm/i915: Turn intel_digital_port_connected() in a vfunc Imre Deak
2020-05-07  6:56     ` Ville Syrjälä
2020-05-07  8:23       ` Imre Deak
     [not found] ` <20200311155422.3043-4-ville.syrjala@linux.intel.com>
2020-05-06 16:32   ` [Intel-gfx] [PATCH v3 3/3] drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected() Imre Deak
     [not found] ` <20200311155422.3043-3-ville.syrjala@linux.intel.com>
2020-05-06 16:03   ` [Intel-gfx] [PATCH v3 2/3] drm/i915: Stash hpd status bits under dev_priv Imre Deak
2020-05-07  6:53     ` Ville Syrjälä
2020-05-07  8:48       ` Imre Deak
2020-05-07 11:48   ` [Intel-gfx] [PATCH v4 " Ville Syrjala
2020-05-07 13:02     ` Imre Deak
2020-05-07 12:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev7) Patchwork
2020-05-07 14:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.