All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion
@ 2017-10-24 10:50 Michal Wajdeczko
  2017-10-24 11:23 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michal Wajdeczko @ 2017-10-24 10:50 UTC (permalink / raw)
  To: intel-gfx

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 <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_huc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
index c8a48cb..98d1725 100644
--- a/drivers/gpu/drm/i915/intel_huc.c
+++ b/drivers/gpu/drm/i915/intel_huc.c
@@ -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);
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 10:50 [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion Michal Wajdeczko
@ 2017-10-24 11:23 ` Chris Wilson
  2017-10-24 14:25   ` Michal Wajdeczko
  2017-10-24 12:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-10-24 11:23 UTC (permalink / raw)
  To: Michal Wajdeczko, intel-gfx

Quoting Michal Wajdeczko (2017-10-24 11:50:56)
> 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 <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_huc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
> index c8a48cb..98d1725 100644
> --- a/drivers/gpu/drm/i915/intel_huc.c
> +++ b/drivers/gpu/drm/i915/intel_huc.c
> @@ -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);

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Aside, what's the serialisation so that we only try to load one fw at a
time?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 10:50 [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion Michal Wajdeczko
  2017-10-24 11:23 ` Chris Wilson
@ 2017-10-24 12:27 ` Patchwork
  2017-10-26 20:40   ` Chris Wilson
  2017-10-26 21:40 ` ✓ Fi.CI.BAT: success " Patchwork
  2017-10-26 22:39 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 1 reply; 7+ messages in thread
From: Patchwork @ 2017-10-24 12:27 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 11:23 ` Chris Wilson
@ 2017-10-24 14:25   ` Michal Wajdeczko
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Wajdeczko @ 2017-10-24 14:25 UTC (permalink / raw)
  To: intel-gfx, Chris Wilson

On Tue, 24 Oct 2017 13:23:45 +0200, Chris Wilson  
<chris@chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2017-10-24 11:50:56)
>> 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 <michal.wajdeczko@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_huc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_huc.c  
>> b/drivers/gpu/drm/i915/intel_huc.c
>> index c8a48cb..98d1725 100644
>> --- a/drivers/gpu/drm/i915/intel_huc.c
>> +++ b/drivers/gpu/drm/i915/intel_huc.c
>> @@ -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);
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Fi.CI.BAT: failure for drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 12:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-10-26 20:40   ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-26 20:40 UTC (permalink / raw)
  To: Patchwork, Michal Wajdeczko; +Cc: intel-gfx

Quoting Patchwork (2017-10-24 13:27:27)
> == 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)

Unrelated, but unusual GEM_BUG_ON, which I hope I've already fixed...

Pushed, thanks for the patch.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 10:50 [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion Michal Wajdeczko
  2017-10-24 11:23 ` Chris Wilson
  2017-10-24 12:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-10-26 21:40 ` Patchwork
  2017-10-26 22:39 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-10-26 21:40 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/huc: Use helper function while waiting for DMA completion
  2017-10-24 10:50 [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion Michal Wajdeczko
                   ` (2 preceding siblings ...)
  2017-10-26 21:40 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2017-10-26 22:39 ` Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-10-26 22:39 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== 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#99912

fdo#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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-10-26 22:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-24 10:50 [PATCH] drm/i915/huc: Use helper function while waiting for DMA completion Michal Wajdeczko
2017-10-24 11:23 ` Chris Wilson
2017-10-24 14:25   ` Michal Wajdeczko
2017-10-24 12:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-26 20:40   ` Chris Wilson
2017-10-26 21:40 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-26 22:39 ` ✓ 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.