drm/i915: Enable second dbuf slice for ICL and TGL
Subsystems (3)
PATCH v4 1/1 drm/i915: Enable second dbuf slice for ICL and TGL
Also implemented algorithm for choosing DBuf slice configuration based on active pipes, pipe ratio as stated in BSpec 12716.
Now pipe allocation still stays proportional to pipe width as before, however within allowed DBuf slice for this particular configuration.
v2: Remove unneeded check from commit as ddb enabled slices might
now differ from hw state.
v3: - Added new field "supported_slices" to ddb to separate max
supported slices vs currently enabled, to avoid confusion.
- Removed obsolete comments and code related to DBuf(Matthew Roper).
- Some code style and long line removal(Matthew Roper).
- Added WARN_ON to new ddb range offset calc function(Matthew Roper).
- Removed platform specific call to calc pipe ratio from ddb allocation function and fixed the return value(Matthew Roper)
- Refactored DBUF slice allocation table to improve readability
- Added DBUF slice allocation for TGL as well.
- ICL(however not TGL) seems to voluntarily enable second DBuf slice after pm suspend/resume causing a mismatch failure, because we update DBuf slices only if we do a modeset, however this check is done always. Fixed it to be done only when modeset for ICL.
v4: - Now enabled slices is not actually a number, but a bitmask,
because we might need to enable second slice only and number of slices would still 1 and that current code doesn't allow.
- Remove redundant duplicate code to have some unified way of enabling dbuf slices instead of hardcoding.
--- drivers/gpu/drm/i915/display/intel_display.c | 22 +- .../drm/i915/display/intel_display_power.c | 83 ++-- .../drm/i915/display/intel_display_power.h | 2 + drivers/gpu/drm/i915/i915_drv.c | 5 + drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_reg.h | 2 + drivers/gpu/drm/i915/intel_pm.c | 391 ++++++++++++++++-- 7 files changed, 422 insertions(+), 86 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +14 -8
@@ -13386,8 +13386,9 @@ static void verify_wm_state(struct intel_crtc *crtc, sw_ddb = &dev_priv->wm.skl_hw.ddb;if (INTEL_GEN (dev_priv) >=11 && - hw->ddb.enabled_slices != sw_ddb->enabled_slices) -DRM_ERROR ("mismatch in DBUF Slices (expected %u, got %u)\n" , + hw->ddb.enabled_slices != sw_ddb->enabled_slices && +needs_modeset (new_crtc_state)) +DRM_ERROR ("mismatch in DBUF Slices (expected %x, got %x)\n" , sw_ddb->enabled_slices, hw->ddb.enabled_slices);
@@ -14613,16 +14614,21 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)int i;u8 hw_enabled_slices = dev_priv->wm.skl_hw.ddb.enabled_slices;u8 required_slices = state->wm_results.ddb.enabled_slices; -struct skl_ddb_entry entries[I915_MAX_PIPES ] = {}; +u8 slices_union = hw_enabled_slices | required_slices; +u8 slices_intersection = slices_union & required_slices; +struct skl_ddb_entry entries[I915_MAX_PIPES ] = {};for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i)/* ignore allocations for crtc's that have been turned off. */ if (new_crtc_state->hw.active) entries[i] = old_crtc_state->wm.skl.ddb; -/* If 2nd DBuf slice required, enable it here */ -if (INTEL_GEN (dev_priv) >=11 && required_slices > hw_enabled_slices) -icl_dbuf_slices_update (dev_priv, required_slices); +DRM_DEBUG_KMS ("DBuf req slices %d hw slices %d\n" , + required_slices, hw_enabled_slices); + +/* If some other DBuf slice required, enable it here */ +if (INTEL_GEN (dev_priv) >=11 && required_slices != hw_enabled_slices) +icl_dbuf_slices_update (dev_priv, slices_union);/* * Whenever the number of active pipes changes, we need to make sure we
@@ -14682,8 +14688,8 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) }while (progress);/* If 2nd DBuf slice is no more required disable it */ -if (INTEL_GEN (dev_priv) >=11 && required_slices < hw_enabled_slices) -icl_dbuf_slices_update (dev_priv, required_slices); +if (INTEL_GEN (dev_priv) >=11 && required_slices != hw_enabled_slices) +icl_dbuf_slices_update (dev_priv, slices_intersection); }static void intel_atomic_helper_free_state (struct drm_i915_private *dev_priv)
drivers/gpu/drm/i915/display/intel_display_power.c +43 -40
114 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_display_power.h +2 -0
@@ -311,8 +311,10 @@ intel_display_power_put_async(struct drm_i915_private *i915,for ((wf) =intel_display_power_get ((i915), (domain)); (wf); \intel_display_power_put_async ((i915), (domain), (wf)), (wf) =0 ) +u8 intel_dbuf_max_slices(struct drm_i915_private *dev_priv);void icl_dbuf_slices_update (struct drm_i915_private *dev_priv,u8 req_slices); +void icl_dbuf_slices_restore (struct drm_i915_private *dev_priv);void chv_phy_powergate_lanes (struct intel_encoder *encoder,bool override,unsigned int mask);
drivers/gpu/drm/i915/i915_drv.c +5 -0
@@ -51,6 +51,7 @@#include "display/intel_bw.h" #include "display/intel_cdclk.h" #include "display/intel_display_types.h" +#include "display/intel_display_power.h" #include "display/intel_dp.h" #include "display/intel_fbdev.h" #include "display/intel_hotplug.h"
@@ -2588,6 +2589,10 @@ static int intel_runtime_resume(struct device *kdev)if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) ret =vlv_resume_prepare (dev_priv, true); +/* Weird hack to fix ICL hardware bug, as it resets DBUF slices reg */ +if (INTEL_GEN (dev_priv) ==11 ) +icl_dbuf_slices_restore (dev_priv); +intel_uncore_runtime_resume (&dev_priv->uncore);intel_runtime_pm_enable_interrupts (dev_priv);
drivers/gpu/drm/i915/i915_drv.h +2 -1
@@ -804,7 +804,8 @@ static inline bool skl_ddb_entry_equal(const struct skl_ddb_entry *e1, }struct skl_ddb_allocation { -u8 enabled_slices;/* GEN11 has configurable 2 slices */ +u8 enabled_slices;/* Bitmask of currently enabled DBuf slices */ +u8 supported_slices;/* GEN 11 supports 2 slices */ };struct skl_ddb_values {
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -7734,6 +7734,8 @@ enum {#define DISP_ARB_CTL2 _MMIO(0x45004)#define DISP_DATA_PARTITION_5_6 (1 << 6)#define DISP_IPC_ENABLE (1 << 3) +#define DBUF_S1_BIT 1 +#define DBUF_S2_BIT 2#define DBUF_CTL _MMIO(0x45008)#define DBUF_CTL_S1 _MMIO(0x45008)#define DBUF_CTL_S2 _MMIO(0x44FE8)
drivers/gpu/drm/i915/intel_pm.c +354 -37
476 lines not on this page · raw message
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: Enable second dbuf slice for ICL and TGL
== Series Details ==
== Series Details ==
Series: drm/i915: Enable second dbuf slice for ICL and TGL
URL : https://patchwork.freedesktop.org/series/69124/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 2fdfc3b51c5b drm/i915: Enable second dbuf slice for ICL and TGL -:221: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 0) #221: FILE: drivers/gpu/drm/i915/display/intel_display_power.h:311: for ((wf) = intel_display_power_get((i915), (domain)); (wf); \ [...] +u8 intel_dbuf_max_slices(struct drm_i915_private *dev_priv);
-:467: WARNING:LINE_CONTINUATIONS: Avoid unnecessary line continuations #467: FILE: drivers/gpu/drm/i915/intel_pm.c:3953:
+ u32 pipe_dbuf_slice_mask = \
-:469: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #469: FILE: drivers/gpu/drm/i915/intel_pm.c:3955:
+ i915_get_allowed_dbuf_mask(dev_priv,
+ pipe,
-:585: CHECK:LINE_SPACING: Please don't use multiple blank lines #585: FILE: drivers/gpu/drm/i915/intel_pm.c:4303:
+
+
-:589: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #589: FILE: drivers/gpu/drm/i915/intel_pm.c:4307:
+ DRM_DEBUG_KMS("Pipe %d downscale amount %d.%d\n",
+ crtc->pipe, pipe_downscale.val >> 16,
-:608: CHECK:LINE_SPACING: Please don't use multiple blank lines #608: FILE: drivers/gpu/drm/i915/intel_pm.c:4326:
+
+
-:609: CHECK:CAMELCASE: Avoid CamelCase: <DBuf1>
#609: FILE: drivers/gpu/drm/i915/intel_pm.c:4327:
+#define ICL_PIPE_A_DBUF_SLICES(DBuf1) \
-:617: CHECK:CAMELCASE: Avoid CamelCase: <DBuf2>
#617: FILE: drivers/gpu/drm/i915/intel_pm.c:4335:
+#define ICL_PIPE_AB_DBUF_SLICES(DBuf1, DBuf2) \
-:629: CHECK:CAMELCASE: Avoid CamelCase: <DBuf3> #629: FILE: drivers/gpu/drm/i915/intel_pm.c:4347:
+#define ICL_PIPE_ABC_DBUF_SLICES(DBuf1, DBuf2, DBuf3) \
-:639: CHECK:CAMELCASE: Avoid CamelCase: <DBuf4>
#639: FILE: drivers/gpu/drm/i915/intel_pm.c:4357:
+#define ICL_PIPE_ABCD_DBUF_SLICES(DBuf1, DBuf2, DBuf3, DBuf4) \
-:748: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #748: FILE: drivers/gpu/drm/i915/intel_pm.c:4466:
+u32 i915_get_allowed_dbuf_mask(struct drm_i915_private *dev_priv,
+ int pipe, u32 active_pipes,
total: 0 errors, 2 warnings, 9 checks, 680 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for drm/i915: Enable second dbuf slice for ICL and TGL
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Enable second dbuf slice for ICL and TGL
URL : https://patchwork.freedesktop.org/series/69124/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915: Enable second dbuf slice for ICL and TGL +drivers/gpu/drm/i915/intel_pm.c:4253:1: warning: symbol 'skl_pipe_downscale_amount' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_pm.c:4274:1: warning: symbol 'icl_get_pipe_ratio' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_pm.c:4371:30: warning: symbol 'icl_allowed_dbufs' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_pm.c:4395:30: warning: symbol 'tgl_allowed_dbufs' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_pm.c:4465:5: warning: symbol 'i915_get_allowed_dbuf_mask' was not declared. Should it be static?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Enable second dbuf slice for ICL and TGL
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Enable second dbuf slice for ICL and TGL
URL : https://patchwork.freedesktop.org/series/69124/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7288 -> Patchwork_15174
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_15174 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_15174, 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_15174/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_15174:
### IGT changes ###
#### Possible regressions ####
* igt@kms_busy@basic-flip-c:
- fi-icl-dsi: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-icl-dsi/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-icl-dsi/igt@[email protected]
- fi-icl-u4: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-icl-u4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-icl-u4/igt@[email protected]
- fi-icl-u3: [PASS][5] -> [DMESG-WARN][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-icl-u3/igt@[email protected]
- fi-icl-guc: [PASS][7] -> [DMESG-WARN][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-icl-guc/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-icl-guc/igt@[email protected]
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-icl-u2/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_15174 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@gem_exec_create@basic:
- {fi-tgl-u}: [INCOMPLETE][11] ([fdo#111736]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-tgl-u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-tgl-u/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- fi-cml-s: [DMESG-WARN][13] ([fdo#111764]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-cml-s/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-cml-s/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][15] ([fdo#111407]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-kbl-7500u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-kbl-7500u/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6700k2: [INCOMPLETE][17] ([fdo#104108]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7288/fi-skl-6700k2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/fi-skl-6700k2/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#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
[fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
Participating hosts (51 -> 44)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-byt-clapper
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7288 -> Patchwork_15174
CI-20190529: 20190529
CI_DRM_7288: 41eb27f39e60d822edc75e6aaeb416b72bc1dcf2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5266: 60a67653613c87a69ebecf12cf00aa362ac87597 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15174: 2fdfc3b51c5b0bcac8efab38bf28704298f6e9f7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
2fdfc3b51c5b drm/i915: Enable second dbuf slice for ICL and TGL
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15174/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx