drm/i915/selftests: fix check for intel IOMMU
Subsystems (2)
PATCH 1/1 drm/i915/selftests: fix check for intel IOMMU
An earlier bugfix tried to work around this build failure:
drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device':drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'struct dev_archdata' has no member named 'iommu'
Checking for CONFIG_IOMMU_API is not sufficient as a compile-time test since that may be enabled in configurations that have neither INTEL_IOMMU not AMD_IOMMU enabled. This changes the check to INTEL_IOMMU instead, as this is the only case we actually care about.
--- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/mock_gem_device.c +1 -1
@@ -146,7 +146,7 @@ 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 )); -#if IS_ENABLED (CONFIG_IOMMU_API ) +#if IS_ENABLED (CONFIG_IOMMU_API ) && defined(CONFIG_INTEL_IOMMU )/* hack to disable iommu for the fake device; force identity mapping */ pdev->dev.archdata.iommu = (void *)-1 ;#endif
Signature · 1 line
2.9.0
Quoting Arnd Bergmann (2017-10-05 13:07:22)
Quoted 5 lines
An earlier bugfix tried to work around this build failure:
drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device':drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'structdev_archdata' has no member named 'iommu'
Quoted 7 lines
Checking for
CONFIG_IOMMU_APIis not sufficient as a compile-time test since that may be enabled in configurations that have neitherINTEL_IOMMUnotAMD_IOMMUenabled. This changes the check toINTEL_IOMMUinstead, as this is the only case we actually care about.Fixes f46f156ea770 ("drm/i915/selftests: Only touch archdata.iommu when it exists")Signed-off-by Arnd Bergmann <[email protected]>
I'll take your wisdom. I was lost trying to nail down exactly what config options we needed to check and settled for something that appeared good enough (for the small selection of configs I tested).
-Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Chris Wilson
Quoting Arnd Bergmann (2017-10-05 13:07:22)
Quoted 10 lines
An earlier bugfix tried to work around this build failure:
drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device':drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'structdev_archdata' has no member named 'iommu'Checking for
CONFIG_IOMMU_APIis not sufficient as a compile-time test since that may be enabled in configurations that have neitherINTEL_IOMMUnotAMD_IOMMUenabled. This changes the check toINTEL_IOMMUinstead, as this is the only case we actually care about.
Quoted 8 lines
Quoted 2 lines
Fixes f46f156ea770 ("drm/i915/selftests: Only touch archdata.iommu when it exists")Signed-off-by Arnd Bergmann <[email protected]>I'll take your wisdom. I was lost trying to nail down exactly what config options we needed to check and settled for something that appeared good enough (for the small selection of configs I tested).
Reviewed-by Chris Wilson <[email protected]>
Pushed, thanks.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/selftests: fix check for intel IOMMU
In reply to Arnd Bergmann== Series Details ==
== Series Details ==
Series: drm/i915/selftests: fix check for intel IOMMU
URL : https://patchwork.freedesktop.org/series/31426/
State : failure
== Summary ==
Series 31426 revision 1 was fully merged or fully failed: no git log
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx