freebsd-nq/sys/dev/drm2/i915
John Baldwin d836c868a8 i915_gem_do_execbuffer() holds the pages backing each relocation region for
various reasons while executing user commands.  After these commands are
completed, the pages backing the relocation regions are unheld.

Since relocation regions do not have to be page aligned, the code in
validate_exec_list() allocates 2 extra page pointers in the array of
held pages populated by vm_fault_quick_hold_pages().  However, the cleanup
code that unheld the pages always assumed that only the buffer size /
PAGE_SIZE pages were used.  This meant that non-page aligned buffers would
not unheld the last 1 or 2 pages in the list.  Fix this by saving the
number of held pages returned by vm_fault_quick_hold_pages() for each
relocation region and using this count during cleanup.

Reviewed by:	dumbbell, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3965
2015-10-21 20:49:45 +00:00
..
i915_debug.c
i915_dma.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
i915_drm.h
i915_drv.c Remove gen3 check introduced in r286653. 2015-10-06 20:58:45 +00:00
i915_drv.h
i915_gem_context.c
i915_gem_evict.c
i915_gem_execbuffer.c i915_gem_do_execbuffer() holds the pages backing each relocation region for 2015-10-21 20:49:45 +00:00
i915_gem_gtt.c
i915_gem_stolen.c
i915_gem_tiling.c
i915_gem.c drm/i915: Remove "Attempting to unbind pinned buffer" message 2015-10-10 07:43:02 +00:00
i915_ioc32.c
i915_irq.c
i915_reg.h
i915_suspend.c
intel_bios.c
intel_bios.h
intel_crt.c
intel_ddi.c
intel_display.c
intel_dp.c drm/i915: Reduce diff with Linux 3.8 2015-10-17 14:48:39 +00:00
intel_drv.h Reduce diff with linux 3.8.13 on i915 headers 2015-09-05 23:22:59 +00:00
intel_fb.c
intel_hdmi.c
intel_iic.c drm/i915: Reduce diff with Linux 3.8 2015-10-17 14:48:39 +00:00
intel_lvds.c
intel_modes.c
intel_opregion.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
intel_overlay.c
intel_panel.c
intel_pm.c
intel_ringbuffer.c
intel_ringbuffer.h Reduce diff with linux 3.8.13 on i915 headers 2015-09-05 23:22:59 +00:00
intel_sdvo_regs.h Reduce diff with linux 3.8.13 on i915 headers 2015-09-05 23:22:59 +00:00
intel_sdvo.c
intel_sprite.c
intel_tv.c