Skip to contentSkip to conversation

drm/i915/display: remove display raw reg read/write micro-optimizations

PATCH In review Jani Nikula 3 participants 5 messages Jun 21, 2023 – Jun 28, 2023

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

PATCH 1/1 drm/i915/display: remove display raw reg read/write micro-optimizations

Convert the raw_reg_read() and raw_reg_write() calls in display GU MISC and INT CTL handling to regular intel_uncore_read() and intel_uncore_write(). These were neglible micro-optimizations, and removing them helps the display code reuse in the Xe driver.

---
 drivers/gpu/drm/i915/display/intel_display_irq.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_display_irq.c +8 -8
index ae98c99c5378..fda06f6c4a4a 100644
@@ -1149,15 +1149,14 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 
 u32 gen11_gu_misc_irq_ack(struct drm_i915_private *i915, const u32 master_ctl)
 {
-	void __iomem * const regs = i915->uncore.regs;
 	u32 iir;
 
 	if (!(master_ctl & GEN11_GU_MISC_IRQ))
 		return 0;
 
-	iir = raw_reg_read(regs, GEN11_GU_MISC_IIR);
+	iir = intel_uncore_read(&i915->uncore, GEN11_GU_MISC_IIR);
 	if (likely(iir))
-		raw_reg_write(regs, GEN11_GU_MISC_IIR, iir);
+		intel_uncore_write(&i915->uncore, GEN11_GU_MISC_IIR, iir);
 
 	return iir;
 }
@@ -1170,18 +1169,19 @@ void gen11_gu_misc_irq_handler(struct drm_i915_private *i915, const u32 iir)
 
 void gen11_display_irq_handler(struct drm_i915_private *i915)
 {
-	void __iomem * const regs = i915->uncore.regs;
-	const u32 disp_ctl = raw_reg_read(regs, GEN11_DISPLAY_INT_CTL);
+	u32 disp_ctl;
+
+	disp_ctl = intel_uncore_read(&i915->uncore, GEN11_DISPLAY_INT_CTL);
 
 	disable_rpm_wakeref_asserts(&i915->runtime_pm);
 	/*
 	 * GEN11_DISPLAY_INT_CTL has same format as GEN8_MASTER_IRQ
 	 * for the display related bits.
 	 */
-	raw_reg_write(regs, GEN11_DISPLAY_INT_CTL, 0x0);
+	intel_uncore_write(&i915->uncore, GEN11_DISPLAY_INT_CTL, 0x0);
 	gen8_de_irq_handler(i915, disp_ctl);
-	raw_reg_write(regs, GEN11_DISPLAY_INT_CTL,
-		      GEN11_DISPLAY_IRQ_ENABLE);
+	intel_uncore_write(&i915->uncore, GEN11_DISPLAY_INT_CTL,
+			   GEN11_DISPLAY_IRQ_ENABLE);
 
 	enable_rpm_wakeref_asserts(&i915->runtime_pm);
 }
Signature · 1 line
2.39.2
#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: remove display raw reg read/write micro-optimizations

== Series Details ==

== Series Details ==

Series: drm/i915/display: remove display raw reg read/write micro-optimizations
URL : https://patchwork.freedesktop.org/series/119703/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13302 -> Patchwork_119703v1
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_119703v1, 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_119703v1/index.html

Participating hosts (41 -> 40)
------------------------------

Missing (1): fi-pnv-d510

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_pm_rpm@module-reload:
- bat-dg2-9: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-dg2-9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-dg2-9/igt@[email protected]

* igt@kms_force_connector_basic@force-connector-state:
- fi-rkl-11600: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/fi-rkl-11600/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/fi-rkl-11600/igt@[email protected]
- fi-tgl-1115g4: [PASS][5] -> [ABORT][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/fi-tgl-1115g4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/fi-tgl-1115g4/igt@[email protected]

* igt@kms_force_connector_basic@force-edid:
- bat-rpls-1: [PASS][7] -> [ABORT][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-rpls-1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-rpls-1/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-hdmi-a-3:
- bat-dg2-11: [PASS][9] -> [ABORT][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_mocs:
- bat-mtlp-6: [PASS][11] -> [DMESG-FAIL][12] ([i915#7059])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html

* igt@i915_selftest@live@slpc:
- bat-mtlp-6: [PASS][13] -> [DMESG-WARN][14] ([i915#6367])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-mtlp-6/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-mtlp-6/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [PASS][15] -> [DMESG-FAIL][16] ([i915#6763])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-mtlp-6/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-mtlp-6/igt@i915_selftest@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11: [PASS][17] -> [ABORT][18] ([i915#6868])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-adlp-11/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-adlp-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-guc: [DMESG-FAIL][19] ([i915#5334] / [i915#7872]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/fi-kbl-guc/igt@i915_selftest@live@gt_heartbeat.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/fi-kbl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@mman:
- bat-rpls-2: [TIMEOUT][21] ([i915#6794] / [i915#7392]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-rpls-2/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1:
- bat-dg2-8: [FAIL][23] ([i915#7932]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@kms_psr@primary_mmap_gtt:
- bat-rplp-1: [SKIP][25] ([i915#1072]) -> [ABORT][26] ([i915#8442])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13302/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html

[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6763]: https://gitlab.freedesktop.org/drm/intel/issues/6763
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
[i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
[i915#7392]: https://gitlab.freedesktop.org/drm/intel/issues/7392
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8442]: https://gitlab.freedesktop.org/drm/intel/issues/8442

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

* Linux: CI_DRM_13302 -> Patchwork_119703v1

CI-20190529: 20190529
CI_DRM_13302: 839a0f1c0fba27caa09cb8c3c07ba21ba7428bb6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7344: 1c715e38251905d4d7797651fa448b11bf42a4a4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_119703v1: 839a0f1c0fba27caa09cb8c3c07ba21ba7428bb6 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

eef34b9b2d63 drm/i915/display: remove display raw reg read/write micro-optimizations

== Logs ==

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Jani Nikula

Hi Jani,

Quoted 3 lines · Jani Nikula

Convert the raw_reg_read() and raw_reg_write() calls in display GU MISC and INT CTL handling to regular intel_uncore_read() and intel_uncore_write(). These were neglible micro-optimizations, and

/neglible/negligible/

Quoted 3 lines

removing them helps the display code reuse in the Xe driver.

Andi

#3 lore raw
Quoted 7 lines · Andi Shyti

Hi Jani,

Quoted 3 lines · Jani Nikula

Convert the raw_reg_read() and raw_reg_write() calls in display GU MISC and INT CTL handling to regular intel_uncore_read() and intel_uncore_write(). These were neglible micro-optimizations, and

Quoted 7 lines

/neglible/negligible/

Quoted 3 lines

removing them helps the display code reuse in the Xe driver.

Thanks, but back to the drawing board:

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-dg2-9/igt@[email protected]#dmesg-warnings1253

Quoted 2 lines

Andi

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#4 lore raw

Hi Jani,

Quoted 12 lines · Jani Nikula
Quoted 11 lines · Andi Shyti

Hi Jani,

Quoted 3 lines · Jani Nikula

Convert the raw_reg_read() and raw_reg_write() calls in display GU MISC and INT CTL handling to regular intel_uncore_read() and intel_uncore_write(). These were neglible micro-optimizations, and

/neglible/negligible/

Quoted 2 lines

removing them helps the display code reuse in the Xe driver.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Thanks, but back to the drawing board:

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119703v1/bat-dg2-9/igt@[email protected]#dmesg-warnings1253

Have you tried using intel_uncore_{read,write}_fw()?

Andi