drm/i915: Reorder early initialization
Subsystems (2)
PATCH v4 1/3 drm/i915: Reorder early initialization
In upcoming patch, we want to perform more actions in early initialization of the uC. This reordering will help resolve new dependencies that will be introduced by future patch.
v2: s/i915_gem_load_init/i915_gem_init_early (Chris)
v3: s/i915_gem_load_cleanup/i915_gem_cleanup_early (Michal)
--- drivers/gpu/drm/i915/i915_drv.c | 17 ++++++++--------- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gem.c | 5 ++--- 3 files changed, 12 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +8 -9
@@ -919,17 +919,21 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,mutex_init (&dev_priv->wm.wm_mutex);mutex_init (&dev_priv->pps_mutex); -intel_wopcm_init_early (&dev_priv->wopcm); -intel_uc_init_early (dev_priv);i915_memcpy_init_early (dev_priv); ret =i915_workqueues_init (dev_priv);if (ret <0 ) goto err_engines; + ret =i915_gem_init_early (dev_priv); +if (ret <0 ) + goto err_workqueues; +/* This must be called before any calls to HAS_PCH_* */ intel_detect_pch (dev_priv); +intel_wopcm_init_early (&dev_priv->wopcm); +intel_uc_init_early (dev_priv);intel_pm_setup (dev_priv);intel_init_dpio (dev_priv);intel_power_domains_init (dev_priv);
@@ -938,18 +942,13 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,intel_init_display_hooks (dev_priv);intel_init_clock_gating_hooks (dev_priv);intel_init_audio_hooks (dev_priv); - ret =i915_gem_load_init (dev_priv); -if (ret <0 ) - goto err_irq; -intel_display_crc_init (dev_priv);intel_detect_preproduction_hw (dev_priv);return 0 ; -err_irq: -intel_irq_fini (dev_priv); +err_workqueues:i915_workqueues_cleanup (dev_priv); err_engines:i915_engines_cleanup (dev_priv);
@@ -962,8 +961,8 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,*/ static void i915_driver_cleanup_early (struct drm_i915_private *dev_priv) { -i915_gem_load_cleanup (dev_priv);intel_irq_fini (dev_priv); +i915_gem_cleanup_early (dev_priv);i915_workqueues_cleanup (dev_priv);i915_engines_cleanup (dev_priv); }
drivers/gpu/drm/i915/i915_drv.h +2 -2
@@ -2869,8 +2869,8 @@ int i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,int i915_gem_wait_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv);void i915_gem_sanitize (struct drm_i915_private *i915); -int i915_gem_load_init (struct drm_i915_private *dev_priv); -void i915_gem_load_cleanup (struct drm_i915_private *dev_priv); +int i915_gem_init_early (struct drm_i915_private *dev_priv); +void i915_gem_cleanup_early (struct drm_i915_private *dev_priv);void i915_gem_load_init_fences (struct drm_i915_private *dev_priv);int i915_gem_freeze (struct drm_i915_private *dev_priv);int i915_gem_freeze_late (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_gem.c +2 -3
@@ -5502,8 +5502,7 @@ static void i915_gem_init__mm(struct drm_i915_private *i915)INIT_WORK (&i915->mm.free_work, __i915_gem_free_work); } -int -i915_gem_load_init (struct drm_i915_private *dev_priv) +int i915_gem_init_early (struct drm_i915_private *dev_priv) {int err = -ENOMEM ;
@@ -5578,7 +5577,7 @@ static void i915_gem_init__mm(struct drm_i915_private *i915)return err; } -void i915_gem_load_cleanup (struct drm_i915_private *dev_priv) +void i915_gem_cleanup_early (struct drm_i915_private *dev_priv) {i915_gem_drain_freed_objects (dev_priv);GEM_BUG_ON (!llist_empty (&dev_priv->mm.free_list));
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 2/3 drm/i915/uc: Fetch uC firmware in init_early
We were fetching uC firmwares in separate uc_init_fw step, while there is no reason why we can't fetch them during init_early. This will also simplify upcoming patches, as size of the firmware may be used for register initialization.
--- drivers/gpu/drm/i915/i915_drv.c | 8 ++------ drivers/gpu/drm/i915/intel_guc_fw.c | 5 ++--- drivers/gpu/drm/i915/intel_huc_fw.c | 5 ++--- drivers/gpu/drm/i915/intel_uc.c | 37 ++++++++++++++++++------------------- drivers/gpu/drm/i915/intel_uc.h | 3 +-- 5 files changed, 25 insertions(+), 33 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -6
@@ -692,11 +692,9 @@ static int i915_load_modeset_init(struct drm_device *dev)if (ret) goto cleanup_irq; -intel_uc_init_fw (dev_priv); - ret =i915_gem_init (dev_priv);if (ret) - goto cleanup_uc; + goto cleanup_irq;intel_setup_overlay (dev_priv);
@@ -716,8 +714,6 @@ static int i915_load_modeset_init(struct drm_device *dev)if (i915_gem_suspend (dev_priv))DRM_ERROR ("failed to idle hardware; continuing to unload!\n" );i915_gem_fini (dev_priv); -cleanup_uc: -intel_uc_fini_fw (dev_priv); cleanup_irq:drm_irq_uninstall (dev);intel_teardown_gmbus (dev_priv);
@@ -962,6 +958,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,static void i915_driver_cleanup_early (struct drm_i915_private *dev_priv) {intel_irq_fini (dev_priv); +intel_uc_cleanup_early (dev_priv);i915_gem_cleanup_early (dev_priv);i915_workqueues_cleanup (dev_priv);i915_engines_cleanup (dev_priv);
@@ -1457,7 +1454,6 @@ void i915_driver_unload(struct drm_device *dev)i915_reset_error_state (dev_priv);i915_gem_fini (dev_priv); -intel_uc_fini_fw (dev_priv);intel_fbc_cleanup_cfb (dev_priv);intel_power_domains_fini (dev_priv);
drivers/gpu/drm/i915/intel_guc_fw.c +2 -3
@@ -275,9 +275,8 @@ static int guc_fw_xfer(struct intel_uc_fw *guc_fw, struct i915_vma *vma)* Called from intel_uc_init_hw() during driver load, resume from sleep and * after a GPU reset. * -* The firmware image should have already been fetched into memory by the -* earlier call to intel_uc_init_fw(), so here we need to only check that -* fetch succeeded, and then transfer the image to the h/w. +* The firmware image should have already been fetched into memory, so only +* check that fetch succeeded, and then transfer the image to the h/w. * * Return: non-zero code on error */
drivers/gpu/drm/i915/intel_huc_fw.c +2 -3
@@ -155,9 +155,8 @@ static int huc_fw_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma)* Called from intel_uc_init_hw() during driver load, resume from sleep and * after a GPU reset. Note that HuC must be loaded before GuC. * -* The firmware image should have already been fetched into memory by the -* earlier call to intel_uc_init_fw(), so here we need to only check that -* fetch succeeded, and then transfer the image to the h/w. +* The firmware image should have already been fetched into memory, so only +* check that fetch succeeded, and then transfer the image to the h/w. * * Return: non-zero code on error */
drivers/gpu/drm/i915/intel_uc.c +18 -19
@@ -162,36 +162,35 @@ static void sanitize_options_early(struct drm_i915_private *dev_priv)GEM_BUG_ON (i915_modparams.guc_log_level <0 ); } -void intel_uc_init_early (struct drm_i915_private *dev_priv) +void intel_uc_init_early (struct drm_i915_private *i915) { -intel_guc_init_early (&dev_priv->guc); -intel_huc_init_early (&dev_priv->huc); +struct intel_guc *guc = &i915->guc; +struct intel_huc *huc = &i915->huc; -sanitize_options_early (dev_priv); -} +intel_guc_init_early (guc); +intel_huc_init_early (huc); -void intel_uc_init_fw (struct drm_i915_private *dev_priv) -{ -if (!USES_GUC (dev_priv)) -return ; +sanitize_options_early (i915); -if (USES_HUC (dev_priv)) -intel_uc_fw_fetch (dev_priv, &dev_priv->huc.fw); +if (USES_GUC (i915)) +intel_uc_fw_fetch (i915, &guc->fw); -intel_uc_fw_fetch (dev_priv, &dev_priv->guc.fw); +if (USES_HUC (i915)) +intel_uc_fw_fetch (i915, &huc->fw); } -void intel_uc_fini_fw (struct drm_i915_private *dev_priv) +void intel_uc_cleanup_early (struct drm_i915_private *i915) { -if (!USES_GUC (dev_priv)) -return ; +struct intel_guc *guc = &i915->guc; +struct intel_huc *huc = &i915->huc; -intel_uc_fw_fini (&dev_priv->guc.fw); +if (USES_HUC (i915)) +intel_uc_fw_fini (&huc->fw); -if (USES_HUC (dev_priv)) -intel_uc_fw_fini (&dev_priv->huc.fw); +if (USES_GUC (i915)) +intel_uc_fw_fini (&guc->fw); -guc_free_load_err_log (&dev_priv->guc); +guc_free_load_err_log (guc); }/**
drivers/gpu/drm/i915/intel_uc.h +1 -2
@@ -29,9 +29,8 @@#include "i915_params.h" void intel_uc_init_early (struct drm_i915_private *dev_priv); +void intel_uc_cleanup_early (struct drm_i915_private *dev_priv);void intel_uc_init_mmio (struct drm_i915_private *dev_priv); -void intel_uc_init_fw (struct drm_i915_private *dev_priv); -void intel_uc_fini_fw (struct drm_i915_private *dev_priv);int intel_uc_init_misc (struct drm_i915_private *dev_priv);void intel_uc_fini_misc (struct drm_i915_private *dev_priv);void intel_uc_sanitize (struct drm_i915_private *dev_priv);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 3/3 HAX: Enable GuC for CI
In reply to Michal Wajdeczko--- drivers/gpu/drm/i915/i915_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -47,7 +47,7 @@ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ - param(int, enable_guc, 0) \ + param(int, enable_guc, -1) \ param(int, guc_log_level, -1) \ param(char *, guc_firmware_path, NULL) \param (char *, huc_firmware_path, NULL) \
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2018-03-23 12:34:49)
Quoted 4 lines
In upcoming patch, we want to perform more actions in early initialization of the uC. This reordering will help resolve new dependencies that will be introduced by future patch.
Quoted 8 lines
v2: s/i915_gem_load_init/i915_gem_init_early (Chris)
v3: s/i915_gem_load_cleanup/i915_gem_cleanup_early (Michal)Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Joonas Lahtinen <[email protected]>Reviewed-by Chris Wilson <[email protected]> #2
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v4,1/3] drm/i915: Reorder early initialization
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: series starting with [v4,1/3] drm/i915: Reorder early initialization
URL : https://patchwork.freedesktop.org/series/40570/
State : success
== Summary ==
Series 40570v1 series starting with [v4,1/3] drm/i915: Reorder early initialization
https://patchwork.freedesktop.org/api/1.0/series/40570/revisions/1/mbox/
---- Possible new issues:
Test kms_flip:
Subgroup basic-flip-vs-dpms:
incomplete -> PASS (fi-bxt-dsi)---- Known issues:
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
notrun -> INCOMPLETE (fi-bxt-dsi) fdo#103927fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:431s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:445s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:379s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:536s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:298s fi-bxt-dsi total:243 pass:216 dwarn:0 dfail:0 fail:0 skip:26 fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:523s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:521s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:506s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:410s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:511s fi-cnl-y3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:582s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:426s fi-gdg-551 total:285 pass:177 dwarn:0 dfail:0 fail:0 skip:108 time:318s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:539s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:409s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:425s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:473s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:430s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:480s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:471s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:516s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:656s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:440s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:538s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:516s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:502s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:431s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:447s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:595s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:401s Blacklisted hosts: fi-cfl-s3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:567s fi-cnl-psr total:224 pass:198 dwarn:0 dfail:0 fail:1 skip:24 fi-glk-j4005 total:285 pass:226 dwarn:30 dfail:0 fail:0 skip:29 time:487s
157295bdb3516bc0972daffcef016d668f549d79 drm-tip: 2018y-03m-23d-15h-22m-25s UTC integration manifest ec422f8459ce HAX: Enable GuC for CI0e58c15dd3e1 drm/i915/uc: Fetch uC firmware in init_early5b763521b26c drm/i915: Reorder early initialization
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8475/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for series starting with [v4,1/3] drm/i915: Reorder early initialization
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: series starting with [v4,1/3] drm/i915: Reorder early initialization
URL : https://patchwork.freedesktop.org/series/40570/
State : failure
== Summary ==
---- Possible new issues:
Test kms_frontbuffer_tracking:
Subgroup fbc-rgb101010-draw-blt:
fail -> PASS (shard-apl)
Test perf:
Subgroup gen8-unprivileged-single-ctx-counters:
pass -> FAIL (shard-apl)---- Known issues:
Test drv_missed_irq:
pass -> SKIP (shard-apl) fdo#103199
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
incomplete -> PASS (shard-hsw) fdo#103540
Test kms_flip:
Subgroup 2x-plain-flip-ts-check:
pass -> FAIL (shard-hsw) fdo#100368
Subgroup dpms-vs-vblank-race-interruptible:
pass -> FAIL (shard-hsw) fdo#103060
Test kms_sysfs_edid_timing:
pass -> WARN (shard-apl) fdo#100047fdo#103199 https://bugs.freedesktop.org/show_bug.cgi?id=103199
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:3484 pass:1817 dwarn:1 dfail:0 fail:9 skip:1656 time:13430s shard-hsw total:3484 pass:1772 dwarn:1 dfail:0 fail:3 skip:1707 time:11664s shard-snb total:3484 pass:1363 dwarn:1 dfail:0 fail:3 skip:2117 time:7010s
Blacklisted hosts:
shard-kbl total:3241 pass:1770 dwarn:3 dfail:0 fail:13 skip:1450 time:8528s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8475/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx