summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-18 10:46:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-18 15:43:49 +0100
commit29f31623d7a83048b1c90a4db89b6f325bfde942 (patch)
treed64753740853980b6843ff9b26b2520e937f642f
parentac0a73fb526100adc521ec2069623e47ca3997a8 (diff)
downloadtalos-obmc-linux-29f31623d7a83048b1c90a4db89b6f325bfde942.tar.gz
talos-obmc-linux-29f31623d7a83048b1c90a4db89b6f325bfde942.zip
drm/i915/selftests: Pretend to be a gfx pci device
Set the class on our mock pci device to GFX. This should be useful for utilities like intel-iommu that special case gfx devices. References: https://bugs.freedesktop.org/show_bug.cgi?id=101080 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/20170518094638.5469-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--drivers/gpu/drm/i915/selftests/mock_gem_device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 3d0e313497d0..4af00000ce91 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -121,6 +121,7 @@ struct drm_i915_private *mock_gem_device(void)
goto err;
device_initialize(&pdev->dev);
+ pdev->class = PCI_BASE_CLASS_DISPLAY << 16;
pdev->dev.release = release_dev;
dev_set_name(&pdev->dev, "mock");
dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
OpenPOWER on IntegriCloud