drm/i915: register vga switcheroo later, unregister earlier
Subsystems (2)
PATCH 1/2 drm/i915: register vga switcheroo later, unregister earlier
Move vga switcheroo and dsm handler register later in i915_driver_register(), and unregister in i915_driver_unregister(). The dsm handler unregister is a nop, and is only added for completeness.
My unsubstantiated suspicion is that the vga switcheroo state change would not work as early as we register the hooks currently. In any case exposing the interfaces to the world only after we've got everything set up seems prudent.
Also replace the error handling in vga switcheroo register with a simple error message. This is done at the same time due to lack of error propagation from i915_driver_register().
--- drivers/gpu/drm/i915/i915_drv.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +9 -10
@@ -292,12 +292,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)if (ret) goto out; -intel_register_dsm_handler (); - - ret =i915_switcheroo_register (i915); -if (ret) - goto cleanup_vga_client; -intel_power_domains_init_hw (i915, false);intel_csr_ucode_init (i915);
@@ -343,8 +337,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915) cleanup_csr:intel_csr_ucode_fini (i915);intel_power_domains_driver_remove (i915); -i915_switcheroo_unregister (i915); -cleanup_vga_client:intel_vga_unregister (i915); out:return ret;
@@ -358,8 +350,6 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915)intel_bios_driver_remove (i915); -i915_switcheroo_unregister (i915); -intel_vga_unregister (i915);intel_csr_ucode_fini (i915);
@@ -1366,6 +1356,11 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_power_domains_enable (dev_priv);intel_runtime_pm_enable (&dev_priv->runtime_pm); + +intel_register_dsm_handler (); + +if (i915_switcheroo_register (dev_priv)) +drm_err (&dev_priv->drm,"Failed to register vga switcheroo!\n" ); }/**
@@ -1374,6 +1369,10 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)*/ static void i915_driver_unregister (struct drm_i915_private *dev_priv) { +i915_switcheroo_unregister (dev_priv); + +intel_unregister_dsm_handler (); +intel_runtime_pm_disable (&dev_priv->runtime_pm);intel_power_domains_disable (dev_priv);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: switch i915_driver_probe() to use i915 local variable
Prefer i915 over dev_priv where possible. No functional changes.
--- drivers/gpu/drm/i915/i915_drv.c | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +27 -27
@@ -1485,16 +1485,16 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {const struct intel_device_info *match_info = (struct intel_device_info *)ent->driver_data; -struct drm_i915_private *dev_priv; +struct drm_i915_private *i915;int ret; - dev_priv =i915_driver_create (pdev, ent); -if (IS_ERR (dev_priv)) -return PTR_ERR (dev_priv); + i915 =i915_driver_create (pdev, ent); +if (IS_ERR (i915)) +return PTR_ERR (i915);/* Disable nuclear pageflip by default on pre-ILK */ if (!i915_modparams.nuclear_pageflip && match_info->gen <5 ) - dev_priv->drm.driver_features &= ~DRIVER_ATOMIC ; + i915->drm.driver_features &= ~DRIVER_ATOMIC ;/* * Check if we support fake LMEM -- for now we only unleash this for
@@ -1502,13 +1502,13 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)*/ #if IS_ENABLED (CONFIG_DRM_I915_SELFTEST )if (IS_ENABLED (CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM )) { -if (INTEL_GEN (dev_priv) >=9 && i915_selftest.live <0 && +if (INTEL_GEN (i915) >=9 && i915_selftest.live <0 && i915_modparams.fake_lmem_start) { -mkwrite_device_info (dev_priv)->memory_regions = +mkwrite_device_info (i915)->memory_regions =REGION_SMEM |REGION_LMEM |REGION_STOLEN ; -mkwrite_device_info (dev_priv)->is_dgfx = true; -GEM_BUG_ON (!HAS_LMEM (dev_priv)); -GEM_BUG_ON (!IS_DGFX (dev_priv)); +mkwrite_device_info (i915)->is_dgfx = true; +GEM_BUG_ON (!HAS_LMEM (i915)); +GEM_BUG_ON (!IS_DGFX (i915)); } }#endif
@@ -1517,48 +1517,48 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (ret) goto out_fini; - ret =i915_driver_early_probe (dev_priv); + ret =i915_driver_early_probe (i915);if (ret <0 ) goto out_pci_disable; -disable_rpm_wakeref_asserts (&dev_priv->runtime_pm); +disable_rpm_wakeref_asserts (&i915->runtime_pm); -i915_detect_vgpu (dev_priv); +i915_detect_vgpu (i915); - ret =i915_driver_mmio_probe (dev_priv); + ret =i915_driver_mmio_probe (i915);if (ret <0 ) goto out_runtime_pm_put; - ret =i915_driver_hw_probe (dev_priv); + ret =i915_driver_hw_probe (i915);if (ret <0 ) goto out_cleanup_mmio; - ret =i915_driver_modeset_probe (dev_priv); + ret =i915_driver_modeset_probe (i915);if (ret <0 ) goto out_cleanup_hw; -i915_driver_register (dev_priv); +i915_driver_register (i915); -enable_rpm_wakeref_asserts (&dev_priv->runtime_pm); +enable_rpm_wakeref_asserts (&i915->runtime_pm); -i915_welcome_messages (dev_priv); +i915_welcome_messages (i915);return 0 ; out_cleanup_hw: -i915_driver_hw_remove (dev_priv); -intel_memory_regions_driver_release (dev_priv); -i915_ggtt_driver_release (dev_priv); +i915_driver_hw_remove (i915); +intel_memory_regions_driver_release (i915); +i915_ggtt_driver_release (i915); out_cleanup_mmio: -i915_driver_mmio_release (dev_priv); +i915_driver_mmio_release (i915); out_runtime_pm_put: -enable_rpm_wakeref_asserts (&dev_priv->runtime_pm); -i915_driver_late_release (dev_priv); +enable_rpm_wakeref_asserts (&i915->runtime_pm); +i915_driver_late_release (i915); out_pci_disable:pci_disable_device (pdev); out_fini: -i915_probe_error (dev_priv,"Device initialization failed (%d)\n" , ret); -i915_driver_destroy (dev_priv); +i915_probe_error (i915,"Device initialization failed (%d)\n" , ret); +i915_driver_destroy (i915);return ret; }
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [CI,1/2] drm/i915: register vga switcheroo later, unregister earlier
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [CI,1/2] drm/i915: register vga switcheroo later, unregister earlier
URL : https://patchwork.freedesktop.org/series/73317/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7917_full -> Patchwork_16526_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_16526_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#110841])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([i915#677]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@preempt-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#112146]) +5 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb4/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-kbl: [PASS][7] -> [FAIL][8] ([i915#644])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-kbl7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-kbl7/igt@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#69])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl10/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl8/igt@[email protected]
* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-skl: [PASS][11] -> [INCOMPLETE][12] ([i915#151] / [i915#69])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl1/igt@[email protected]
* igt@i915_pm_rps@waitboost:
- shard-iclb: [PASS][13] -> [FAIL][14] ([i915#413])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb4/igt@[email protected]
* igt@i915_selftest@live_gtt:
- shard-apl: [PASS][15] -> [TIMEOUT][16] ([fdo#112271])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-apl1/igt@i915_selftest@live_gtt.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-apl4/igt@i915_selftest@live_gtt.html
* igt@i915_suspend@sysfs-reader:
- shard-apl: [PASS][17] -> [DMESG-WARN][18] ([i915#180]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-apl4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-apl8/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-kbl2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-kbl7/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-glk: [PASS][21] -> [FAIL][22] ([i915#899])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-glk3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-glk1/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441]) +2 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html
* igt@perf_pmu@busy-accuracy-2-vcs1:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#112080]) +8 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb3/igt@[email protected]
* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109276]) +15 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb3/igt@[email protected]
#### Possible fixes ####
* {igt@gem_ctx_persistence@engines-mixed-process@bcs0}:
- shard-skl: [INCOMPLETE][29] -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl6/igt@gem_ctx_persistence@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl8/igt@gem_ctx_persistence@[email protected]
* {igt@gem_ctx_persistence@engines-mixed-process@rcs0}:
- shard-skl: [FAIL][31] ([i915#679]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl6/igt@gem_ctx_persistence@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl8/igt@gem_ctx_persistence@[email protected]
* igt@gem_exec_async@concurrent-writes-bsd:
- shard-iclb: [SKIP][33] ([fdo#112146]) -> [PASS][34] +3 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb7/igt@[email protected]
* igt@gem_exec_balancer@hang:
- shard-iclb: [TIMEOUT][35] ([fdo#112271]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb3/igt@[email protected]
* igt@gem_exec_schedule@independent-bsd2:
- shard-iclb: [SKIP][37] ([fdo#109276]) -> [PASS][38] +21 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb4/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][39] ([i915#644]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-glk3/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-glk2/igt@[email protected]
- shard-skl: [FAIL][41] ([i915#644]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl10/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl10/igt@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-kbl: [DMESG-WARN][43] ([i915#180]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-kbl6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-kbl1/igt@[email protected]
* igt@gem_tiled_partial_pwrite_pread@writes-after-reads:
- shard-hsw: [FAIL][45] ([i915#817]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-hsw6/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-hsw5/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-64x64-sliding:
- shard-apl: [FAIL][47] ([i915#54]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-apl3/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-apl3/igt@[email protected]
* igt@kms_flip@2x-plain-flip-fb-recreate:
- shard-glk: [FAIL][49] ([i915#34]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-glk6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-glk6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [FAIL][51] ([i915#79]) -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl5/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl1/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-blt:
- shard-skl: [FAIL][53] ([i915#49]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl4/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl5/igt@[email protected]
* {igt@kms_hdr@bpc-switch-dpms}:
- shard-skl: [FAIL][55] ([i915#1188]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl7/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl7/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [DMESG-WARN][57] ([i915#180]) -> [PASS][58] +6 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-apl6/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-apl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][59] ([fdo#108145]) -> [PASS][60] +1 similar issue
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-skl4/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-skl5/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][61] ([fdo#109441]) -> [PASS][62] +3 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_cpu.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@perf_pmu@busy-vcs1:
- shard-iclb: [SKIP][63] ([fdo#112080]) -> [PASS][64] +16 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb3/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb4/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [FAIL][65] ([IGT#28]) -> [SKIP][66] ([fdo#112080])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-iclb1/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-iclb8/igt@[email protected]
* igt@gem_tiled_blits@interruptible:
- shard-hsw: [FAIL][67] ([i915#818]) -> [FAIL][68] ([i915#694])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-hsw1/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-hsw6/igt@[email protected]
* igt@gem_tiled_blits@normal:
- shard-hsw: [FAIL][69] ([i915#694]) -> [FAIL][70] ([i915#818])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-hsw1/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-hsw7/igt@[email protected]
* igt@i915_pm_rpm@universal-planes:
- shard-snb: [INCOMPLETE][71] ([i915#82]) -> [SKIP][72] ([fdo#109271])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7917/shard-snb5/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16526/shard-snb2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#679]: https://gitlab.freedesktop.org/drm/intel/issues/679
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#817]: https://gitlab.freedesktop.org/drm/intel/issues/817
[i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7917 -> Patchwork_16526
CI-20190529: 20190529
CI_DRM_7917: 57a1e61c216bb9ef9dcd9dca1681266510a837f6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5435: 2b6d4476dde53c363b8808ed9f0dd5547ac78641 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16526: 1775c2868c4f65a07a890ed645bc110cd7b96dc8 @ 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_16526/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Jani Nikula
Move vga switcheroo and dsm handler register later in
i915_driver_register(), and unregister ini915_driver_unregister(). The dsm handler unregister is a nop, and is only added for completeness.My unsubstantiated suspicion is that the vga switcheroo state change would not work as early as we register the hooks currently. In any case exposing the interfaces to the world only after we've got everything set up seems prudent.
Quoted 8 lines
Also replace the error handling in vga switcheroo register with a simple error message. This is done at the same time due to lack of error propagation from
i915_driver_register().Cc Lukas Wunner <[email protected]>Cc Ville Syrjälä <[email protected]>Acked-by Lukas Wunner <[email protected]>Signed-off-by Jani Nikula <[email protected]>
Both finally pushed, thanks for the acks and reviews.
BR,
Jani.
Quoted 61 lines
--- drivers/gpu/drm/i915/i915_drv.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/i915_drv.c +9
-10@@ -292,12 +292,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)if (ret) goto out; -intel_register_dsm_handler (); - - ret =i915_switcheroo_register (i915); -if (ret) - goto cleanup_vga_client; -intel_power_domains_init_hw (i915, false);intel_csr_ucode_init (i915);@@ -343,8 +337,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915) cleanup_csr:intel_csr_ucode_fini (i915);intel_power_domains_driver_remove (i915); -i915_switcheroo_unregister (i915); -cleanup_vga_client:intel_vga_unregister (i915); out:return ret;@@ -358,8 +350,6 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915)intel_bios_driver_remove (i915); -i915_switcheroo_unregister (i915); -intel_vga_unregister (i915);intel_csr_ucode_fini (i915);@@ -1366,6 +1356,11 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_power_domains_enable (dev_priv);intel_runtime_pm_enable (&dev_priv->runtime_pm); + +intel_register_dsm_handler (); + +if (i915_switcheroo_register (dev_priv)) +drm_err (&dev_priv->drm,"Failed to register vga switcheroo!\n" ); }/** @@ -1374,6 +1369,10 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)*/ static void i915_driver_unregister (struct drm_i915_private *dev_priv) { +i915_switcheroo_unregister (dev_priv); + +intel_unregister_dsm_handler (); +intel_runtime_pm_disable (&dev_priv->runtime_pm);intel_power_domains_disable (dev_priv);
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx