Module Name: src Committed By: snj Date: Thu Feb 11 23:23:11 UTC 2016
Modified Files: src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_dma.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1091): sys/external/bsd/drm2/dist/drm/i915/i915_dma.c: revisions 1.17, 1.18 Zero out the guard for bus_space_unmap before calling i915_dma_cleanup() which calls i915_free_hws(), which then tries to unmap. Perhaps this fixes PR/50060. -- 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.10.2.4 -r1.10.2.5 \ 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.10.2.4 src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.10.2.5 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c:1.10.2.4 Thu Apr 23 07:31:17 2015 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Thu Feb 11 23:23:11 2016 @@ -1137,11 +1137,11 @@ static int i915_set_status_page(struct d BUS_SPACE_MAP_PREFETCHABLE, &dev_priv->dri1.gfx_hws_cpu_bsh); if (ret) { - 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 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;