All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later
@ 2023-02-06 16:35 Imre Deak
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off Imre Deak
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Imre Deak @ 2023-02-06 16:35 UTC (permalink / raw)
  To: intel-gfx

Determining whether the display engine is fused-off on a platform happens
only in intel_device_info_runtime_init(). Initializing the display power
functionality depends on this condition, so move
intel_power_domains_init() later after the runtime init function has
been called.

The next patch fixing platforms with the display fused-off, depends on
this patch.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++++
 drivers/gpu/drm/i915/i915_driver.c           | 7 -------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 166662ade593c..b3e7ed3866cde 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8634,6 +8634,10 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
 		goto cleanup_bios;
 
 	/* FIXME: completely on the wrong abstraction layer */
+	ret = intel_power_domains_init(i915);
+	if (ret < 0)
+		goto cleanup_vga;
+
 	intel_power_domains_init_hw(i915, false);
 
 	if (!HAS_DISPLAY(i915))
@@ -8676,6 +8680,7 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
 cleanup_vga_client_pw_domain_dmc:
 	intel_dmc_ucode_fini(i915);
 	intel_power_domains_driver_remove(i915);
+cleanup_vga:
 	intel_vga_unregister(i915);
 cleanup_bios:
 	intel_bios_driver_remove(i915);
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 13bf4fe52f9fe..fe2870a6ae631 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -251,9 +251,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
 	intel_detect_pch(dev_priv);
 
 	intel_pm_setup(dev_priv);
-	ret = intel_power_domains_init(dev_priv);
-	if (ret < 0)
-		goto err_gem;
 	intel_irq_init(dev_priv);
 	intel_init_display_hooks(dev_priv);
 	intel_init_clock_gating_hooks(dev_priv);
@@ -262,10 +259,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
 
 	return 0;
 
-err_gem:
-	i915_gem_cleanup_early(dev_priv);
-	intel_gt_driver_late_release_all(dev_priv);
-	i915_drm_clients_fini(&dev_priv->clients);
 err_rootgt:
 	intel_region_ttm_device_fini(dev_priv);
 err_ttm:
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off
  2023-02-06 16:35 [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later Imre Deak
@ 2023-02-06 16:35 ` Imre Deak
  2023-02-07 10:17   ` Jani Nikula
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display Imre Deak
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Imre Deak @ 2023-02-06 16:35 UTC (permalink / raw)
  To: intel-gfx

DG1/DG2 and MTL+ has added a new display-present HW flag. Check this
flag and if cleared, disable the driver's display functionality.

So far the missing check resulted in running the display initialization
sequence, and the WARNs below, due to the display register accesses
timing out:

[    3.902843] ------------[ cut here ]------------
[    3.902848] i915 0000:03:00.0: drm_WARN_ON(intel_de_wait_for_set(dev_priv, ((const i915_reg_t){ .reg = (0x42000) }), (1 << (27 - (pg))), 1))
[    3.902879] WARNING: CPU: 6 PID: 462 at drivers/gpu/drm/i915/display/intel_display_power_well.c:326 gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
[    3.903009] Modules linked in: hid_sensor_hub intel_ishtp_hid i915(+) rtsx_pci_sdmmc drm_buddy mmc_core drm_display_helper crct10dif_pclmul nvme cec crc32_pclmul intel_ish_ipc crc32c_intel ucsi_acpi hid_multitouch nvme_core ghash_clmulni_intel typec_ucsi rtsx_pci ttm sha512_ssse3 serio_raw intel_ishtp typec video i2c_hid_acpi i2c_hid wmi pinctrl_tigerlake ip6_tables ip_tables x_tables fuse
[    3.903021] CPU: 6 PID: 462 Comm: systemd-udevd Tainted: G     U             6.2.0-rc6+ #50
[    3.903023] Hardware name: LENOVO 82VB/LNVNB161216, BIOS KMCN09WW 04/26/2022
[    3.903023] RIP: 0010:gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
[    3.903105] Code: 48 8b 5f 50 48 85 db 75 03 48 8b 1f e8 98 bb 0d e9 48 c7 c1 00 65 a1 c0 48 89 da 48 c7 c7 4b c5 a3 c0 48 89 c6 e8 e3 df 53 e9 <0f> 0b 5b c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90
[    3.903106] RSP: 0018:ffffa7cec0b07a98 EFLAGS: 00010292
[    3.903107] RAX: 0000000000000080 RBX: ffff9a05430eaaa0 RCX: 0000000000000000
[    3.903108] RDX: 0000000000000001 RSI: ffffffffaa7ab69e RDI: 00000000ffffffff
[    3.903108] RBP: ffff9a0552ba2020 R08: ffffffffab062ce0 R09: 00000000abd3ffc2
[    3.903109] R10: ffffffffffffffff R11: 0000000000000081 R12: 0000000000000000
[    3.903109] R13: ffff9a05532a9cb0 R14: ffffffffc09e1670 R15: ffff9a0543132000
[    3.903110] FS:  00007f24d0fe5b40(0000) GS:ffff9a0ccf780000(0000) knlGS:0000000000000000
[    3.903110] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.903111] CR2: 00005643d7a31a28 CR3: 0000000111614002 CR4: 0000000000770ee0
[    3.903112] PKRU: 55555554
[    3.903112] Call Trace:
[    3.903113]  <TASK>
[    3.903114]  hsw_power_well_enable+0x12f/0x1a0 [i915]
[    3.903191]  intel_power_well_enable+0x21/0x70 [i915]
[    3.903265]  icl_display_core_init+0x92/0x6a0 [i915]
[    3.903346]  intel_power_domains_init_hw+0x1da/0x5b0 [i915]
[    3.903422]  intel_modeset_init_noirq+0x60/0x250 [i915]
[    3.903497]  i915_driver_probe+0x562/0xe10 [i915]
[    3.903557]  ? i915_pci_probe+0x87/0x180 [i915]
[    3.903617]  local_pci_probe+0x3e/0x80
[    3.903621]  pci_device_probe+0xb3/0x210
[    3.903622]  really_probe+0xdb/0x380
[    3.903624]  ? pm_runtime_barrier+0x50/0x90
[    3.903626]  __driver_probe_device+0x78/0x170
[    3.903627]  driver_probe_device+0x1f/0x90
[    3.903628]  __driver_attach+0xce/0x1c0
[    3.903629]  ? __pfx___driver_attach+0x10/0x10
[    3.903630]  bus_for_each_dev+0x5f/0x90
[    3.903631]  bus_add_driver+0x1ae/0x200
[    3.903632]  driver_register+0x89/0xe0
[    3.903634]  i915_init+0x1f/0x7f [i915]
[    3.903695]  ? __pfx_init_module+0x10/0x10 [i915]
[    3.903751]  do_one_initcall+0x43/0x220
[    3.903753]  ? kmalloc_trace+0x26/0x90
[    3.903756]  do_init_module+0x4a/0x200
[    3.903758]  __do_sys_init_module+0x157/0x180
[    3.903760]  do_syscall_64+0x58/0xc0
[    3.903762]  ? do_syscall_64+0x67/0xc0
[    3.903762]  ? exc_page_fault+0x70/0x170
[    3.903764]  entry_SYSCALL_64_after_hwframe+0x72/0xdc

