Re: [Intel-gfx] [PATCH 01/24] drm/i915/selftests: Pretend to be a gfx pci device
On Fri, May 19, 2017 at 12:02:48PM +0300, Joonas Lahtinen wrote: > On to, 2017-05-18 at 10:46 +0100, Chris Wilson wrote: > > 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> > I'm not hundred percent sure how this connects to the referenced bug, > but it's correct: The bug is an ENOMEM from intel-iommu.c as it tried to allocate an iommu domain. My goal is to circumvent that allocation by using its gfx special case. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 01/24] drm/i915/selftests: Pretend to be a gfx pci device
On to, 2017-05-18 at 10:46 +0100, Chris Wilson wrote: > 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 WilsonI'm not hundred percent sure how this connects to the referenced bug, but it's correct: Reviewed-by: Joonas Lahtinen Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 01/24] drm/i915/selftests: Pretend to be a gfx pci device
On Thu, May 18, 2017 at 02:35:06PM +0100, Tvrtko Ursulin wrote: > > On 18/05/2017 10:46, Chris Wilson wrote: > >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> >--- > > drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c > >b/drivers/gpu/drm/i915/selftests/mock_gem_device.c > >index f4edd4c6cb07..627e2aa09766 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(>dev); > >+pdev->class = PCI_BASE_CLASS_DISPLAY << 16; > > pdev->dev.release = release_dev; > > dev_set_name(>dev, "mock"); > > dma_coerce_mask_and_coherent(>dev, DMA_BIT_MASK(32)); > > > > Reviewed-by: Tvrtko Ursulin Pushed this little patch, hopefully we'll see some change in bug 101080 next month... Thanks for the review. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 01/24] drm/i915/selftests: Pretend to be a gfx pci device
On 18/05/2017 10:46, Chris Wilson wrote: 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--- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index f4edd4c6cb07..627e2aa09766 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(>dev); + pdev->class = PCI_BASE_CLASS_DISPLAY << 16; pdev->dev.release = release_dev; dev_set_name(>dev, "mock"); dma_coerce_mask_and_coherent(>dev, DMA_BIT_MASK(32)); Reviewed-by: Tvrtko Ursulin Regards, Tvrtko ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx