Skip to contentSkip to conversation

drm/i915/lnl: Block pkgC entry for performance improvemnt

PATCH New Animesh Manna 2 participants 2 messages Jan 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/lnl: Block pkgC entry for performance improvemnt

For High refresh rates usages, Vblank is required to be really small. It cannot accommodate PKGC exit delay after framestart. Block PKGC till next framestart which will be set by software and later will be cleared by HW at framestart.

---
 drivers/gpu/drm/i915/display/intel_display.c  |  3 +++
 drivers/gpu/drm/i915/display/intel_dmc.c      | 15 +++++++++++++++
 drivers/gpu/drm/i915/display/intel_dmc.h      |  1 +
 drivers/gpu/drm/i915/display/intel_dmc_regs.h |  5 +++++
 4 files changed, 24 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +3 -0
index c6680ee2127c..928db551c685 100644
@@ -7421,6 +7421,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
 
 	drm_atomic_helper_commit_hw_done(&state->base);
 
+	if (DISPLAY_VER(dev_priv) >= 20)
+		intel_dmc_block_pkgc(dev_priv);
+
 	if (state->modeset) {
 		/* As one of the primary mmio accessors, KMS has a high
 		 * likelihood of triggering bugs in unclaimed access. After we
drivers/gpu/drm/i915/display/intel_dmc.c +15 -0
index 51e0463518fb..2f86fc5f5f32 100644
@@ -1247,3 +1247,18 @@ void intel_dmc_debugfs_register(struct drm_i915_private *i915)
 	debugfs_create_file("i915_dmc_info", 0444, minor->debugfs_root,
 			    i915, &intel_dmc_debugfs_status_fops);
 }
+
+void intel_dmc_block_pkgc(struct drm_i915_private *i915)
+{
+	u32 pkgc_ctrl;
+
+	if (HAS_DMC(i915)) {
+		pkgc_ctrl = intel_de_read(i915, DMC_BLOCK_PKGC);
+		pkgc_ctrl |= DMC_BLOCK_PKGC_ENABLE;
+		intel_de_write(i915, DMC_BLOCK_PKGC, pkgc_ctrl);
+	} else {
+		pkgc_ctrl = intel_de_read(i915, DMC_BLOCK_PKGC_SW);
+		pkgc_ctrl |= DMC_BLOCK_PKGC_ENABLE;
+		intel_de_write(i915, DMC_BLOCK_PKGC_SW, pkgc_ctrl);
+	}
+}
drivers/gpu/drm/i915/display/intel_dmc.h +1 -0
index fd607afff2ef..6c2fcaea4c0d 100644
@@ -24,6 +24,7 @@ bool intel_dmc_has_payload(struct drm_i915_private *i915);
 void intel_dmc_debugfs_register(struct drm_i915_private *i915);
 void intel_dmc_print_error_state(struct drm_i915_error_state_buf *m,
 				 struct drm_i915_private *i915);
+void intel_dmc_block_pkgc(struct drm_i915_private *i915);
 
 void assert_dmc_loaded(struct drm_i915_private *i915);
 
drivers/gpu/drm/i915/display/intel_dmc_regs.h +5 -0
index cf10094acae3..2d52fe7f3450 100644
@@ -80,6 +80,11 @@
 #define ADLP_PIPE_MMIO_START		0x5F000
 #define ADLP_PIPE_MMIO_END		0x5FFFF
 
+#define DMC_BLOCK_PKGC		_MMIO(0x8F1C0)
+#define DMC_BLOCK_PKGC_SW	_MMIO(0x8F1C4)
+
+#define DMC_BLOCK_PKGC_ENABLE	REG_BIT(31)
+
 #define TGL_PIPE_MMIO_START(dmc_id)	_PICK_EVEN(((dmc_id) - 1), _TGL_PIPEA_MMIO_START,\
 					      _TGL_PIPEB_MMIO_START)
 
Signature · 1 line
2.29.0
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/lnl: Block pkgC entry for performance improvemnt

== Series Details ==

== Series Details ==

Series: drm/i915/lnl: Block pkgC entry for performance improvemnt
URL : https://patchwork.freedesktop.org/series/128863/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14129 -> Patchwork_128863v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_128863v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_128863v1, please notify your bug team ([email protected]) 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_128863v1/index.html

Participating hosts (39 -> 36)
------------------------------

Missing (3): bat-dg2-8 fi-snb-2520m bat-mtlp-8

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gt_lrc:
- bat-adln-1: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14129/bat-adln-1/igt@i915_selftest@live@gt_lrc.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128863v1/bat-adln-1/igt@i915_selftest@live@gt_lrc.html

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

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

### CI changes ###

#### Issues hit ####

* boot:
- bat-jsl-1: [PASS][3] -> [FAIL][4] ([i915#8293])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14129/bat-jsl-1/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128863v1/bat-jsl-1/boot.html

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload:
- bat-adlp-6: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14129/bat-adlp-6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128863v1/bat-adlp-6/igt@[email protected]

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

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

* Linux: CI_DRM_14129 -> Patchwork_128863v1

CI-20190529: 20190529
CI_DRM_14129: b6b50ad4c8d61b14de0ffcf0d52ae2adc0ef39cf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7675: ffde49e0583ee5053f25a065356bce6bce91047a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_128863v1: b6b50ad4c8d61b14de0ffcf0d52ae2adc0ef39cf @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

8787b230b13c drm/i915/lnl: Block pkgC entry for performance improvemnt

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128863v1/index.html