Bspec: 49189, 53112

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8015
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h          |  3 +++
 drivers/gpu/drm/i915/intel_device_info.c | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 596efc940ee70..a22a0fa299645 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -116,6 +116,9 @@
  *  #define GEN8_BAR                    _MMIO(0xb888)
  */
 
+#define GU_CNTL_PROTECTED		_MMIO(0x10100C)
+#define   DEPRESENT			REG_BIT(9)
+
 #define GU_CNTL				_MMIO(0x101010)
 #define   LMEM_INIT			REG_BIT(7)
 #define   DRIVERFLR			REG_BIT(31)
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 98769e5f2c3d1..044ac552c9280 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -501,6 +501,19 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 			runtime->has_dsc = 0;
 	}
 
+	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
+	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
+		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
+
+		runtime->pipe_mask = 0;
+		runtime->cpu_transcoder_mask = 0;
+		runtime->fbc_mask = 0;
+		runtime->has_hdcp = 0;
+		runtime->fbc_mask = 0;
+		runtime->has_dmc = 0;
+		runtime->has_dsc = 0;
+	}
+
 	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
 		drm_info(&dev_priv->drm,
 			 "Disabling ppGTT for VT-d support\n");
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display
  2023-02-06 16:35 [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later Imre Deak
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off Imre Deak
@ 2023-02-06 16:35 ` Imre Deak
  2023-02-07  2:45   ` iczero
  2023-02-07 10:21   ` Jani Nikula
  2023-02-06 19:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Move display power initialization during driver probing later Patchwork
  2023-02-07  4:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 2 replies; 11+ messages in thread
From: Imre Deak @ 2023-02-06 16:35 UTC (permalink / raw)
  To: intel-gfx

Factor out a function used both on older and new platforms to disable
the display functionality if the display is fused-off.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 34 +++++++++++++-----------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 044ac552c9280..9d6d1fad9f1d9 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -369,6 +369,21 @@ void intel_device_info_runtime_init_early(struct drm_i915_private *i915)
 	intel_device_info_subplatform_init(i915);
 }
 
+static void disable_fused_off_display(struct drm_i915_private *i915)
+{
+	struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
+
+	drm_info(&i915->drm, "Display fused off, disabling\n");
+
+	runtime->pipe_mask = 0;
+	runtime->cpu_transcoder_mask = 0;
+	runtime->fbc_mask = 0;
+	runtime->has_hdcp = 0;
+	runtime->fbc_mask = 0;
+	runtime->has_dmc = 0;
+	runtime->has_dsc = 0;
+}
+
 /**
  * intel_device_info_runtime_init - initialize runtime info
  * @dev_priv: the i915 device
@@ -454,11 +469,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 		    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
 		    (HAS_PCH_CPT(dev_priv) &&
 		     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
-			drm_info(&dev_priv->drm,
-				 "Display fused off, disabling\n");
-			runtime->pipe_mask = 0;
-			runtime->cpu_transcoder_mask = 0;
-			runtime->fbc_mask = 0;
+			disable_fused_off_display(dev_priv);
 		} else if (fuse_strap & IVB_PIPE_C_DISABLE) {
 			drm_info(&dev_priv->drm, "PipeC fused off\n");
 			runtime->pipe_mask &= ~BIT(PIPE_C);
@@ -502,17 +513,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 	}
 
 	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
-	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
-		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
-
-		runtime->pipe_mask = 0;
-		runtime->cpu_transcoder_mask = 0;
-		runtime->fbc_mask = 0;
-		runtime->has_hdcp = 0;
-		runtime->fbc_mask = 0;
-		runtime->has_dmc = 0;
-		runtime->has_dsc = 0;
-	}
+	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT))
+		disable_fused_off_display(dev_priv);
 
 	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
 		drm_info(&dev_priv->drm,
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Move display power initialization during driver probing later
  2023-02-06 16:35 [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later Imre Deak
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off Imre Deak
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display Imre Deak
@ 2023-02-06 19:38 ` Patchwork
  2023-02-07  4:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2023-02-06 19:38 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 4517 bytes --]

== Series Details ==

Series: series starting with [1/3] drm/i915: Move display power initialization during driver probing later
URL   : https://patchwork.freedesktop.org/series/113711/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12704 -> Patchwork_113711v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/index.html

Participating hosts (36 -> 34)
------------------------------

  Missing    (2): bat-dg1-6 fi-snb-2520m 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-dg1-5:          NOTRUN -> [SKIP][1] ([i915#7828])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/bat-dg1-5/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s0@smem:
    - {bat-rpls-1}:       [ABORT][2] ([i915#6311] / [i915#7359]) -> [PASS][3]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-rpls-1/igt@gem_exec_suspend@basic-s0@smem.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/bat-rpls-1/igt@gem_exec_suspend@basic-s0@smem.html

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-5:          [ABORT][4] ([i915#4983]) -> [PASS][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/bat-dg1-5/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@slpc:
    - {bat-rpls-1}:       [DMESG-FAIL][6] ([i915#6367]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-rpls-1/igt@i915_selftest@live@slpc.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/bat-rpls-1/igt@i915_selftest@live@slpc.html
    - {bat-rplp-1}:       [DMESG-FAIL][8] ([i915#6367] / [i915#7913]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/bat-rplp-1/igt@i915_selftest@live@slpc.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/bat-rplp-1/igt@i915_selftest@live@slpc.html

  * igt@kms_busy@basic@modeset:
    - fi-elk-e7500:       [FAIL][10] -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/fi-elk-e7500/igt@kms_busy@basic@modeset.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/fi-elk-e7500/igt@kms_busy@basic@modeset.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-ilk-650:         [SKIP][12] ([fdo#109271]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/fi-ilk-650/igt@kms_frontbuffer_tracking@basic.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/fi-ilk-650/igt@kms_frontbuffer_tracking@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978


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

  * Linux: CI_DRM_12704 -> Patchwork_113711v1

  CI-20190529: 20190529
  CI_DRM_12704: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7152: 790b81207a0a6705213ec5ea645bc5e223b2ce1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113711v1: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

c7501e069ea5 drm/i915: Factor out a function disabling fused-off display
d86c59ea710b drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off
bb6af122c552 drm/i915: Move display power initialization during driver probing later

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 5227 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display Imre Deak
@ 2023-02-07  2:45   ` iczero
  2023-02-07 10:21   ` Jani Nikula
  1 sibling, 0 replies; 11+ messages in thread
From: iczero @ 2023-02-07  2:45 UTC (permalink / raw)
  To: intel-gfx

On 2/6/23 11:35, Imre Deak wrote:
> Factor out a function used both on older and new platforms to disable
> the display functionality if the display is fused-off.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_device_info.c | 34 +++++++++++++-----------
>   1 file changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 044ac552c9280..9d6d1fad9f1d9 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -369,6 +369,21 @@ void intel_device_info_runtime_init_early(struct drm_i915_private *i915)
>   	intel_device_info_subplatform_init(i915);
>   }
>   
> +static void disable_fused_off_display(struct drm_i915_private *i915)
> +{
> +	struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
> +
> +	drm_info(&i915->drm, "Display fused off, disabling\n");
> +
> +	runtime->pipe_mask = 0;
> +	runtime->cpu_transcoder_mask = 0;
> +	runtime->fbc_mask = 0;
> +	runtime->has_hdcp = 0;
> +	runtime->fbc_mask = 0;
> +	runtime->has_dmc = 0;
> +	runtime->has_dsc = 0;
> +}
> +
>   /**
>    * intel_device_info_runtime_init - initialize runtime info
>    * @dev_priv: the i915 device
> @@ -454,11 +469,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>   		    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
>   		    (HAS_PCH_CPT(dev_priv) &&
>   		     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
> -			drm_info(&dev_priv->drm,
> -				 "Display fused off, disabling\n");
> -			runtime->pipe_mask = 0;
> -			runtime->cpu_transcoder_mask = 0;
> -			runtime->fbc_mask = 0;
> +			disable_fused_off_display(dev_priv);
>   		} else if (fuse_strap & IVB_PIPE_C_DISABLE) {
>   			drm_info(&dev_priv->drm, "PipeC fused off\n");
>   			runtime->pipe_mask &= ~BIT(PIPE_C);
> @@ -502,17 +513,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>   	}
>   
>   	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
> -	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
> -		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
> -
> -		runtime->pipe_mask = 0;
> -		runtime->cpu_transcoder_mask = 0;
> -		runtime->fbc_mask = 0;
> -		runtime->has_hdcp = 0;
> -		runtime->fbc_mask = 0;
> -		runtime->has_dmc = 0;
> -		runtime->has_dsc = 0;
> -	}
> +	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT))
> +		disable_fused_off_display(dev_priv);
>   
>   	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
>   		drm_info(&dev_priv->drm,
>
Tested on Intel Arc A370M. Thank you for the fix.

Tested-by: iczero <iczero@hellomouse.net>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915: Move display power initialization during driver probing later
  2023-02-06 16:35 [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later Imre Deak
                   ` (2 preceding siblings ...)
  2023-02-06 19:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Move display power initialization during driver probing later Patchwork
@ 2023-02-07  4:23 ` Patchwork
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2023-02-07  4:23 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 18018 bytes --]

== Series Details ==

Series: series starting with [1/3] drm/i915: Move display power initialization during driver probing later
URL   : https://patchwork.freedesktop.org/series/113711/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12704_full -> Patchwork_113711v1_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/index.html

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

  No changes in participating hosts

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

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

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@kms_dsc@dsc-basic}:
    - {shard-tglu-10}:    NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-tglu-10/igt@kms_dsc@dsc-basic.html

  * igt@kms_rotation_crc@primary-rotation-270:
    - {shard-rkl}:        [SKIP][2] ([i915#1845] / [i915#4098]) -> [INCOMPLETE][3]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-4/igt@kms_rotation_crc@primary-rotation-270.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@kms_rotation_crc@primary-rotation-270.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][4] -> [FAIL][5] ([i915#2842])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk1/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@kms_dsc@dsc-with-bpc-formats:
    - shard-glk:          NOTRUN -> [SKIP][6] ([fdo#109271]) +8 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk3/igt@kms_dsc@dsc-with-bpc-formats.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
    - shard-glk:          [PASS][7] -> [FAIL][8] ([i915#79])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk4/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk5/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2.html

  
#### Possible fixes ####

  * igt@drm_fdinfo@virtual-idle:
    - {shard-rkl}:        [FAIL][9] ([i915#7742]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@drm_fdinfo@virtual-idle.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-1/igt@drm_fdinfo@virtual-idle.html

  * igt@gem_eio@in-flight-suspend:
    - {shard-rkl}:        [FAIL][11] ([fdo#103375]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-3/igt@gem_eio@in-flight-suspend.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-2/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_balancer@fairslice:
    - {shard-rkl}:        [SKIP][13] ([i915#6259]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@gem_exec_balancer@fairslice.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@gem_exec_balancer@fairslice.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [FAIL][15] ([i915#2842]) -> [PASS][16] +2 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk4/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_softpin@noreloc-s3:
    - {shard-rkl}:        [ABORT][17] -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-4/igt@gem_softpin@noreloc-s3.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-5/igt@gem_softpin@noreloc-s3.html

  * igt@i915_pm_dc@dc5-psr:
    - {shard-rkl}:        [SKIP][19] ([i915#658]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@i915_pm_dc@dc5-psr.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@i915_pm_dc@dc5-psr.html

  * igt@i915_pm_rc6_residency@rc6-idle@vcs0:
    - {shard-dg1}:        [FAIL][21] ([i915#3591]) -> [PASS][22] +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-dg1-14/igt@i915_pm_rc6_residency@rc6-idle@vcs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-dg1-14/igt@i915_pm_rc6_residency@rc6-idle@vcs0.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite:
    - {shard-rkl}:        [SKIP][23] ([i915#1849] / [i915#4098]) -> [PASS][24] +3 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_plane@plane-position-covered@pipe-a-planes:
    - {shard-rkl}:        [SKIP][25] ([i915#1849]) -> [PASS][26] +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@kms_plane@plane-position-covered@pipe-a-planes.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@kms_plane@plane-position-covered@pipe-a-planes.html

  * igt@kms_pwrite_crc:
    - {shard-rkl}:        [SKIP][27] ([i915#1845] / [i915#4098]) -> [PASS][28] +8 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-rkl-5/igt@kms_pwrite_crc.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-rkl-6/igt@kms_pwrite_crc.html

  * igt@perf@stress-open-close:
    - shard-glk:          [ABORT][29] ([i915#5213]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk7/igt@perf@stress-open-close.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk3/igt@perf@stress-open-close.html

  * igt@perf_pmu@busy-accuracy-2@vecs0:
    - shard-glk:          [FAIL][31] -> [PASS][32] +4 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@perf_pmu@busy-accuracy-2@vecs0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk4/igt@perf_pmu@busy-accuracy-2@vecs0.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-glk:          [TIMEOUT][33] -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12704/shard-glk1/igt@perf_pmu@cpu-hotplug.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113711v1/shard-glk4/igt@perf_pmu@cpu-hotplug.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
  [i915#3536]: https://gitlab.freedesktop.org/drm/intel/issues/3536
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
  [i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
  [i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
  [i915#5030]: https://gitlab.freedesktop.org/drm/intel/issues/5030
  [i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
  [i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
  [i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
  [i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
  [i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
  [i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
  [i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957


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

  * Linux: CI_DRM_12704 -> Patchwork_113711v1

  CI-20190529: 20190529
  CI_DRM_12704: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7152: 790b81207a0a6705213ec5ea645bc5e223b2ce1d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113711v1: 0f138ae07efe477bd51695d63b03394050bb6e07 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 10050 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off Imre Deak
@ 2023-02-07 10:17   ` Jani Nikula
  2023-02-07 11:37     ` Imre Deak
  0 siblings, 1 reply; 11+ messages in thread
From: Jani Nikula @ 2023-02-07 10:17 UTC (permalink / raw)
  To: Imre Deak, intel-gfx

On Mon, 06 Feb 2023, Imre Deak <imre.deak@intel.com> wrote:
> DG1/DG2 and MTL+ has added a new display-present HW flag. Check this
> flag and if cleared, disable the driver's display functionality.
>
> So far the missing check resulted in running the display initialization
> sequence, and the WARNs below, due to the display register accesses
> timing out:
>
> [    3.902843] ------------[ cut here ]------------
> [    3.902848] i915 0000:03:00.0: drm_WARN_ON(intel_de_wait_for_set(dev_priv, ((const i915_reg_t){ .reg = (0x42000) }), (1 << (27 - (pg))), 1))
> [    3.902879] WARNING: CPU: 6 PID: 462 at drivers/gpu/drm/i915/display/intel_display_power_well.c:326 gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
> [    3.903009] Modules linked in: hid_sensor_hub intel_ishtp_hid i915(+) rtsx_pci_sdmmc drm_buddy mmc_core drm_display_helper crct10dif_pclmul nvme cec crc32_pclmul intel_ish_ipc crc32c_intel ucsi_acpi hid_multitouch nvme_core ghash_clmulni_intel typec_ucsi rtsx_pci ttm sha512_ssse3 serio_raw intel_ishtp typec video i2c_hid_acpi i2c_hid wmi pinctrl_tigerlake ip6_tables ip_tables x_tables fuse
> [    3.903021] CPU: 6 PID: 462 Comm: systemd-udevd Tainted: G     U             6.2.0-rc6+ #50
> [    3.903023] Hardware name: LENOVO 82VB/LNVNB161216, BIOS KMCN09WW 04/26/2022
> [    3.903023] RIP: 0010:gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
> [    3.903105] Code: 48 8b 5f 50 48 85 db 75 03 48 8b 1f e8 98 bb 0d e9 48 c7 c1 00 65 a1 c0 48 89 da 48 c7 c7 4b c5 a3 c0 48 89 c6 e8 e3 df 53 e9 <0f> 0b 5b c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90
> [    3.903106] RSP: 0018:ffffa7cec0b07a98 EFLAGS: 00010292
> [    3.903107] RAX: 0000000000000080 RBX: ffff9a05430eaaa0 RCX: 0000000000000000
> [    3.903108] RDX: 0000000000000001 RSI: ffffffffaa7ab69e RDI: 00000000ffffffff
> [    3.903108] RBP: ffff9a0552ba2020 R08: ffffffffab062ce0 R09: 00000000abd3ffc2
> [    3.903109] R10: ffffffffffffffff R11: 0000000000000081 R12: 0000000000000000
> [    3.903109] R13: ffff9a05532a9cb0 R14: ffffffffc09e1670 R15: ffff9a0543132000
> [    3.903110] FS:  00007f24d0fe5b40(0000) GS:ffff9a0ccf780000(0000) knlGS:0000000000000000
> [    3.903110] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [    3.903111] CR2: 00005643d7a31a28 CR3: 0000000111614002 CR4: 0000000000770ee0
> [    3.903112] PKRU: 55555554
> [    3.903112] Call Trace:
> [    3.903113]  <TASK>
> [    3.903114]  hsw_power_well_enable+0x12f/0x1a0 [i915]
> [    3.903191]  intel_power_well_enable+0x21/0x70 [i915]
> [    3.903265]  icl_display_core_init+0x92/0x6a0 [i915]
> [    3.903346]  intel_power_domains_init_hw+0x1da/0x5b0 [i915]
> [    3.903422]  intel_modeset_init_noirq+0x60/0x250 [i915]
> [    3.903497]  i915_driver_probe+0x562/0xe10 [i915]
> [    3.903557]  ? i915_pci_probe+0x87/0x180 [i915]
> [    3.903617]  local_pci_probe+0x3e/0x80
> [    3.903621]  pci_device_probe+0xb3/0x210
> [    3.903622]  really_probe+0xdb/0x380
> [    3.903624]  ? pm_runtime_barrier+0x50/0x90
> [    3.903626]  __driver_probe_device+0x78/0x170
> [    3.903627]  driver_probe_device+0x1f/0x90
> [    3.903628]  __driver_attach+0xce/0x1c0
> [    3.903629]  ? __pfx___driver_attach+0x10/0x10
> [    3.903630]  bus_for_each_dev+0x5f/0x90
> [    3.903631]  bus_add_driver+0x1ae/0x200
> [    3.903632]  driver_register+0x89/0xe0
> [    3.903634]  i915_init+0x1f/0x7f [i915]
> [    3.903695]  ? __pfx_init_module+0x10/0x10 [i915]
> [    3.903751]  do_one_initcall+0x43/0x220
> [    3.903753]  ? kmalloc_trace+0x26/0x90
> [    3.903756]  do_init_module+0x4a/0x200
> [    3.903758]  __do_sys_init_module+0x157/0x180
> [    3.903760]  do_syscall_64+0x58/0xc0
> [    3.903762]  ? do_syscall_64+0x67/0xc0
> [    3.903762]  ? exc_page_fault+0x70/0x170
> [    3.903764]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
>
> Bspec: 49189, 53112
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8015
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h          |  3 +++
>  drivers/gpu/drm/i915/intel_device_info.c | 13 +++++++++++++
>  2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 596efc940ee70..a22a0fa299645 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -116,6 +116,9 @@
>   *  #define GEN8_BAR                    _MMIO(0xb888)
>   */
>  
> +#define GU_CNTL_PROTECTED		_MMIO(0x10100C)
> +#define   DEPRESENT			REG_BIT(9)
> +
>  #define GU_CNTL				_MMIO(0x101010)
>  #define   LMEM_INIT			REG_BIT(7)
>  #define   DRIVERFLR			REG_BIT(31)
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 98769e5f2c3d1..044ac552c9280 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -501,6 +501,19 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  			runtime->has_dsc = 0;
>  	}
>  
> +	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
> +	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
> +		drm_info(&dev_priv->drm, "Display fused off, disabling\n");

I think that's a slightly misleading message because we can hit this on
platforms that simply don't have display hardware at all.

Maybe we should add HAS_DISPLAY() in the condition to skip this when
we've already determined there's no display.

> +
> +		runtime->pipe_mask = 0;

This is sufficient.

> +		runtime->cpu_transcoder_mask = 0;
> +		runtime->fbc_mask = 0;
> +		runtime->has_hdcp = 0;
> +		runtime->fbc_mask = 0;
> +		runtime->has_dmc = 0;
> +		runtime->has_dsc = 0;

Please drop all of these. There's an if (!HAS_DISPLAY()) just a few
lines down the purpose of which is to cover all of it in a unified
manner.

BR,
Jani.


> +	}
> +
>  	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
>  		drm_info(&dev_priv->drm,
>  			 "Disabling ppGTT for VT-d support\n");

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display
  2023-02-06 16:35 ` [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display Imre Deak
  2023-02-07  2:45   ` iczero
@ 2023-02-07 10:21   ` Jani Nikula
  2023-02-07 11:46     ` Imre Deak
  1 sibling, 1 reply; 11+ messages in thread
From: Jani Nikula @ 2023-02-07 10:21 UTC (permalink / raw)
  To: Imre Deak, intel-gfx

On Mon, 06 Feb 2023, Imre Deak <imre.deak@intel.com> wrote:
> Factor out a function used both on older and new platforms to disable
> the display functionality if the display is fused-off.

The single point of truth for disabling display is the if
(!HAS_DISPLAY()) path near the end of intel_device_info_runtime_init().

I think it's fine to abstract it if you want, but it should *only* be
called from that *one* place in one path.

So that's a no for this one.

BR,
Jani.

>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_device_info.c | 34 +++++++++++++-----------
>  1 file changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 044ac552c9280..9d6d1fad9f1d9 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -369,6 +369,21 @@ void intel_device_info_runtime_init_early(struct drm_i915_private *i915)
>  	intel_device_info_subplatform_init(i915);
>  }
>  
> +static void disable_fused_off_display(struct drm_i915_private *i915)
> +{
> +	struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
> +
> +	drm_info(&i915->drm, "Display fused off, disabling\n");
> +
> +	runtime->pipe_mask = 0;
> +	runtime->cpu_transcoder_mask = 0;
> +	runtime->fbc_mask = 0;
> +	runtime->has_hdcp = 0;
> +	runtime->fbc_mask = 0;
> +	runtime->has_dmc = 0;
> +	runtime->has_dsc = 0;
> +}
> +
>  /**
>   * intel_device_info_runtime_init - initialize runtime info
>   * @dev_priv: the i915 device
> @@ -454,11 +469,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  		    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
>  		    (HAS_PCH_CPT(dev_priv) &&
>  		     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
> -			drm_info(&dev_priv->drm,
> -				 "Display fused off, disabling\n");
> -			runtime->pipe_mask = 0;
> -			runtime->cpu_transcoder_mask = 0;
> -			runtime->fbc_mask = 0;
> +			disable_fused_off_display(dev_priv);
>  		} else if (fuse_strap & IVB_PIPE_C_DISABLE) {
>  			drm_info(&dev_priv->drm, "PipeC fused off\n");
>  			runtime->pipe_mask &= ~BIT(PIPE_C);
> @@ -502,17 +513,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  	}
>  
>  	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
> -	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
> -		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
> -
> -		runtime->pipe_mask = 0;
> -		runtime->cpu_transcoder_mask = 0;
> -		runtime->fbc_mask = 0;
> -		runtime->has_hdcp = 0;
> -		runtime->fbc_mask = 0;
> -		runtime->has_dmc = 0;
> -		runtime->has_dsc = 0;
> -	}
> +	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT))
> +		disable_fused_off_display(dev_priv);
>  
>  	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
>  		drm_info(&dev_priv->drm,

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off
  2023-02-07 10:17   ` Jani Nikula
@ 2023-02-07 11:37     ` Imre Deak
  2023-02-07 12:10       ` Jani Nikula
  0 siblings, 1 reply; 11+ messages in thread
From: Imre Deak @ 2023-02-07 11:37 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Tue, Feb 07, 2023 at 12:17:59PM +0200, Jani Nikula wrote:
> On Mon, 06 Feb 2023, Imre Deak <imre.deak@intel.com> wrote:
> > DG1/DG2 and MTL+ has added a new display-present HW flag. Check this
> > flag and if cleared, disable the driver's display functionality.
> >
> > So far the missing check resulted in running the display initialization
> > sequence, and the WARNs below, due to the display register accesses
> > timing out:
> >
> > [    3.902843] ------------[ cut here ]------------
> > [    3.902848] i915 0000:03:00.0: drm_WARN_ON(intel_de_wait_for_set(dev_priv, ((const i915_reg_t){ .reg = (0x42000) }), (1 << (27 - (pg))), 1))
> > [    3.902879] WARNING: CPU: 6 PID: 462 at drivers/gpu/drm/i915/display/intel_display_power_well.c:326 gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
> > [    3.903009] Modules linked in: hid_sensor_hub intel_ishtp_hid i915(+) rtsx_pci_sdmmc drm_buddy mmc_core drm_display_helper crct10dif_pclmul nvme cec crc32_pclmul intel_ish_ipc crc32c_intel ucsi_acpi hid_multitouch nvme_core ghash_clmulni_intel typec_ucsi rtsx_pci ttm sha512_ssse3 serio_raw intel_ishtp typec video i2c_hid_acpi i2c_hid wmi pinctrl_tigerlake ip6_tables ip_tables x_tables fuse
> > [    3.903021] CPU: 6 PID: 462 Comm: systemd-udevd Tainted: G     U             6.2.0-rc6+ #50
> > [    3.903023] Hardware name: LENOVO 82VB/LNVNB161216, BIOS KMCN09WW 04/26/2022
> > [    3.903023] RIP: 0010:gen9_wait_for_power_well_fuses+0x71/0x80 [i915]
> > [    3.903105] Code: 48 8b 5f 50 48 85 db 75 03 48 8b 1f e8 98 bb 0d e9 48 c7 c1 00 65 a1 c0 48 89 da 48 c7 c7 4b c5 a3 c0 48 89 c6 e8 e3 df 53 e9 <0f> 0b 5b c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90
> > [    3.903106] RSP: 0018:ffffa7cec0b07a98 EFLAGS: 00010292
> > [    3.903107] RAX: 0000000000000080 RBX: ffff9a05430eaaa0 RCX: 0000000000000000
> > [    3.903108] RDX: 0000000000000001 RSI: ffffffffaa7ab69e RDI: 00000000ffffffff
> > [    3.903108] RBP: ffff9a0552ba2020 R08: ffffffffab062ce0 R09: 00000000abd3ffc2
> > [    3.903109] R10: ffffffffffffffff R11: 0000000000000081 R12: 0000000000000000
> > [    3.903109] R13: ffff9a05532a9cb0 R14: ffffffffc09e1670 R15: ffff9a0543132000
> > [    3.903110] FS:  00007f24d0fe5b40(0000) GS:ffff9a0ccf780000(0000) knlGS:0000000000000000
> > [    3.903110] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [    3.903111] CR2: 00005643d7a31a28 CR3: 0000000111614002 CR4: 0000000000770ee0
> > [    3.903112] PKRU: 55555554
> > [    3.903112] Call Trace:
> > [    3.903113]  <TASK>
> > [    3.903114]  hsw_power_well_enable+0x12f/0x1a0 [i915]
> > [    3.903191]  intel_power_well_enable+0x21/0x70 [i915]
> > [    3.903265]  icl_display_core_init+0x92/0x6a0 [i915]
> > [    3.903346]  intel_power_domains_init_hw+0x1da/0x5b0 [i915]
> > [    3.903422]  intel_modeset_init_noirq+0x60/0x250 [i915]
> > [    3.903497]  i915_driver_probe+0x562/0xe10 [i915]
> > [    3.903557]  ? i915_pci_probe+0x87/0x180 [i915]
> > [    3.903617]  local_pci_probe+0x3e/0x80
> > [    3.903621]  pci_device_probe+0xb3/0x210
> > [    3.903622]  really_probe+0xdb/0x380
> > [    3.903624]  ? pm_runtime_barrier+0x50/0x90
> > [    3.903626]  __driver_probe_device+0x78/0x170
> > [    3.903627]  driver_probe_device+0x1f/0x90
> > [    3.903628]  __driver_attach+0xce/0x1c0
> > [    3.903629]  ? __pfx___driver_attach+0x10/0x10
> > [    3.903630]  bus_for_each_dev+0x5f/0x90
> > [    3.903631]  bus_add_driver+0x1ae/0x200
> > [    3.903632]  driver_register+0x89/0xe0
> > [    3.903634]  i915_init+0x1f/0x7f [i915]
> > [    3.903695]  ? __pfx_init_module+0x10/0x10 [i915]
> > [    3.903751]  do_one_initcall+0x43/0x220
> > [    3.903753]  ? kmalloc_trace+0x26/0x90
> > [    3.903756]  do_init_module+0x4a/0x200
> > [    3.903758]  __do_sys_init_module+0x157/0x180
> > [    3.903760]  do_syscall_64+0x58/0xc0
> > [    3.903762]  ? do_syscall_64+0x67/0xc0
> > [    3.903762]  ? exc_page_fault+0x70/0x170
> > [    3.903764]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
> >
> > Bspec: 49189, 53112
> >
> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8015
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_reg.h          |  3 +++
> >  drivers/gpu/drm/i915/intel_device_info.c | 13 +++++++++++++
> >  2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index 596efc940ee70..a22a0fa299645 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -116,6 +116,9 @@
> >   *  #define GEN8_BAR                    _MMIO(0xb888)
> >   */
> >  
> > +#define GU_CNTL_PROTECTED		_MMIO(0x10100C)
> > +#define   DEPRESENT			REG_BIT(9)
> > +
> >  #define GU_CNTL				_MMIO(0x101010)
> >  #define   LMEM_INIT			REG_BIT(7)
> >  #define   DRIVERFLR			REG_BIT(31)
> > diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> > index 98769e5f2c3d1..044ac552c9280 100644
> > --- a/drivers/gpu/drm/i915/intel_device_info.c
> > +++ b/drivers/gpu/drm/i915/intel_device_info.c
> > @@ -501,6 +501,19 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
> >  			runtime->has_dsc = 0;
> >  	}
> >  
> > +	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
> > +	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
> > +		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
> 
> I think that's a slightly misleading message because we can hit this on
> platforms that simply don't have display hardware at all.

Ok, can change this to "Display not present, disabling".

> Maybe we should add HAS_DISPLAY() in the condition to skip this when
> we've already determined there's no display.

Ok, makes sense and matches the checks above.

> > +
> > +		runtime->pipe_mask = 0;
> 
> This is sufficient.
> 
> > +		runtime->cpu_transcoder_mask = 0;
> > +		runtime->fbc_mask = 0;
> > +		runtime->has_hdcp = 0;
> > +		runtime->fbc_mask = 0;
> > +		runtime->has_dmc = 0;
> > +		runtime->has_dsc = 0;
> 
> Please drop all of these. There's an if (!HAS_DISPLAY()) just a few
> lines down the purpose of which is to cover all of it in a unified
> manner.

Yes, missed this and just did the same as on older platforms above. I
guess

	runtime->cpu_transcoder_mask = 0;
	runtime->fbc_mask = 0;

could be removed from there as well then.

> 
> BR,
> Jani.
> 
> 
> > +	}
> > +
> >  	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
> >  		drm_info(&dev_priv->drm,
> >  			 "Disabling ppGTT for VT-d support\n");
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display
  2023-02-07 10:21   ` Jani Nikula
@ 2023-02-07 11:46     ` Imre Deak
  0 siblings, 0 replies; 11+ messages in thread
From: Imre Deak @ 2023-02-07 11:46 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Tue, Feb 07, 2023 at 12:21:34PM +0200, Jani Nikula wrote:
> On Mon, 06 Feb 2023, Imre Deak <imre.deak@intel.com> wrote:
> > Factor out a function used both on older and new platforms to disable
> > the display functionality if the display is fused-off.
> 
> The single point of truth for disabling display is the if
> (!HAS_DISPLAY()) path near the end of intel_device_info_runtime_init().
> 
> I think it's fine to abstract it if you want, but it should *only* be
> called from that *one* place in one path.

I think for consistency GEN 7,8 should also just clear
runtime->pipe_mask depending on the later block to clear the other
fields.

> So that's a no for this one.

Ok, I can drop this patch.

> BR,
> Jani.
> 
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_device_info.c | 34 +++++++++++++-----------
> >  1 file changed, 18 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> > index 044ac552c9280..9d6d1fad9f1d9 100644
> > --- a/drivers/gpu/drm/i915/intel_device_info.c
> > +++ b/drivers/gpu/drm/i915/intel_device_info.c
> > @@ -369,6 +369,21 @@ void intel_device_info_runtime_init_early(struct drm_i915_private *i915)
> >  	intel_device_info_subplatform_init(i915);
> >  }
> >  
> > +static void disable_fused_off_display(struct drm_i915_private *i915)
> > +{
> > +	struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
> > +
> > +	drm_info(&i915->drm, "Display fused off, disabling\n");
> > +
> > +	runtime->pipe_mask = 0;
> > +	runtime->cpu_transcoder_mask = 0;
> > +	runtime->fbc_mask = 0;
> > +	runtime->has_hdcp = 0;
> > +	runtime->fbc_mask = 0;
> > +	runtime->has_dmc = 0;
> > +	runtime->has_dsc = 0;
> > +}
> > +
> >  /**
> >   * intel_device_info_runtime_init - initialize runtime info
> >   * @dev_priv: the i915 device
> > @@ -454,11 +469,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
> >  		    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
> >  		    (HAS_PCH_CPT(dev_priv) &&
> >  		     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
> > -			drm_info(&dev_priv->drm,
> > -				 "Display fused off, disabling\n");
> > -			runtime->pipe_mask = 0;
> > -			runtime->cpu_transcoder_mask = 0;
> > -			runtime->fbc_mask = 0;
> > +			disable_fused_off_display(dev_priv);
> >  		} else if (fuse_strap & IVB_PIPE_C_DISABLE) {
> >  			drm_info(&dev_priv->drm, "PipeC fused off\n");
> >  			runtime->pipe_mask &= ~BIT(PIPE_C);
> > @@ -502,17 +513,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
> >  	}
> >  
> >  	if ((IS_DGFX(dev_priv) || DISPLAY_VER(dev_priv) >= 14) &&
> > -	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT)) {
> > -		drm_info(&dev_priv->drm, "Display fused off, disabling\n");
> > -
> > -		runtime->pipe_mask = 0;
> > -		runtime->cpu_transcoder_mask = 0;
> > -		runtime->fbc_mask = 0;
> > -		runtime->has_hdcp = 0;
> > -		runtime->fbc_mask = 0;
> > -		runtime->has_dmc = 0;
> > -		runtime->has_dsc = 0;
> > -	}
> > +	    !(intel_de_read(dev_priv, GU_CNTL_PROTECTED) & DEPRESENT))
> > +		disable_fused_off_display(dev_priv);
> >  
> >  	if (GRAPHICS_VER(dev_priv) == 6 && i915_vtd_active(dev_priv)) {
> >  		drm_info(&dev_priv->drm,
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off
  2023-02-07 11:37     ` Imre Deak
@ 2023-02-07 12:10       ` Jani Nikula
  0 siblings, 0 replies; 11+ messages in thread
From: Jani Nikula @ 2023-02-07 12:10 UTC (permalink / raw)
  To: imre.deak; +Cc: intel-gfx

On Tue, 07 Feb 2023, Imre Deak <imre.deak@intel.com> wrote:
> On Tue, Feb 07, 2023 at 12:17:59PM +0200, Jani Nikula wrote:
>> Please drop all of these. There's an if (!HAS_DISPLAY()) just a few
>> lines down the purpose of which is to cover all of it in a unified
>> manner.
>
> Yes, missed this and just did the same as on older platforms above. I
> guess
>
> 	runtime->cpu_transcoder_mask = 0;
> 	runtime->fbc_mask = 0;
>
> could be removed from there as well then.

Agreed.


-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-07 12:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 16:35 [Intel-gfx] [PATCH 1/3] drm/i915: Move display power initialization during driver probing later Imre Deak
2023-02-06 16:35 ` [Intel-gfx] [PATCH 2/3] drm/i915/dgfx, mtl+: Disable display functionality if it's globally fused-off Imre Deak
2023-02-07 10:17   ` Jani Nikula
2023-02-07 11:37     ` Imre Deak
2023-02-07 12:10       ` Jani Nikula
2023-02-06 16:35 ` [Intel-gfx] [PATCH 3/3] drm/i915: Factor out a function disabling fused-off display Imre Deak
2023-02-07  2:45   ` iczero
2023-02-07 10:21   ` Jani Nikula
2023-02-07 11:46     ` Imre Deak
2023-02-06 19:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Move display power initialization during driver probing later Patchwork
2023-02-07  4:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.