summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-09-07 00:51:41 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-09-07 00:51:41 +0000
commitfe7740abdce3ad7c09255495f0e188e3934a9827 (patch)
treea7d046dfdcd1fb314cd503a7dbe284a4e0752812 /sys/dev/pci/drm
parentac7a6b6b94fcc38b6860db0f75e0069cc8010deb (diff)
drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe()
From Lyude Paul 68b58d3924645356415ae4f6922da8fa14ea1642 in linux 4.19.y/4.19.70 32f0a982650b123bdab36865617d3e03ebcacf3b in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index c41308b3e33..817a8565977 100644
--- a/sys/dev/pci/drm/i915/i915_drv.c
+++ b/sys/dev/pci/drm/i915/i915_drv.c
@@ -1195,6 +1195,12 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
pci_set_master(pdev);
+ /*
+ * We don't have a max segment size, so set it to the max so sg's
+ * debugging layer doesn't complain
+ */
+ dma_set_max_seg_size(&pdev->dev, UINT_MAX);
+
/* overlay on gen2 is broken and can't address above 1G */
if (IS_GEN2(dev_priv)) {
ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(30));