Module Name: src
Committed By: christos
Date: Sat Oct 10 19:35:15 UTC 2015
Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_dma.c
Log Message:
fix the same bug on the linux side, print the error, and return the -tive
error to mimick linux.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.17 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.18
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.17 Sat Oct 10 15:29:44 2015
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Sat Oct 10 15:35:15 2015
@@ -1140,8 +1140,8 @@ static int i915_set_status_page(struct d
ring->status_page.gfx_addr = 0;
i915_dma_cleanup(dev);
DRM_ERROR("can not ioremap virtual address for"
- " G33 hw status page\n");
- return ret;
+ " G33 hw status page, error %d\n", ret);
+ return -ret;
}
__CTASSERT(PAGE_SIZE == 4096);
@@ -1151,8 +1151,8 @@ static int i915_set_status_page(struct d
dev_priv->dri1.gfx_hws_cpu_addr =
ioremap_wc(dev_priv->gtt.mappable_base + hws->addr, 4096);
if (dev_priv->dri1.gfx_hws_cpu_addr == NULL) {
- i915_dma_cleanup(dev);
ring->status_page.gfx_addr = 0;
+ i915_dma_cleanup(dev);
DRM_ERROR("can not ioremap virtual address for"
" G33 hw status page\n");
return -ENOMEM;