freebsd-nq/sys/dev/drm2
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 i915_gem_do_execbuffer() holds the pages backing each relocation region for 2015-10-21 20:49:45 +00:00
radeon radeon_suspend_kms: don't mess with pci state that's managed by the bus 2015-09-11 15:51:20 +00:00
ttm drm/ttm: Drain taskqueue if taskqueue_cancel_timeout() returned an error 2015-09-08 19:41:19 +00:00
ati_pcigart.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_agpsupport.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_atomic.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_auth.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_buffer.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_buffer.h
drm_bufs.c Add a new file operations hook for mmap operations. File type-specific 2015-06-04 19:41:15 +00:00
drm_context.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_core.h
drm_crtc_helper.c drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1 2015-03-29 18:45:51 +00:00
drm_crtc_helper.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_crtc.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
drm_crtc.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_dma.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_dp_helper.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_dp_helper.h
drm_dp_iic_helper.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_drv.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_edid_modes.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_edid.c Fix build. 2015-03-17 19:13:11 +00:00
drm_edid.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_fb_helper.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_fb_helper.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_fixed.h
drm_fops.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
drm_fourcc.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_gem_names.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_gem_names.h
drm_gem.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_global.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_global.h
drm_hashtab.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_hashtab.h
drm_ioc32.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_ioctl.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_irq.c CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
drm_linux_list_sort.c
drm_linux_list.h
drm_lock.c Hide an unused in FreeBSD function behind #ifdef linux to get rid of 2015-09-22 15:32:27 +00:00
drm_memory.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_mm.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_mm.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_mode.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_modes.c drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1 2015-03-29 18:45:51 +00:00
drm_os_freebsd.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_os_freebsd.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_pci.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
drm_pciids.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_sarea.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_scatter.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_stub.c drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00
drm_sysctl.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm_vm.c drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drm.h drm: Update the device-independent code to match Linux 3.8.13 2015-03-17 18:50:33 +00:00
drmP.h drm2: a few minor fixes after r280183 2015-10-04 07:45:36 +00:00