drm/i915/tgl: Program BW_BUDDY registers during display init
Subsystems (3)
PATCH 1/1 drm/i915/tgl: Program BW_BUDDY registers during display init
Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the BW_BUDDY1 and BW_BUDDY2 registers according to the memory configuration during display initialization to take advantage of this capability.
The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future.
Bspec: 49189
Bspec: 49218
--- .../drm/i915/display/intel_display_power.c | 40 +++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++ 2 files changed, 48 insertions(+)
drivers/gpu/drm/i915/display/intel_display_power.c +40 -0
@@ -4781,6 +4781,42 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)intel_combo_phy_uninit (dev_priv); } +struct buddy_page_mask { +u8 num_channels; +enum intel_dram_type type; +u32 page_mask; +}; + +const struct buddy_page_mask tgl_buddy_page_masks[] = { + {1 ,INTEL_DRAM_LPDDR4 ,0xE }, + {1 ,INTEL_DRAM_DDR4 ,0xF }, + {2 ,INTEL_DRAM_LPDDR4 ,0x1C }, + {2 ,INTEL_DRAM_DDR4 ,0x1F }, + {} +}; + +static void tgl_arbiter_init (struct drm_i915_private *dev_priv) +{ +enum intel_dram_type type = dev_priv->dram_info.type; +u8 num_channels = dev_priv->dram_info.num_channels; +const struct buddy_page_mask *table = tgl_buddy_page_masks; +int i; + +for (i =0 ; table[i].page_mask !=0 ; i++) +if (table[i].num_channels == num_channels && + table[i].type == type) +break ; + +if (table[i].page_mask ==0 ) { +DRM_DEBUG_DRIVER ("Unknown memory configuration; disabling address buddy logic.\n" ); +I915_WRITE (BW_BUDDY1_CTL ,BW_BUDDY_DISABLE ); +I915_WRITE (BW_BUDDY2_CTL ,BW_BUDDY_DISABLE ); + }else { +I915_WRITE (BW_BUDDY1_PAGE_MASK , table[i].page_mask); +I915_WRITE (BW_BUDDY2_PAGE_MASK , table[i].page_mask); + } +} +static void icl_display_core_init (struct drm_i915_private *dev_priv,bool resume) {
@@ -4813,6 +4849,10 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,/* 6. Setup MBUS. */ icl_mbus_init (dev_priv); +/* 7. Program arbiter BW_BUDDY registers */ +if (INTEL_GEN (dev_priv) >=12 ) +tgl_arbiter_init (dev_priv); +if (resume && dev_priv->csr.dmc_payload)intel_csr_load_program (dev_priv); }
drivers/gpu/drm/i915/i915_reg.h +8 -0
@@ -7765,6 +7765,14 @@ enum {#define GEN7_MSG_CTL _MMIO(0x45010)#define WAIT_FOR_PCH_RESET_ACK (1 << 1)#define WAIT_FOR_PCH_FLR_ACK (1 << 0) + +#define BW_BUDDY1_CTL _MMIO(0x45140) +#define BW_BUDDY2_CTL _MMIO(0x45150) +#define BW_BUDDY_DISABLE REG_BIT(31) + +#define BW_BUDDY1_PAGE_MASK _MMIO(0x45144) +#define BW_BUDDY2_PAGE_MASK _MMIO(0x45154) +#define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)#define RESET_PCH_HANDSHAKE_ENABLE (1 << 4)
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/tgl: Program BW_BUDDY registers during display init
== Series Details ==
== Series Details ==
Series: drm/i915/tgl: Program BW_BUDDY registers during display init
URL : https://patchwork.freedesktop.org/series/70461/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915/tgl: Program BW_BUDDY registers during display init +drivers/gpu/drm/i915/display/intel_display_power.c:4790:30: warning: symbol 'tgl_buddy_page_masks' was not declared. Should it be static?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/tgl: Program BW_BUDDY registers during display init
In reply to Matt Roper== Series Details ==
== Series Details ==
Series: drm/i915/tgl: Program BW_BUDDY registers during display init
URL : https://patchwork.freedesktop.org/series/70461/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7485 -> Patchwork_15590
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_15590 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_15590, 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_15590/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15590:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_blt:
- fi-byt-j1900: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-byt-j1900/igt@i915_selftest@live_blt.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-byt-j1900/igt@i915_selftest@live_blt.html
Known issues
------------
Here are the changes found in Patchwork_15590 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][3] -> [INCOMPLETE][4] ([i915#694])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
- fi-byt-n2820: [PASS][5] -> [INCOMPLETE][6] ([i915#45])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [PASS][7] -> [DMESG-WARN][8] ([IGT#4] / [i915#263])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-icl-u2/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][9] -> [DMESG-WARN][10] ([i915#44])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-peppy/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-peppy/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6700k2: [PASS][11] -> [INCOMPLETE][12] ([i915#69])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-skl-6700k2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-skl-6700k2/igt@[email protected]
#### Possible fixes ####
* igt@gem_sync@basic-each:
- {fi-tgl-guc}: [INCOMPLETE][13] ([i915#707]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-tgl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-tgl-guc/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [DMESG-WARN][15] ([i915#592]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-skl-6770hq/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-skl-6770hq/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][17] ([i915#563]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-4770/igt@i915_selftest@live_blt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-4770/igt@i915_selftest@live_blt.html
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [FAIL][19] ([i915#49]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-icl-u3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-icl-u3/igt@[email protected]
#### Warnings ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-kbl-x1275/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-kbl-x1275/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +8 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-kbl-x1275/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#4]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/4
[i915#263]: https://gitlab.freedesktop.org/drm/intel/issues/263
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (54 -> 47)
------------------------------
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_7485 -> Patchwork_15590
CI-20190529: 20190529
CI_DRM_7485: e0c1226aa69dcd3c47a7bb2bc0ae2be417f9e14e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5330: 2be94c2fba1cf9b6a3c1df093fa7289b1635b6fb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15590: 6d7253fe11213fa8008741ba1617cc4d1f350455 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
6d7253fe1121 drm/i915/tgl: Program BW_BUDDY registers during display init
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/tgl: Program BW_BUDDY registers during display init
Quoted 30 lines · Patchwork
== Series Details ==
Series: drm/i915/tgl: Program
BW_BUDDYregisters during display init
URL : https://patchwork.freedesktop.org/series/70461/
State : failure== Summary ==
CI Bug Log - changes from
CI_DRM_7485->Patchwork_15590
====================================================Summary
-------**FAILURE**
Serious unknown changes coming with
Patchwork_15590absolutely need to be verified manually.If you think the reported changes have nothing to do with the changes introduced in
Patchwork_15590, 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_15590/index.html
Possible new issues
-------------------Here are the unknown changes that may have been introduced in
Patchwork_15590:
Quoted 8 lines
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_blt:
- fi-byt-j1900: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-byt-j1900/igt@i915_selftest@live_blt.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-byt-j1900/igt@i915_selftest@live_blt.html
Appears to be another GEM selftest false positive. This TGL patch would not cause a failure on BYT. Hitting the retest button.
Matt
Quoted 115 lines
Known issues
------------Here are the changes found in
Patchwork_15590that come from known issues:### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][3] -> [INCOMPLETE][4] ([i915#694])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
- fi-byt-n2820: [PASS][5] -> [INCOMPLETE][6] ([i915#45])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [PASS][7] -> [DMESG-WARN][8] ([IGT#4] / [i915#263])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-icl-u2/igt@[email protected]* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][9] -> [DMESG-WARN][10] ([i915#44])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-peppy/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-peppy/igt@[email protected]* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6700k2: [PASS][11] -> [INCOMPLETE][12] ([i915#69])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-skl-6700k2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-skl-6700k2/igt@[email protected]#### Possible fixes ####
* igt@gem_sync@basic-each:
- {fi-tgl-guc}: [INCOMPLETE][13] ([i915#707]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-tgl-guc/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-tgl-guc/igt@[email protected]* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [DMESG-WARN][15] ([i915#592]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-skl-6770hq/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-skl-6770hq/igt@[email protected]* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][17] ([i915#563]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-hsw-4770/igt@i915_selftest@live_blt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-hsw-4770/igt@i915_selftest@live_blt.html* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [FAIL][19] ([i915#49]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-icl-u3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-icl-u3/igt@[email protected]#### Warnings ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][22] ([i915#62] / [i915#92]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-kbl-x1275/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-kbl-x1275/igt@[email protected]* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92]) -> [DMESG-WARN][24] ([i915#62] / [i915#92] / [i915#95]) +8 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7485/fi-kbl-x1275/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/fi-kbl-x1275/igt@[email protected]{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).[IGT#4]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/4
[i915#263]: https://gitlab.freedesktop.org/drm/intel/issues/263
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#476]: https://gitlab.freedesktop.org/drm/intel/issues/476
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95Participating hosts (54 -> 47)
------------------------------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_7485->Patchwork_15590CI-20190529: 20190529
CI_DRM_7485:e0c1226aa69dcd3c47a7bb2bc0ae2be417f9e14e@git://anongit.freedesktop.org/gfx-ci/linux
IGT_5330:2be94c2fba1cf9b6a3c1df093fa7289b1635b6fb@git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15590:6d7253fe11213fa8008741ba1617cc4d1f350455@git://anongit.freedesktop.org/gfx-ci/linux== Linux commits ==
6d7253fe1121drm/i915/tgl: ProgramBW_BUDDYregisters during display init== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15590/index.html
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/tgl: Program BW_BUDDY registers during display init (rev2)
In reply to Matt Roper== Series Details ==
== Series Details ==
Series: drm/i915/tgl: Program BW_BUDDY registers during display init (rev2)
URL : https://patchwork.freedesktop.org/series/70461/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915/tgl: Program BW_BUDDY registers during display init +drivers/gpu/drm/i915/display/intel_display_power.c:4790:30: warning: symbol 'tgl_buddy_page_masks' was not declared. Should it be static?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/tgl: Program BW_BUDDY registers during display init (rev2)
In reply to Matt Roper== Series Details ==
== Series Details ==
Series: drm/i915/tgl: Program BW_BUDDY registers during display init (rev2)
URL : https://patchwork.freedesktop.org/series/70461/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7486 -> Patchwork_15596
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_15596 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_15596, 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_15596/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15596:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8700k: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
Known issues
------------
Here are the changes found in Patchwork_15596 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-lmem: [PASS][3] -> [DMESG-WARN][4] ([i915#592])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-skl-lmem/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-skl-lmem/igt@[email protected]
* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [PASS][5] -> [INCOMPLETE][6] ([i915#694])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#111407])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live_blt:
- fi-bsw-nick: [DMESG-FAIL][9] ([i915#563]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-bsw-nick/igt@i915_selftest@live_blt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-bsw-nick/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gem_contexts:
- fi-byt-n2820: [INCOMPLETE][11] ([i915#45]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][13] ([i915#44]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-hsw-peppy/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-hsw-peppy/igt@[email protected]
#### Warnings ####
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][15] ([i915#683]) -> [DMESG-FAIL][16] ([i915#563])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-hsw-4770/igt@i915_selftest@live_blt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-hsw-4770/igt@i915_selftest@live_blt.html
* igt@kms_busy@basic-flip-pipe-b:
- fi-kbl-x1275: [DMESG-WARN][17] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][18] ([i915#62] / [i915#92]) +4 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-kbl-x1275/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-kbl-x1275/igt@[email protected]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][19] ([i915#62] / [i915#92]) -> [DMESG-WARN][20] ([i915#62] / [i915#92] / [i915#95]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7486/fi-kbl-x1275/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/fi-kbl-x1275/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#472]: https://gitlab.freedesktop.org/drm/intel/issues/472
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#683]: https://gitlab.freedesktop.org/drm/intel/issues/683
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#710]: https://gitlab.freedesktop.org/drm/intel/issues/710
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (53 -> 47)
------------------------------
Additional (1): fi-cfl-8109u
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_7486 -> Patchwork_15596
CI-20190529: 20190529
CI_DRM_7486: 8bd05bdd30fdd1b56307b780ab0f0e8de878c75a @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5331: dad473697b2e6bb5c45d7fec533b20d5dbe4fa17 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15596: 78d40eb7cbc9d91d16375e92d91720f589dbcc82 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
78d40eb7cbc9 drm/i915/tgl: Program BW_BUDDY registers during display init
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15596/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 58 lines · Matt Roper
Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the
BW_BUDDY1andBW_BUDDY2
registers according to the memory configuration during display initialization to take advantage of this capability.The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future.
Bspec: 49189
Bspec: 49218Cc Stanislav Lisovskiy <[email protected]>Cc Ville Syrjala <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by Matt Roper <[email protected]>--- .../drm/i915/display/intel_display_power.c | 40 +++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++ 2 files changed, 48 insertions(+)drivers/gpu/drm/i915/display/intel_display_power.c +26
-0@@ -4781,6 +4781,42 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)intel_combo_phy_uninit (dev_priv ); } +struct buddy_page_mask { +u8 num_channels; +enum intel_dram_type type; +u32 page_mask; +}; + +const struct buddy_page_mask tgl_buddy_page_masks[] = { + {1 ,INTEL_DRAM_LPDDR4 ,0xE }, + {1 ,INTEL_DRAM_DDR4 ,0xF }, + {2 ,INTEL_DRAM_LPDDR4 ,0x1C }, + {2 ,INTEL_DRAM_DDR4 ,0x1F }, + {} +}; + +static void tgl_arbiter_init (struct drm_i915_private *dev_priv) +{ +enum intel_dram_type type = dev_priv->dram_info.type; +u8 num_channels = dev_priv->dram_info.num_channels; +const struct buddy_page_mask *table = tgl_buddy_page_masks; +int i; + +for (i =0 ; table[i].page_mask !=0 ; i++) +if (table[i].num_channels == num_channels && + table[i].type == type) +break ; +
drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct · line 4820
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_power.c +9
-0+if (table[i].page_mask ==0 ) { + DRM_DEBUG_DRIVER("Unknown memory configuration; disabling address buddy logic.\n"); +I915_WRITE (BW_BUDDY1_CTL ,BW_BUDDY_DISABLE ); +I915_WRITE (BW_BUDDY2_CTL ,BW_BUDDY_DISABLE ); + }else { +I915_WRITE (BW_BUDDY1_PAGE_MASK , table[i].page_mask); +I915_WRITE (BW_BUDDY2_PAGE_MASK , table[i].page_mask); + } +}
Great idea to implement this, I already had actually patch for that for almost a month as were using it for joint debug with Windows team, but was a bit in a doubt whether I can send it because of secrecy issues.
However there is one more thing: it seems that what that there is already a workaround (check BSpec workaround 1409767108), which instructs to set up those in a completely different way from what has been set in BSpec initially.
Stan
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_display_power.c +1
-0+ static void icl_display_core_init(struct drm_i915_private *dev_priv,drivers/gpu/drm/i915/display/intel_display_power.c +4
-0bool resume) {@@ -4813,6 +4849,10 @@ static void icl_display_core_init(structdrm_i915_private *dev_priv,/* 6. Setup MBUS. */ icl_mbus_init (dev_priv ); +/* 7. Program arbiter BW_BUDDY registers */ +if (INTEL_GEN (dev_priv) >=12 ) +tgl_arbiter_init (dev_priv); +if (resume && dev_priv->csr.dmc_payload)intel_csr_load_program (dev_priv);}
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -7765,6 +7765,14 @@ enum {#define GEN7_MSG_CTL _MMIO(0x45010)#define WAIT_FOR_PCH_RESET_ACK (1 << 1)#define WAIT_FOR_PCH_FLR_ACK (1 << 0) +
drivers/gpu/drm/i915/i915_reg.h enum { · line 7778
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +7
-0+#define BW_BUDDY1_CTL _MMIO(0x45140) +#define BW_BUDDY2_CTL _MMIO(0x45150) +#define BW_BUDDY_DISABLE REG_BIT(31) + +#define BW_BUDDY1_PAGE_MASK _MMIO(0x45144) +#define BW_BUDDY2_PAGE_MASK _MMIO(0x45154) +#define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)#define RESET_PCH_HANDSHAKE_ENABLE (1 << 4)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Matt Roper
Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the
BW_BUDDY1andBW_BUDDY2registers according to the memory configuration during display initialization to take advantage of this capability.The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future.
Bspec: 49189
Bspec: 49218Cc Stanislav Lisovskiy <[email protected]>Cc Ville Syrjala <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by Matt Roper <[email protected]>---
.../drm/i915/display/intel_display_power.c| 40 +++++++++++++++++++drivers/gpu/drm/i915/i915_reg.h| 8 ++++2 files changed, 48 insertions(+)drivers/gpu/drm/i915/display/intel_display_power.c +0
-0
drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4785
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power.c +2
-0@@ -4781,6 +4781,42 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)intel_combo_phy_uninit (dev_priv); } +struct buddy_page_mask { +u8 num_channels;
I'd make this a word rather than introducing a hole here just to match the type.
drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4798
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_display_power.c +13
-0+enum intel_dram_type type; +u32 page_mask; +}; + +const struct buddy_page_mask tgl_buddy_page_masks[] = { + {1 ,INTEL_DRAM_LPDDR4 ,0xE }, + {1 ,INTEL_DRAM_DDR4 ,0xF }, + {2 ,INTEL_DRAM_LPDDR4 ,0x1C }, + {2 ,INTEL_DRAM_DDR4 ,0x1F }, + {} +}; + +static void tgl_arbiter_init (struct drm_i915_private *dev_priv)
can we call this something related to bw_buddy? Like tgl_bw_buddy_init() or tgl_bw_buddy_arbiter_init()
Quoted 25 lines
drivers/gpu/drm/i915/display/intel_display_power.c +21
-0+{ +enum intel_dram_type type = dev_priv->dram_info.type; +u8 num_channels = dev_priv->dram_info.num_channels; +const struct buddy_page_mask *table = tgl_buddy_page_masks; +int i; + +for (i =0 ; table[i].page_mask !=0 ; i++) +if (table[i].num_channels == num_channels && + table[i].type == type) +break ; + +if (table[i].page_mask ==0 ) { +DRM_DEBUG_DRIVER ("Unknown memory configuration; disabling address buddy logic.\n" ); +I915_WRITE (BW_BUDDY1_CTL ,BW_BUDDY_DISABLE ); +I915_WRITE (BW_BUDDY2_CTL ,BW_BUDDY_DISABLE ); + }else { +I915_WRITE (BW_BUDDY1_PAGE_MASK , table[i].page_mask); +I915_WRITE (BW_BUDDY2_PAGE_MASK , table[i].page_mask); + } +} +static void icl_display_core_init (struct drm_i915_private *dev_priv,bool resume) {
drivers/gpu/drm/i915/display/intel_display_power.c static void icl_display_core_init(struct drm_i915_private *dev_priv, · line 4854
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display_power.c +3
-0@@ -4813,6 +4849,10 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,/* 6. Setup MBUS. */ icl_mbus_init (dev_priv); +/* 7. Program arbiter BW_BUDDY registers */ +if (INTEL_GEN (dev_priv) >=12 ) +tgl_arbiter_init (dev_priv);
looks sane, but watch out for the WA here.
thanks
Lucas De Marchi
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_display_power.c +1
-0+if (resume && dev_priv->csr.dmc_payload)intel_csr_load_program (dev_priv); }drivers/gpu/drm/i915/i915_reg.h +8
-0@@ -7765,6 +7765,14 @@ enum {#define GEN7_MSG_CTL _MMIO(0x45010)#define WAIT_FOR_PCH_RESET_ACK (1 << 1)#define WAIT_FOR_PCH_FLR_ACK (1 << 0) + +#define BW_BUDDY1_CTL _MMIO(0x45140) +#define BW_BUDDY2_CTL _MMIO(0x45150) +#define BW_BUDDY_DISABLE REG_BIT(31) + +#define BW_BUDDY1_PAGE_MASK _MMIO(0x45144) +#define BW_BUDDY2_PAGE_MASK _MMIO(0x45154) +#define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)#define RESET_PCH_HANDSHAKE_ENABLE (1 << 4)Signature · 1 line
2.23.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 29 lines · Lucas De Marchi
Quoted 28 lines · Matt Roper
Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the
BW_BUDDY1andBW_BUDDY2registers according to the memory configuration during display initialization to take advantage of this capability.The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future.
Bspec: 49189
Bspec: 49218Cc Stanislav Lisovskiy <[email protected]>Cc Ville Syrjala <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by Matt Roper <[email protected]>---
.../drm/i915/display/intel_display_power.c| 40 +++++++++++++++++++drivers/gpu/drm/i915/i915_reg.h| 8 ++++2 files changed, 48 insertions(+)drivers/gpu/drm/i915/display/intel_display_power.c +0
-0@@ -4781,6 +4781,42 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)intel_combo_phy_uninit (dev_priv); }
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4785
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display_power.c +2
-0+struct buddy_page_mask { +u8 num_channels;I'd make this a word rather than introducing a hole here just to match the type.
I'd rather just shrink page_mask and reorder a bit to get a smaller struct. If only we could also make enums take less that 4 bytes. u8/s8 would be more than enough for most enums.
Quoted 81 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display_power.c +3
-0+enum intel_dram_type type; +u32 page_mask; +};drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4798
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_power.c +10
-0+ +const struct buddy_page_mask tgl_buddy_page_masks[] = { + {1 ,INTEL_DRAM_LPDDR4 ,0xE }, + {1 ,INTEL_DRAM_DDR4 ,0xF }, + {2 ,INTEL_DRAM_LPDDR4 ,0x1C }, + {2 ,INTEL_DRAM_DDR4 ,0x1F }, + {} +}; + +static void tgl_arbiter_init (struct drm_i915_private *dev_priv)can we call this something related to
bw_buddy? Liketgl_bw_buddy_init()ortgl_bw_buddy_arbiter_init()Quoted 25 lines
drivers/gpu/drm/i915/display/intel_display_power.c +21
-0+{ +enum intel_dram_type type = dev_priv->dram_info.type; +u8 num_channels = dev_priv->dram_info.num_channels; +const struct buddy_page_mask *table = tgl_buddy_page_masks; +int i; + +for (i =0 ; table[i].page_mask !=0 ; i++) +if (table[i].num_channels == num_channels && + table[i].type == type) +break ; + +if (table[i].page_mask ==0 ) { +DRM_DEBUG_DRIVER ("Unknown memory configuration; disabling address buddy logic.\n" ); +I915_WRITE (BW_BUDDY1_CTL ,BW_BUDDY_DISABLE ); +I915_WRITE (BW_BUDDY2_CTL ,BW_BUDDY_DISABLE ); + }else { +I915_WRITE (BW_BUDDY1_PAGE_MASK , table[i].page_mask); +I915_WRITE (BW_BUDDY2_PAGE_MASK , table[i].page_mask); + } +} +static void icl_display_core_init (struct drm_i915_private *dev_priv,bool resume) {drivers/gpu/drm/i915/display/intel_display_power.c static void icl_display_core_init(struct drm_i915_private *dev_priv, · line 4854
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display_power.c +3
-0@@ -4813,6 +4849,10 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,/* 6. Setup MBUS. */ icl_mbus_init (dev_priv); +/* 7. Program arbiter BW_BUDDY registers */ +if (INTEL_GEN (dev_priv) >=12 ) +tgl_arbiter_init (dev_priv);looks sane, but watch out for the WA here.
thanks
Lucas De MarchiQuoted 26 lines
drivers/gpu/drm/i915/display/intel_display_power.c +1
-0+if (resume && dev_priv->csr.dmc_payload)intel_csr_load_program (dev_priv); }drivers/gpu/drm/i915/i915_reg.h +8
-0@@ -7765,6 +7765,14 @@ enum {#define GEN7_MSG_CTL _MMIO(0x45010)#define WAIT_FOR_PCH_RESET_ACK (1 << 1)#define WAIT_FOR_PCH_FLR_ACK (1 << 0) + +#define BW_BUDDY1_CTL _MMIO(0x45140) +#define BW_BUDDY2_CTL _MMIO(0x45150) +#define BW_BUDDY_DISABLE REG_BIT(31) + +#define BW_BUDDY1_PAGE_MASK _MMIO(0x45144) +#define BW_BUDDY2_PAGE_MASK _MMIO(0x45154) +#define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)#define RESET_PCH_HANDSHAKE_ENABLE (1 << 4)Signature · 1 line
2.23.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 36 lines · Ville Syrjälä
Quoted 29 lines · Lucas De Marchi
Quoted 28 lines · Matt Roper
Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the
BW_BUDDY1andBW_BUDDY2registers according to the memory configuration during display initialization to take advantage of this capability.The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future.
Bspec: 49189
Bspec: 49218Cc Stanislav Lisovskiy <[email protected]>Cc Ville Syrjala <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by Matt Roper <[email protected]>---
.../drm/i915/display/intel_display_power.c| 40 +++++++++++++++++++drivers/gpu/drm/i915/i915_reg.h| 8 ++++2 files changed, 48 insertions(+)drivers/gpu/drm/i915/display/intel_display_power.c +0
-0@@ -4781,6 +4781,42 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)intel_combo_phy_uninit (dev_priv); }Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4785
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display_power.c +2
-0+struct buddy_page_mask { +u8 num_channels;I'd make this a word rather than introducing a hole here just to match the type.
Quoted 3 lines
I'd rather just shrink
page_maskand reorder a bit to get a smaller struct. If only we could also make enums take less that 4 bytes. u8/s8 would be more than enough for most enums.
we can, unfortunately that would need to be definition rather than declaration. This works for me:
enum __packed bla {
...
};But this doesn't if the enum wasn't defined as packed:
enum __packed bla bla;
Lucas De Marchi
Quoted 79 lines
Quoted 79 lines
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_power.c +3
-0+enum intel_dram_type type; +u32 page_mask; +};drivers/gpu/drm/i915/display/intel_display_power.c static void cnl_display_core_uninit(struct drm_i915_private *dev_priv) · line 4798
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display_power.c +10
-0+ +const struct buddy_page_mask tgl_buddy_page_masks[] = { + {1 ,INTEL_DRAM_LPDDR4 ,0xE }, + {1 ,INTEL_DRAM_DDR4 ,0xF }, + {2 ,INTEL_DRAM_LPDDR4 ,0x1C }, + {2 ,INTEL_DRAM_DDR4 ,0x1F }, + {} +}; + +static void tgl_arbiter_init (struct drm_i915_private *dev_priv)can we call this something related to
bw_buddy? Liketgl_bw_buddy_init()ortgl_bw_buddy_arbiter_init()Quoted 25 lines
drivers/gpu/drm/i915/display/intel_display_power.c +21
-0+{ +enum intel_dram_type type = dev_priv->dram_info.type; +u8 num_channels = dev_priv->dram_info.num_channels; +const struct buddy_page_mask *table = tgl_buddy_page_masks; +int i; + +for (i =0 ; table[i].page_mask !=0 ; i++) +if (table[i].num_channels == num_channels && + table[i].type == type) +break ; + +if (table[i].page_mask ==0 ) { +DRM_DEBUG_DRIVER ("Unknown memory configuration; disabling address buddy logic.\n" ); +I915_WRITE (BW_BUDDY1_CTL ,BW_BUDDY_DISABLE ); +I915_WRITE (BW_BUDDY2_CTL ,BW_BUDDY_DISABLE ); + }else { +I915_WRITE (BW_BUDDY1_PAGE_MASK , table[i].page_mask); +I915_WRITE (BW_BUDDY2_PAGE_MASK , table[i].page_mask); + } +} +static void icl_display_core_init (struct drm_i915_private *dev_priv,bool resume) {drivers/gpu/drm/i915/display/intel_display_power.c static void icl_display_core_init(struct drm_i915_private *dev_priv, · line 4854
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display_power.c +3
-0@@ -4813,6 +4849,10 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,/* 6. Setup MBUS. */ icl_mbus_init (dev_priv); +/* 7. Program arbiter BW_BUDDY registers */ +if (INTEL_GEN (dev_priv) >=12 ) +tgl_arbiter_init (dev_priv);looks sane, but watch out for the WA here.
thanks
Lucas De MarchiQuoted 23 lines
drivers/gpu/drm/i915/display/intel_display_power.c +1
-0+if (resume && dev_priv->csr.dmc_payload)intel_csr_load_program (dev_priv); }drivers/gpu/drm/i915/i915_reg.h +8
-0@@ -7765,6 +7765,14 @@ enum {#define GEN7_MSG_CTL _MMIO(0x45010)#define WAIT_FOR_PCH_RESET_ACK (1 << 1)#define WAIT_FOR_PCH_FLR_ACK (1 << 0) + +#define BW_BUDDY1_CTL _MMIO(0x45140) +#define BW_BUDDY2_CTL _MMIO(0x45150) +#define BW_BUDDY_DISABLE REG_BIT(31) + +#define BW_BUDDY1_PAGE_MASK _MMIO(0x45144) +#define BW_BUDDY2_PAGE_MASK _MMIO(0x45154) +#define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)#define RESET_PCH_HANDSHAKE_ENABLE (1 << 4)
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
--
2.23.0Signature · 2 lines
Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx