All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Disable iommu for the mock device
@ 2017-09-14 16:22 Chris Wilson
  2017-09-14 16:44 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-09-14 16:22 UTC (permalink / raw)
  To: intel-gfx

On some machines, the iommu cannot allocate a domain for the mock device
causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM.
For the mock selftests, we are using a fake device and do not care about
iommu; so convince intel_iommu to treat us as a dummy device with an
identity mapping (and no iommu domain).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 678723430d78..38ed006be5be 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -146,6 +146,9 @@ struct drm_i915_private *mock_gem_device(void)
 	dev_set_name(&pdev->dev, "mock");
 	dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 
+	/* hack to disable iommu for the fake device; force identity mapping */
+	pdev->dev.archdata.iommu = (void *)-1;
+
 	dev_pm_domain_set(&pdev->dev, &pm_domain);
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
-- 
2.14.1

_______________________________________________
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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Disable iommu for the mock device
  2017-09-14 16:22 [PATCH] drm/i915/selftests: Disable iommu for the mock device Chris Wilson
@ 2017-09-14 16:44 ` Patchwork
  2017-09-14 22:09 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-14 16:44 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Disable iommu for the mock device
URL   : https://patchwork.freedesktop.org/series/30369/
State : success

== Summary ==

Series 30369v1 drm/i915/selftests: Disable iommu for the mock device
https://patchwork.freedesktop.org/api/1.0/series/30369/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> DMESG-FAIL (fi-kbl-7500u) fdo#102514
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                pass       -> FAIL       (fi-snb-2600) fdo#100215
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                skip       -> PASS       (fi-skl-x1585l)

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:445s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:455s
fi-blb-e6850     total:289  pass:224  dwarn:1   dfail:0   fail:0   skip:64  time:377s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:532s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:268s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:508s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:502s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:502s
fi-cfl-s         total:289  pass:223  dwarn:34  dfail:0   fail:0   skip:32  time:542s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:456s
fi-glk-2a        total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:589s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:427s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:406s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:444s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:490s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:463s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:1   fail:0   skip:24  time:488s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:580s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:585s
fi-pnv-d510      total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:564s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:524s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:505s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:459s
fi-skl-x1585l    total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:479s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:564s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:1   skip:39  time:422s

46e05d756fe32271bca4ac3ef1b3f1f6006fcc0c drm-tip: 2017y-09m-14d-14h-46m-01s UTC integration manifest
3b75980d6db7 drm/i915/selftests: Disable iommu for the mock device

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5703/
_______________________________________________
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/selftests: Disable iommu for the mock device
  2017-09-14 16:22 [PATCH] drm/i915/selftests: Disable iommu for the mock device Chris Wilson
  2017-09-14 16:44 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-09-14 22:09 ` Patchwork
  2017-09-18 14:22 ` [PATCH] " Chris Wilson
  2017-09-18 16:40 ` Chris Wilson
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-14 22:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Disable iommu for the mock device
URL   : https://patchwork.freedesktop.org/series/30369/
State : success

== Summary ==

Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-C-planes:
                skip       -> PASS       (shard-hsw)
Test kms_rmfb:
        Subgroup close-fd:
                skip       -> PASS       (shard-hsw)
Test kms_universal_plane:
        Subgroup universal-plane-pipe-B-functional:
                skip       -> PASS       (shard-hsw)
Test kms_cursor_crc:
        Subgroup cursor-256x256-dpms:
                skip       -> PASS       (shard-hsw)
Test gem_flink_race:
        Subgroup flink_close:
                pass       -> FAIL       (shard-hsw) fdo#102655

fdo#102655 https://bugs.freedesktop.org/show_bug.cgi?id=102655

shard-hsw        total:2313 pass:1245 dwarn:0   dfail:0   fail:13  skip:1055 time:9416s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5703/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

* Re: [PATCH] drm/i915/selftests: Disable iommu for the mock device
  2017-09-14 16:22 [PATCH] drm/i915/selftests: Disable iommu for the mock device Chris Wilson
  2017-09-14 16:44 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-09-14 22:09 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-09-18 14:22 ` Chris Wilson
  2017-09-18 15:32   ` Matthew Auld
  2017-09-18 16:40 ` Chris Wilson
  3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2017-09-18 14:22 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2017-09-14 17:22:40)
> On some machines, the iommu cannot allocate a domain for the mock device
> causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM.
> For the mock selftests, we are using a fake device and do not care about
> iommu; so convince intel_iommu to treat us as a dummy device with an
> identity mapping (and no iommu domain).
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Elizabeth De La Torre Mena <elizabethx.de.la.torre.mena@intel.com>

> ---
>  drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index 678723430d78..38ed006be5be 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -146,6 +146,9 @@ struct drm_i915_private *mock_gem_device(void)
>         dev_set_name(&pdev->dev, "mock");
>         dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>  
> +       /* hack to disable iommu for the fake device; force identity mapping */
> +       pdev->dev.archdata.iommu = (void *)-1;
> +
>         dev_pm_domain_set(&pdev->dev, &pm_domain);
>         pm_runtime_enable(&pdev->dev);
>         pm_runtime_dont_use_autosuspend(&pdev->dev);
> -- 
> 2.14.1
> 
_______________________________________________
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/selftests: Disable iommu for the mock device
  2017-09-18 14:22 ` [PATCH] " Chris Wilson
@ 2017-09-18 15:32   ` Matthew Auld
  2017-09-18 16:03     ` Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Auld @ 2017-09-18 15:32 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development

On 18 September 2017 at 15:22, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Chris Wilson (2017-09-14 17:22:40)
>> On some machines, the iommu cannot allocate a domain for the mock device
>> causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM.
>> For the mock selftests, we are using a fake device and do not care about
>> iommu; so convince intel_iommu to treat us as a dummy device with an
>> identity mapping (and no iommu domain).
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Tested-by: Elizabeth De La Torre Mena <elizabethx.de.la.torre.mena@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
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/selftests: Disable iommu for the mock device
  2017-09-18 15:32   ` Matthew Auld
@ 2017-09-18 16:03     ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-09-18 16:03 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development

Quoting Matthew Auld (2017-09-18 16:32:19)
> On 18 September 2017 at 15:22, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Quoting Chris Wilson (2017-09-14 17:22:40)
> >> On some machines, the iommu cannot allocate a domain for the mock device
> >> causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM.
> >> For the mock selftests, we are using a fake device and do not care about
> >> iommu; so convince intel_iommu to treat us as a dummy device with an
> >> identity mapping (and no iommu domain).
> >>
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080
> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Tested-by: Elizabeth De La Torre Mena <elizabethx.de.la.torre.mena@intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>

And pushed, thanks for the review. Definitely a hack, but works for
now..,
-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

* Re: [PATCH] drm/i915/selftests: Disable iommu for the mock device
  2017-09-14 16:22 [PATCH] drm/i915/selftests: Disable iommu for the mock device Chris Wilson
                   ` (2 preceding siblings ...)
  2017-09-18 14:22 ` [PATCH] " Chris Wilson
@ 2017-09-18 16:40 ` Chris Wilson
  3 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-09-18 16:40 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2017-09-14 17:22:40)
> On some machines, the iommu cannot allocate a domain for the mock device
> causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM.
> For the mock selftests, we are using a fake device and do not care about
> iommu; so convince intel_iommu to treat us as a dummy device with an
> identity mapping (and no iommu domain).
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index 678723430d78..38ed006be5be 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -146,6 +146,9 @@ struct drm_i915_private *mock_gem_device(void)
>         dev_set_name(&pdev->dev, "mock");
>         dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>  
> +       /* hack to disable iommu for the fake device; force identity mapping */
> +       pdev->dev.archdata.iommu = (void *)-1;

Drat, and now having pushed it to a wider set of machines, that tells me
that archdata.iommu only exists under CONFIG_INTEL_IOMMU
-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

end of thread, other threads:[~2017-09-18 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 16:22 [PATCH] drm/i915/selftests: Disable iommu for the mock device Chris Wilson
2017-09-14 16:44 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-14 22:09 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-18 14:22 ` [PATCH] " Chris Wilson
2017-09-18 15:32   ` Matthew Auld
2017-09-18 16:03     ` Chris Wilson
2017-09-18 16:40 ` Chris Wilson

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.