drm/i915/huc: Use helper function while waiting for DMA completion
Subsystems (2)
PATCH 1/1 drm/i915/huc: Use helper function while waiting for DMA completion
Waiting for DMA status register can be done with dedicated function. Lets use it as additional bonus will be smaller driver footprint.
--- drivers/gpu/drm/i915/intel_huc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_huc.c +1 -1
@@ -151,7 +151,7 @@ static int huc_ucode_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma)I915_WRITE (DMA_CTRL ,_MASKED_BIT_ENABLE (HUC_UKERNEL |START_DMA ));/* Wait for DMA to finish */ - ret =wait_for ((I915_READ (DMA_CTRL ) &START_DMA ) ==0 ,100 ); + ret =intel_wait_for_register_fw (dev_priv,DMA_CTRL ,START_DMA ,0 ,100 );DRM_DEBUG_DRIVER ("HuC DMA transfer wait over with ret %d\n" , ret);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2017-10-24 11:50:56)
Quoted 15 lines
Waiting for DMA status register can be done with dedicated function. Lets use it as additional bonus will be smaller driver footprint.
Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>--- drivers/gpu/drm/i915/intel_huc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_huc.c +0
-0
drivers/gpu/drm/i915/intel_huc.c static int huc_ucode_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma) · line 156
Quoted 7 lines
drivers/gpu/drm/i915/intel_huc.c +1
-1@@ -151,7 +151,7 @@ static int huc_ucode_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma)I915_WRITE (DMA_CTRL ,_MASKED_BIT_ENABLE (HUC_UKERNEL |START_DMA ));/* Wait for DMA to finish */ - ret =wait_for ((I915_READ (DMA_CTRL ) &START_DMA ) ==0 ,100 ); + ret =intel_wait_for_register_fw (dev_priv,DMA_CTRL ,START_DMA ,0 ,100 );DRM_DEBUG_DRIVER ("HuC DMA transfer wait over with ret %d\n" , ret);
Aside, what's the serialisation so that we only try to load one fw at a time?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Chris Wilson
Quoting Michal Wajdeczko (2017-10-24 11:50:56)
Quoted 24 lines
Waiting for DMA status register can be done with dedicated function. Lets use it as additional bonus will be smaller driver footprint.
Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>--- drivers/gpu/drm/i915/intel_huc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_huc.c +1
-1@@ -151,7 +151,7 @@ static int huc_ucode_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma)I915_WRITE (DMA_CTRL ,_MASKED_BIT_ENABLE (HUC_UKERNEL |START_DMA ));/* Wait for DMA to finish */ - ret =wait_for ((I915_READ (DMA_CTRL ) &START_DMA ) ==0 ,100 ); + ret =intel_wait_for_register_fw (dev_priv,DMA_CTRL ,START_DMA ,0 ,100 );
Quoted 7 lines
Quoted 2 lines
DRM_DEBUG_DRIVER("HuC DMA transfer wait over with ret %d\n",
ret);Reviewed-by Chris Wilson <[email protected]>Aside, what's the serialisation so that we only try to load one fw at a time?
It looks that we just wait right after starting DMA. And if we attempt to next DMA while previous is still running then it will be likely silently ignored by HW as control bit START_DMA would be still on.
If we want to be bullet-proof then maybe before we start programming new DMA xfer we should verify that DMA hw is idle (and then wait little more or just abort immediately)
Michal
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/huc: Use helper function while waiting for DMA completion
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/huc: Use helper function while waiting for DMA completion
URL : https://patchwork.freedesktop.org/series/32528/
State : failure
== Summary ==
Series 32528v1 drm/i915/huc: Use helper function while waiting for DMA completion
https://patchwork.freedesktop.org/api/1.0/series/32528/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-a:
pass -> INCOMPLETE (fi-glk-1)fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:368s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:513s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:264s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:496s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:494s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:492s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:476s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:551s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:419s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:250s fi-glk-1 total:239 pass:212 dwarn:0 dfail:0 fail:0 skip:26 fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:491s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:430s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:427s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:431s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:493s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:456s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:493s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:569s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:472s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:579s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:540s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:459s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:641s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:517s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:504s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:453s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:562s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:423s
5c82a37eff83ab4e60e760fbaf03db5ba0563497 drm-tip: 2017y-10m-23d-18h-06m-28s UTC integration manifest e071ef7ddca3 drm/i915/huc: Use helper function while waiting for DMA completion
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6156/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915/huc: Use helper function while waiting for DMA completion
Quoting Patchwork (2017-10-24 13:27:27)
Quoted 6 lines
== Series Details ==
Series: drm/i915/huc: Use helper function while waiting for DMA completion
URL : https://patchwork.freedesktop.org/series/32528/
State : failure
Quoted 8 lines
== Summary ==
Series 32528v1 drm/i915/huc: Use helper function while waiting for DMA completion
https://patchwork.freedesktop.org/api/1.0/series/32528/revisions/1/mbox/Test
kms_pipe_crc_basic:Subgroup read-crc-pipe-a: pass -> INCOMPLETE (fi-glk-1)
Unrelated, but unusual GEM_BUG_ON, which I hope I've already fixed...
Pushed, thanks for the patch.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/huc: Use helper function while waiting for DMA completion
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/huc: Use helper function while waiting for DMA completion
URL : https://patchwork.freedesktop.org/series/32528/
State : success
== Summary ==
Series 32528v1 drm/i915/huc: Use helper function while waiting for DMA completion
https://patchwork.freedesktop.org/api/1.0/series/32528/revisions/1/mbox/
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:446s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:371s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:524s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:498s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:501s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:479s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:539s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:602s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:416s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:250s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:576s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:484s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:425s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:428s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:432s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:494s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:495s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:573s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:475s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:582s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:551s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:595s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:645s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:514s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:496s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:458s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:571s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:417s
faa3689f622af5d0e2d6bf106c84ab1d5ec49959 drm-tip: 2017y-10m-26d-18h-35m-28s UTC integration manifest 573eeb95fd0e drm/i915/huc: Use helper function while waiting for DMA completion
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6216/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/huc: Use helper function while waiting for DMA completion
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/huc: Use helper function while waiting for DMA completion
URL : https://patchwork.freedesktop.org/series/32528/
State : success
== Summary ==
Test kms_flip:
Subgroup modeset-vs-vblank-race:
dmesg-warn -> PASS (shard-hsw) fdo#103060
Test kms_busy:
Subgroup extended-modeset-hang-newfb-with-reset-render-A:
dmesg-warn -> PASS (shard-hsw) fdo#102249 +1
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102249 https://bugs.freedesktop.org/show_bug.cgi?id=102249
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
shard-hsw total:2539 pass:1433 dwarn:1 dfail:0 fail:8 skip:1097 time:9218s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6216/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx