projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cc6feb
)
drm/i915/selftests: Only touch archdata.iommu when it exists
author
Chris Wilson
<
[email protected]
>
Mon, 18 Sep 2017 16:46:52 +0000
(17:46 +0100)
committer
Chris Wilson
<
[email protected]
>
Tue, 19 Sep 2017 09:13:50 +0000
(10:13 +0100)
archdata.iommu only exists when CONFIG_IOMMU_API is enabled (and only
applies to intel-iommu in our case) so conditionally compile it out when
it doesn't exist.
Fixes: b5891fb520f7 ("drm/i915/selftests: Disable iommu for the mock device")
Signed-off-by: Chris Wilson <
[email protected]
>
Cc: Matthew Auld <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Matthew Auld <
[email protected]
>
drivers/gpu/drm/i915/selftests/mock_gem_device.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 38ed006be5be31d5f9adba8e76d139f59b7c2b34..2388424a14dabb68adedba50e97d6f849d4d48a0 100644
(file)
--- a/
drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/
drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@
-146,8
+146,10
@@
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)
/* hack to disable iommu for the fake device; force identity mapping */
pdev->dev.archdata.iommu = (void *)-1;
+#endif
dev_pm_domain_set(&pdev->dev, &pm_domain);
pm_runtime_enable(&pdev->dev);