drm/i915/guc: Enable send function only after successful init
Subsystems (2)
PATCH 1/1 drm/i915/guc: Enable send function only after successful init
It is safer to setup valid send function after successful GuC hardware initialization. In addition we prepare placeholder where we can setup any alternate GuC communication mechanism.
--- drivers/gpu/drm/i915/intel_uc.c | 27 ++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_uc.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uc.c +26 -1
@@ -99,7 +99,7 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)struct intel_guc *guc = &dev_priv->guc;mutex_init (&guc->send_mutex); - guc->send = intel_guc_send_mmio; + guc->send = intel_guc_send_nop; } static void fetch_uc_fw(struct drm_i915_private *dev_priv,
@@ -252,13 +252,27 @@ void intel_uc_fini_fw(struct drm_i915_private *dev_priv)__intel_uc_fw_fini (&dev_priv->huc.fw); } +static int guc_enable_communication (struct intel_guc *guc) +{ +/* XXX: placeholder for alternate setup */ + guc->send = intel_guc_send_mmio; +return 0 ; +} + +static void guc_disable_communication (struct intel_guc *guc) +{ + guc->send = intel_guc_send_nop; +} +int intel_uc_init_hw (struct drm_i915_private *dev_priv) { +struct intel_guc *guc = &dev_priv->guc;int ret, attempts;if (!i915.enable_guc_loading)return 0 ; +guc_disable_communication (guc);gen9_reset_guc_interrupts (dev_priv);/* We need to notify the guc whenever we change the GGTT */
@@ -308,6 +322,10 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)if (ret) goto err_submission; + ret =guc_enable_communication (guc); +if (ret) + goto err_submission; +intel_guc_auth_huc (dev_priv);if (i915.enable_guc_submission) {if (i915.guc_log_level >=0 )
@@ -330,6 +348,7 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)* marks the GPU as wedged until reset). */ err_interrupts: +guc_disable_communication (guc);gen9_disable_guc_interrupts (dev_priv); err_submission:if (i915.enable_guc_submission)
@@ -364,6 +383,12 @@ void intel_uc_fini_hw(struct drm_i915_private *dev_priv)i915_ggtt_disable_guc (dev_priv); } +int intel_guc_send_nop (struct intel_guc *guc,const u32 *action,u32 len) +{ +WARN (1 ,"Unexpected send: action=%#x\n" , *action); +return -ENOSYS ; +} +/* * This function implements the MMIO based host to GuC interface. */
drivers/gpu/drm/i915/intel_uc.h +1 -0
@@ -227,6 +227,7 @@ void intel_uc_fini_fw(struct drm_i915_private *dev_priv);int intel_uc_init_hw (struct drm_i915_private *dev_priv);void intel_uc_fini_hw (struct drm_i915_private *dev_priv);int intel_guc_sample_forcewake (struct intel_guc *guc); +int intel_guc_send_nop (struct intel_guc *guc,const u32 *action,u32 len);int intel_guc_send_mmio (struct intel_guc *guc,const u32 *action,u32 len);static inline int intel_guc_send (struct intel_guc *guc,const u32 *action,u32 len) {
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/guc: Enable send function only after successful init
== Series Details ==
== Series Details ==
Series: drm/i915/guc: Enable send function only after successful init
URL : https://patchwork.freedesktop.org/series/23702/
State : failure
== Summary ==
Series 23702v1 drm/i915/guc: Enable send function only after successful init
https://patchwork.freedesktop.org/api/1.0/series/23702/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test gvt_basic:
Subgroup invalid-placeholder-test:
skip -> INCOMPLETE (fi-hsw-4770r)fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:434s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:430s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:569s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:506s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time:535s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:484s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:483s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:413s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:15 fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:422s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:493s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:473s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:466s fi-kbl-7560u total:278 pass:267 dwarn:1 dfail:0 fail:0 skip:10 time:573s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:461s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:570s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:464s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:491s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:434s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:527s fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time:404s
86cc4197d2fa4c45b75bf54026765d27d86b84c8 drm-tip: 2017y-04m-28d-09h-14m-47s UTC integration manifest f79780b drm/i915/guc: Enable send function only after successful init
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4578/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable send function only after successful init
Hi,
Quoted 20 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Patchwork
Sent: Friday, April 28, 2017 4:50 PM
To: Wajdeczko, Michal <[email protected]>
Cc: [email protected]
Subject: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable send function only after successful init== Series Details ==
Series: drm/i915/guc: Enable send function only after successful init
URL : https://patchwork.freedesktop.org/series/23702/
State : failure== Summary ==
Series 23702v1 drm/i915/guc: Enable send function only after successful init
https://patchwork.freedesktop.org/api/1.0/series/23702/revisions/1/mbox/
Quoted 6 lines
Test
gem_exec_flush:Subgroup basic-batch-kernel-default-uc: pass -> FAIL (fi-snb-2600) fdo#100007 Test gvt_basic: Subgroup invalid-placeholder-test: skip -> INCOMPLETE (fi-hsw-4770r)
I guess just need to re-open:
https://bugs.freedesktop.org/show_bug.cgi?id=100256
blah...done, marked for the future.
Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: Enable send function only after successful init
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/guc: Enable send function only after successful init
URL : https://patchwork.freedesktop.org/series/23702/
State : success
== Summary ==
Series 23702v1 drm/i915/guc: Enable send function only after successful init
https://patchwork.freedesktop.org/api/1.0/series/23702/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:433s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:427s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:567s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:514s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time:556s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:484s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:480s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:409s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:406s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:413s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:495s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:472s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:456s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:567s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:455s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:574s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:456s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:494s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:436s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:530s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:408s
86cc4197d2fa4c45b75bf54026765d27d86b84c8 drm-tip: 2017y-04m-28d-09h-14m-47s UTC integration manifest 90051ca drm/i915/guc: Enable send function only after successful init
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4579/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Michal Wajdeczko
It is safer to setup valid send function after successful GuC hardware initialization. In addition we prepare placeholder where we can setup any alternate GuC communication mechanism.
Signed-off-by Michal Wajdeczko <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx