drm/i915: Add TigerLake bandwidth checking
Subsystems (3)
PATCH v2 1/1 drm/i915: Add TigerLake bandwidth checking
Added bandwidth calculation algorithm and checks, similar way as it was done for ICL, some constants were corrected according to BSpec.
v2: Start using same icl_get_bw_info function to avoid
code duplication. Moved mpagesize to memory info related structure as it is now dependant on memory type. Fixed qi.t_bl field assignment.
--- drivers/gpu/drm/i915/display/intel_bw.c | 31 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_bw.c +25 -6
@@ -19,6 +19,7 @@ struct intel_qgv_info {u8 num_points;u8 num_channels;u8 t_bl; +u8 mpagesize;enum intel_dram_type dram_type; };
@@ -56,7 +57,13 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv, qi->num_channels = (val &0xf0 ) >>4 ; qi->num_points = (val &0xf00 ) >>8 ; - qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :8 ; +if (IS_GEN (dev_priv,11 )) { + qi->mpagesize =16 ; + qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :8 ; + }else if (IS_GEN (dev_priv,12 )) { + qi->mpagesize = qi->dram_type ==INTEL_DRAM_DDR4 ?16 :32 ; + qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :16 ; + }return 0 ; }
@@ -132,20 +139,26 @@ static int icl_sagv_max_dclk(const struct intel_qgv_info *qi) }struct intel_sa_info { -u8 deburst, mpagesize, deprogbwlimit, displayrtids; +u16 displayrtids; +u8 deburst, deprogbwlimit; };static const struct intel_sa_info icl_sa_info = { .deburst =8 , - .mpagesize =16 , .deprogbwlimit =25 ,/* GB/s */ .displayrtids =128 , }; -static int icl_get_bw_info (struct drm_i915_private *dev_priv) +static const struct intel_sa_info tgl_sa_info = { + .deburst =16 , + .deprogbwlimit =34 ,/* GB/s */ + .displayrtids =256 , +}; + + +static int icl_get_bw_info (struct drm_i915_private *dev_priv,const struct intel_sa_info *sa) {struct intel_qgv_info qi = {}; -const struct intel_sa_info *sa = &icl_sa_info;bool is_y_tile = true;/* assume y tile may be used */ int num_channels;int deinterleave;
@@ -234,7 +247,9 @@ static unsigned int icl_max_bw(struct drm_i915_private *dev_priv,void intel_bw_init_hw (struct drm_i915_private *dev_priv) {if (IS_GEN (dev_priv,11 )) -icl_get_bw_info (dev_priv); +icl_get_bw_info (dev_priv, &icl_sa_info); +else if (IS_GEN (dev_priv,12 )) +icl_get_bw_info (dev_priv, &tgl_sa_info); } static unsigned int intel_max_data_rate(struct drm_i915_private *dev_priv,
@@ -249,6 +264,10 @@ static unsigned int intel_max_data_rate(struct drm_i915_private *dev_priv,return min3 (icl_max_bw (dev_priv, num_planes,0 ),icl_max_bw (dev_priv, num_planes,1 ),icl_max_bw (dev_priv, num_planes,2 )); + else if (IS_GEN(dev_priv, 12)) + return min3(icl_max_bw(dev_priv, num_planes, 0), + icl_max_bw(dev_priv, num_planes, 1), + icl_max_bw(dev_priv, num_planes, 2)); else return UINT_MAX; }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add TigerLake bandwidth checking (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915: Add TigerLake bandwidth checking (rev2)
URL : https://patchwork.freedesktop.org/series/66817/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 250507d65db1 drm/i915: Add TigerLake bandwidth checking -:69: CHECK:LINE_SPACING: Please don't use multiple blank lines #69: FILE: drivers/gpu/drm/i915/display/intel_bw.c:158: + +
total: 0 errors, 0 warnings, 1 checks, 71 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Add TigerLake bandwidth checking (rev2)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Add TigerLake bandwidth checking (rev2)
URL : https://patchwork.freedesktop.org/series/66817/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6913 -> Patchwork_14441
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_14441:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@kms_chamelium@hdmi-hpd-fast:
- {fi-cml-h}: NOTRUN -> [SKIP][1] +8 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/fi-cml-h/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_14441 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_switch@legacy-render:
- fi-bxt-dsi: [PASS][2] -> [INCOMPLETE][3] ([fdo#103927] / [fdo#111381])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6913/fi-bxt-dsi/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/fi-bxt-dsi/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: [PASS][4] -> [DMESG-WARN][5] ([fdo#106387]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6913/fi-ilk-650/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/fi-ilk-650/igt@[email protected]
#### Possible fixes ####
* igt@gem_render_tiled_blits@basic:
- {fi-tgl-u}: [FAIL][6] -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6913/fi-tgl-u/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/fi-tgl-u/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][8] ([fdo#111407]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6913/fi-kbl-7500u/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/fi-kbl-7500u/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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600
Participating hosts (55 -> 48)
------------------------------
Additional (1): fi-cml-h
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6913 -> Patchwork_14441
CI-20190529: 20190529
CI_DRM_6913: 16f20435633153f7d25a061d9fa339fbc0ec123d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5190: 0e9510b83502af3e230870df2d66d4f68918d3a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14441: 250507d65db179353d74170ffed164ff318a3dae @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
250507d65db1 drm/i915: Add TigerLake bandwidth checking
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14441/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 21 lines · Stanislav Lisovskiy
Added bandwidth calculation algorithm and checks, similar way as it was done for ICL, some constants were corrected according to BSpec.
Signed-off-by Stanislav Lisovskiy <[email protected]>v2: Start using same
icl_get_bw_infofunction to avoid
code duplication. Moved mpagesize to memory info related structure as it is now dependant on memory type. Fixed qi.t_bl field assignment.--- drivers/gpu/drm/i915/display/intel_bw.c | 31 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_bw.c +0
-0
drivers/gpu/drm/i915/display/intel_bw.c struct intel_qgv_info { · line 22
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_bw.c +1
-0@@ -19,6 +19,7 @@ struct intel_qgv_info {u8 num_points;u8 num_channels;u8 t_bl; +u8 mpagesize;
Looks like we're not using this at all. Probably easier to just rip it out entirely.
Quoted 32 lines
drivers/gpu/drm/i915/display/intel_bw.c +9
-3enum intel_dram_type dram_type; };@@ -56,7 +57,13 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv, qi->num_channels = (val &0xf0 ) >>4 ; qi->num_points = (val &0xf00 ) >>8 ; - qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :8 ; +if (IS_GEN (dev_priv,11 )) { + qi->mpagesize =16 ; + qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :8 ; + }else if (IS_GEN (dev_priv,12 )) { + qi->mpagesize = qi->dram_type ==INTEL_DRAM_DDR4 ?16 :32 ; + qi->t_bl = qi->dram_type ==INTEL_DRAM_DDR4 ?4 :16 ; + }return 0 ; }@@ -132,20 +139,26 @@ static int icl_sagv_max_dclk(const struct intel_qgv_info *qi) }struct intel_sa_info { -u8 deburst, mpagesize, deprogbwlimit, displayrtids; +u16 displayrtids; +u8 deburst, deprogbwlimit; };static const struct intel_sa_info icl_sa_info = { .deburst =8 , - .mpagesize =16 , .deprogbwlimit =25 ,/* GB/s */ .displayrtids =128 ,
drivers/gpu/drm/i915/display/intel_bw.c static int icl_sagv_max_dclk(const struct intel_qgv_info *qi) · line 158
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_bw.c +7
-1}; -static int icl_get_bw_info (struct drm_i915_private *dev_priv) +static const struct intel_sa_info tgl_sa_info = { + .deburst =16 , + .deprogbwlimit =34 ,/* GB/s */ + .displayrtids =256 , +}; + +
Double newline. checkpatch should have complained I think.
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_bw.c +1
-1+static int icl_get_bw_info (struct drm_i915_private *dev_priv,const struct intel_sa_info *sa) {struct intel_qgv_info qi = {}; -const struct intel_sa_info *sa = &icl_sa_info;bool is_y_tile = true;/* assume y tile may be used */ int num_channels;int deinterleave;
drivers/gpu/drm/i915/display/intel_bw.c static unsigned int icl_max_bw(struct drm_i915_private *dev_priv, · line 252
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_bw.c +3
-1@@ -234,7 +247,9 @@ static unsigned int icl_max_bw(struct drm_i915_private *dev_priv,void intel_bw_init_hw (struct drm_i915_private *dev_priv) {if (IS_GEN (dev_priv,11 )) -icl_get_bw_info (dev_priv); +icl_get_bw_info (dev_priv, &icl_sa_info); +else if (IS_GEN (dev_priv,12 )) +icl_get_bw_info (dev_priv, &tgl_sa_info);
The usual approach is to put the newer platform first.
drivers/gpu/drm/i915/display/intel_bw.c static unsigned int intel_max_data_rate(struct drm_i915_private *dev_priv, · line 270
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_bw.c +4
-0} static unsigned int intel_max_data_rate(struct drm_i915_private *dev_priv,@@ -249,6 +264,10 @@ static unsigned int intel_max_data_rate(struct drm_i915_private *dev_priv,return min3 (icl_max_bw (dev_priv, num_planes,0 ),icl_max_bw (dev_priv, num_planes,1 ),icl_max_bw (dev_priv, num_planes,2 )); + else if (IS_GEN(dev_priv, 12)) + return min3(icl_max_bw(dev_priv, num_planes, 0), + icl_max_bw(dev_priv, num_planes, 1), + icl_max_bw(dev_priv, num_planes, 2));
Why add another identical branch?
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_bw.c +0
-0else return UINT_MAX ; }Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx