Skip to contentSkip to conversation

drm/i915/vlv: allocate Gunit s0ix state on demand

RFC In review Jani Nikula 3 participants 4 messages Aug 7, 2019 – Aug 8, 2019

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

RFC 1/1 drm/i915/vlv: allocate Gunit s0ix state on demand

Valleyview is the only platform that requires the Gunit s0ix save state. Allocate it dynamically instead of burdening all platforms with it in drm_i915_private.

---
 drivers/gpu/drm/i915/i915_drv.c | 79 ++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_drv.h | 64 +-------------------------
 2 files changed, 79 insertions(+), 64 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +77 -2
index efe904626bf5..c1483cd8e76c 100644
@@ -2559,11 +2559,81 @@ static int i915_pm_restore(struct device *kdev)
  * a black-box for the driver. Further investigation is needed to reduce the
  * saved/restored registers even further, by following the same 3 criteria.
  */
+
+struct vlv_s0ix_state {
+	/* GAM */
+	u32 wr_watermark;
+	u32 gfx_prio_ctrl;
+	u32 arb_mode;
+	u32 gfx_pend_tlb0;
+	u32 gfx_pend_tlb1;
+	u32 lra_limits[GEN7_LRA_LIMITS_REG_NUM];
+	u32 media_max_req_count;
+	u32 gfx_max_req_count;
+	u32 render_hwsp;
+	u32 ecochk;
+	u32 bsd_hwsp;
+	u32 blt_hwsp;
+	u32 tlb_rd_addr;
+
+	/* MBC */
+	u32 g3dctl;
+	u32 gsckgctl;
+	u32 mbctl;
+
+	/* GCP */
+	u32 ucgctl1;
+	u32 ucgctl3;
+	u32 rcgctl1;
+	u32 rcgctl2;
+	u32 rstctl;
+	u32 misccpctl;
+
+	/* GPM */
+	u32 gfxpause;
+	u32 rpdeuhwtc;
+	u32 rpdeuc;
+	u32 ecobus;
+	u32 pwrdwnupctl;
+	u32 rp_down_timeout;
+	u32 rp_deucsw;
+	u32 rcubmabdtmr;
+	u32 rcedata;
+	u32 spare2gh;
+
+	/* Display 1 CZ domain */
+	u32 gt_imr;
+	u32 gt_ier;
+	u32 pm_imr;
+	u32 pm_ier;
+	u32 gt_scratch[GEN7_GT_SCRATCH_REG_NUM];
+
+	/* GT SA CZ domain */
+	u32 tilectl;
+	u32 gt_fifoctl;
+	u32 gtlc_wake_ctrl;
+	u32 gtlc_survive;
+	u32 pmwgicz;
+
+	/* Display 2 CZ domain */
+	u32 gu_ctl0;
+	u32 gu_ctl1;
+	u32 pcbr;
+	u32 clock_gate_dis2;
+};
+
 static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 {
-	struct vlv_s0ix_state *s = &dev_priv->vlv_s0ix_state;
+	struct vlv_s0ix_state *s = dev_priv->vlv_s0ix_state;
 	int i;
 
+	if (!s) {
+		s = devm_kmalloc(dev_priv->drm.dev, sizeof(*s), GFP_KERNEL);
+		if (!s)
+			return;
+		dev_priv->vlv_s0ix_state = s;
+	}
+
 	/* GAM 0x4000-0x4770 */
 	s->wr_watermark		= I915_READ(GEN7_WR_WATERMARK);
 	s->gfx_prio_ctrl	= I915_READ(GEN7_GFX_PRIO_CTRL);
@@ -2642,10 +2712,15 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 
 static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 {
-	struct vlv_s0ix_state *s = &dev_priv->vlv_s0ix_state;
+	struct vlv_s0ix_state *s = dev_priv->vlv_s0ix_state;
 	u32 val;
 	int i;
 
+	if (!s) {
+		DRM_DEBUG_KMS("gunit restore without save state\n");
+		return;
+	}
+
 	/* GAM 0x4000-0x4770 */
 	I915_WRITE(GEN7_WR_WATERMARK,	s->wr_watermark);
 	I915_WRITE(GEN7_GFX_PRIO_CTRL,	s->gfx_prio_ctrl);
drivers/gpu/drm/i915/i915_drv.h +2 -62

76 lines not on this page · raw message

Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/vlv: allocate Gunit s0ix state on demand

== Series Details ==

== Series Details ==

Series: drm/i915/vlv: allocate Gunit s0ix state on demand
URL : https://patchwork.freedesktop.org/series/64844/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6648 -> Patchwork_13902
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_busy@busy-all:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-icl-u3/igt@[email protected]

* igt@kms_busy@basic-flip-a:
- fi-kbl-7567u: [PASS][3] -> [SKIP][4] ([fdo#109271] / [fdo#109278]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7567u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7567u/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: [PASS][5] -> [WARN][6] ([fdo#109380])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7567u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7567u/igt@[email protected]

* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: [PASS][7] -> [WARN][8] ([fdo#109483])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7500u/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#109485])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7500u/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-c:
- fi-kbl-7567u: [PASS][11] -> [SKIP][12] ([fdo#109271]) +23 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7567u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7567u/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][13] ([fdo#111108]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

* igt@kms_busy@basic-flip-c:
- fi-kbl-7500u: [SKIP][15] ([fdo#109271] / [fdo#109278]) -> [PASS][16] +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-7500u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-7500u/igt@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-cml-u2: [FAIL][17] ([fdo#110627]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-cml-u2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-cml-u2/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [FAIL][19] ([fdo#109483]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-icl-u2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-icl-u2/igt@[email protected]

* igt@vgem_basic@unload:
- fi-icl-u3: [DMESG-WARN][21] ([fdo#107724]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-icl-u3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-icl-u3/igt@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [FAIL][23] ([fdo#107707]) -> [SKIP][24] ([fdo#109271])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/fi-kbl-guc/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/fi-kbl-guc/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#107707]: https://bugs.freedesktop.org/show_bug.cgi?id=107707
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#109644]: https://bugs.freedesktop.org/show_bug.cgi?id=109644
[fdo#110464]: https://bugs.freedesktop.org/show_bug.cgi?id=110464
[fdo#110627]: https://bugs.freedesktop.org/show_bug.cgi?id=110627
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108

Participating hosts (54 -> 47)
------------------------------

Additional (1): fi-pnv-d510
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6648 -> Patchwork_13902

CI-20190529: 20190529
CI_DRM_6648: 9580c97bd17924150abfa32dabb46af761a12ca5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5125: 35d81d01b1599b4bc4df0e09e25f6f531eed4f8a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13902: 365eae1ddb7aee0d5c9c9fc6c43911269f7bbf43 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

365eae1ddb7a drm/i915/vlv: allocate Gunit s0ix state on demand

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915/vlv: allocate Gunit s0ix state on demand

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915/vlv: allocate Gunit s0ix state on demand
URL : https://patchwork.freedesktop.org/series/64844/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6648_full -> Patchwork_13902_full
====================================================

Summary
-------

**WARNING**

Minor unknown changes coming with Patchwork_13902_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_13902_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

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

### IGT changes ###

#### Warnings ####

* igt@gem_mocs_settings@mocs-reset-bsd2:
- shard-iclb: [SKIP][1] ([fdo#109276]) -> [FAIL][2] +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb1/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-skl: [PASS][3] -> [INCOMPLETE][4] ([fdo#104108] / [fdo#107807])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl9/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-256x85-onscreen:
- shard-iclb: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb7/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([fdo#109507])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-snb: [PASS][9] -> [INCOMPLETE][10] ([fdo#105411])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-snb6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-snb1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +7 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb8/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][13] -> [DMESG-WARN][14] ([fdo#108566]) +5 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-apl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-apl6/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [PASS][15] -> [DMESG-WARN][16] ([fdo#108566]) +4 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-kbl4/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-kbl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][17] -> [FAIL][18] ([fdo#108145]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl3/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl3/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145] / [fdo#110403])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl10/igt@[email protected]

* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109276]) +12 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb1/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb7/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_async@concurrent-writes-bsd:
- shard-iclb: [SKIP][23] -> [PASS][24] +6 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb6/igt@[email protected]

* igt@gem_exec_await@wide-all:
- shard-iclb: [FAIL][25] ([fdo#110946]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@pi-ringfull-bsd2:
- shard-iclb: [SKIP][27] ([fdo#109276]) -> [PASS][28] +7 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb1/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [FAIL][29] ([fdo#104873]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-glk3/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-glk4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [FAIL][31] ([fdo#103167]) -> [PASS][32] +6 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][33] ([fdo#103166]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb1/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][35] ([fdo#109642] / [fdo#111068]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb2/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][37] ([fdo#109441]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb4/igt@kms_psr@psr2_primary_mmap_cpu.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_vblank@pipe-b-ts-continuation-dpms-suspend:
- shard-skl: [INCOMPLETE][39] ([fdo#104108]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl5/igt@[email protected]

* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-apl: [DMESG-WARN][41] ([fdo#108566]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-apl7/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-apl2/igt@[email protected]

* igt@perf@polling:
- shard-skl: [FAIL][43] ([fdo#110728]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-skl5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-skl1/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-isolation-bsd2:
- shard-iclb: [FAIL][45] -> [SKIP][46] ([fdo#109276]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6648/shard-iclb4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/shard-iclb7/igt@[email protected]

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110946]: https://bugs.freedesktop.org/show_bug.cgi?id=110946
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6648 -> Patchwork_13902

CI-20190529: 20190529
CI_DRM_6648: 9580c97bd17924150abfa32dabb46af761a12ca5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5125: 35d81d01b1599b4bc4df0e09e25f6f531eed4f8a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13902: 365eae1ddb7aee0d5c9c9fc6c43911269f7bbf43 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13902/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Jani Nikula
Quoted 6 lines · Jani Nikula

Valleyview is the only platform that requires the Gunit s0ix save state. Allocate it dynamically instead of burdening all platforms with it in drm_i915_private.

Looks ok to me,

Quoted 194 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 79 ++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_drv.h | 64 +-------------------------
 2 files changed, 79 insertions(+), 64 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +77 -2
index efe904626bf5..c1483cd8e76c 100644
@@ -2559,11 +2559,81 @@ static int i915_pm_restore(struct device *kdev)
  * a black-box for the driver. Further investigation is needed to reduce the
  * saved/restored registers even further, by following the same 3 criteria.
  */
+
+struct vlv_s0ix_state {
+	/* GAM */
+	u32 wr_watermark;
+	u32 gfx_prio_ctrl;
+	u32 arb_mode;
+	u32 gfx_pend_tlb0;
+	u32 gfx_pend_tlb1;
+	u32 lra_limits[GEN7_LRA_LIMITS_REG_NUM];
+	u32 media_max_req_count;
+	u32 gfx_max_req_count;
+	u32 render_hwsp;
+	u32 ecochk;
+	u32 bsd_hwsp;
+	u32 blt_hwsp;
+	u32 tlb_rd_addr;
+
+	/* MBC */
+	u32 g3dctl;
+	u32 gsckgctl;
+	u32 mbctl;
+
+	/* GCP */
+	u32 ucgctl1;
+	u32 ucgctl3;
+	u32 rcgctl1;
+	u32 rcgctl2;
+	u32 rstctl;
+	u32 misccpctl;
+
+	/* GPM */
+	u32 gfxpause;
+	u32 rpdeuhwtc;
+	u32 rpdeuc;
+	u32 ecobus;
+	u32 pwrdwnupctl;
+	u32 rp_down_timeout;
+	u32 rp_deucsw;
+	u32 rcubmabdtmr;
+	u32 rcedata;
+	u32 spare2gh;
+
+	/* Display 1 CZ domain */
+	u32 gt_imr;
+	u32 gt_ier;
+	u32 pm_imr;
+	u32 pm_ier;
+	u32 gt_scratch[GEN7_GT_SCRATCH_REG_NUM];
+
+	/* GT SA CZ domain */
+	u32 tilectl;
+	u32 gt_fifoctl;
+	u32 gtlc_wake_ctrl;
+	u32 gtlc_survive;
+	u32 pmwgicz;
+
+	/* Display 2 CZ domain */
+	u32 gu_ctl0;
+	u32 gu_ctl1;
+	u32 pcbr;
+	u32 clock_gate_dis2;
+};
+
 static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 {
-	struct vlv_s0ix_state *s = &dev_priv->vlv_s0ix_state;
+	struct vlv_s0ix_state *s = dev_priv->vlv_s0ix_state;
 	int i;
 
+	if (!s) {
+		s = devm_kmalloc(dev_priv->drm.dev, sizeof(*s), GFP_KERNEL);
+		if (!s)
+			return;
+		dev_priv->vlv_s0ix_state = s;
+	}
+
 	/* GAM 0x4000-0x4770 */
 	s->wr_watermark		= I915_READ(GEN7_WR_WATERMARK);
 	s->gfx_prio_ctrl	= I915_READ(GEN7_GFX_PRIO_CTRL);
@@ -2642,10 +2712,15 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 
 static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 {
-	struct vlv_s0ix_state *s = &dev_priv->vlv_s0ix_state;
+	struct vlv_s0ix_state *s = dev_priv->vlv_s0ix_state;
 	u32 val;
 	int i;
 
+	if (!s) {
+		DRM_DEBUG_KMS("gunit restore without save state\n");
+		return;
+	}
+
 	/* GAM 0x4000-0x4770 */
 	I915_WRITE(GEN7_WR_WATERMARK,	s->wr_watermark);
 	I915_WRITE(GEN7_GFX_PRIO_CTRL,	s->gfx_prio_ctrl);
drivers/gpu/drm/i915/i915_drv.h +2 -62
index 7d424ddd3523..30e33103b845 100644
@@ -580,67 +580,7 @@ struct i915_suspend_saved_registers {
 	u16 saveGCDGMBUS;
 };
 
-struct vlv_s0ix_state {
-	/* GAM */
-	u32 wr_watermark;
-	u32 gfx_prio_ctrl;
-	u32 arb_mode;
-	u32 gfx_pend_tlb0;
-	u32 gfx_pend_tlb1;
-	u32 lra_limits[GEN7_LRA_LIMITS_REG_NUM];
-	u32 media_max_req_count;
-	u32 gfx_max_req_count;
-	u32 render_hwsp;
-	u32 ecochk;
-	u32 bsd_hwsp;
-	u32 blt_hwsp;
-	u32 tlb_rd_addr;
-
-	/* MBC */
-	u32 g3dctl;
-	u32 gsckgctl;
-	u32 mbctl;
-
-	/* GCP */
-	u32 ucgctl1;
-	u32 ucgctl3;
-	u32 rcgctl1;
-	u32 rcgctl2;
-	u32 rstctl;
-	u32 misccpctl;
-
-	/* GPM */
-	u32 gfxpause;
-	u32 rpdeuhwtc;
-	u32 rpdeuc;
-	u32 ecobus;
-	u32 pwrdwnupctl;
-	u32 rp_down_timeout;
-	u32 rp_deucsw;
-	u32 rcubmabdtmr;
-	u32 rcedata;
-	u32 spare2gh;
-
-	/* Display 1 CZ domain */
-	u32 gt_imr;
-	u32 gt_ier;
-	u32 pm_imr;
-	u32 pm_ier;
-	u32 gt_scratch[GEN7_GT_SCRATCH_REG_NUM];
-
-	/* GT SA CZ domain */
-	u32 tilectl;
-	u32 gt_fifoctl;
-	u32 gtlc_wake_ctrl;
-	u32 gtlc_survive;
-	u32 pmwgicz;
-
-	/* Display 2 CZ domain */
-	u32 gu_ctl0;
-	u32 gu_ctl1;
-	u32 pcbr;
-	u32 clock_gate_dis2;
-};
+struct vlv_s0ix_state;
 
 struct intel_rps_ei {
 	ktime_t ktime;
@@ -1601,7 +1541,7 @@ struct drm_i915_private {
 	u32 suspend_count;
 	bool power_domains_suspended;
 	struct i915_suspend_saved_registers regfile;
-	struct vlv_s0ix_state vlv_s0ix_state;
+	struct vlv_s0ix_state *vlv_s0ix_state;
 
 	enum {
 		I915_SAGV_UNKNOWN = 0,
Signature · 1 line
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx