.gitignore | 2 Makefile.am | 49 README | 85 bsd-core/Makefile | 11 bsd-core/ati_pcigart.c | 219 bsd-core/drm.h | 1 bsd-core/drm/Makefile | 41 bsd-core/drmP.h | 1019 - bsd-core/drm_agpsupport.c | 466 bsd-core/drm_atomic.h | 88 bsd-core/drm_auth.c | 187 bsd-core/drm_bufs.c | 1110 - bsd-core/drm_context.c | 320 bsd-core/drm_dma.c | 136 bsd-core/drm_drawable.c | 170 bsd-core/drm_drv.c | 839 - bsd-core/drm_fops.c | 106 bsd-core/drm_internal.h | 1 bsd-core/drm_ioctl.c | 282 bsd-core/drm_irq.c | 499 bsd-core/drm_linux_list.h | 75 bsd-core/drm_lock.c | 191 bsd-core/drm_memory.c | 110 bsd-core/drm_mode.h | 1 bsd-core/drm_pci.c | 125 bsd-core/drm_sarea.h | 1 bsd-core/drm_scatter.c | 190 bsd-core/drm_sysctl.c | 312 bsd-core/drm_vm.c | 124 bsd-core/i915/Makefile | 23 bsd-core/i915_dma.c | 1 bsd-core/i915_drm.h | 1 bsd-core/i915_drv.c | 158 bsd-core/i915_drv.h | 1 bsd-core/i915_irq.c | 1 bsd-core/i915_mem.c | 1 bsd-core/i915_reg.h | 1 bsd-core/i915_suspend.c | 1 bsd-core/mach64/Makefile | 23 bsd-core/mach64_dma.c | 1 bsd-core/mach64_drm.h | 1 bsd-core/mach64_drv.c | 135 bsd-core/mach64_drv.h | 1 bsd-core/mach64_irq.c | 1 bsd-core/mach64_state.c | 1 bsd-core/mga/Makefile | 23 bsd-core/mga_dma.c | 1 bsd-core/mga_drm.h | 1 bsd-core/mga_drv.c | 172 bsd-core/mga_drv.h | 1 bsd-core/mga_irq.c | 1 bsd-core/mga_state.c | 1 bsd-core/mga_ucode.h | 1 bsd-core/mga_warp.c | 1 bsd-core/nouveau/@ | 1 bsd-core/nouveau/Makefile | 33 bsd-core/nouveau/machine | 1 bsd-core/nouveau_dma.c | 1 bsd-core/nouveau_dma.h | 1 bsd-core/nouveau_drm.h | 1 bsd-core/nouveau_drv.c | 148 bsd-core/nouveau_drv.h | 1 bsd-core/nouveau_fifo.c | 1 bsd-core/nouveau_irq.c | 1 bsd-core/nouveau_mem.c | 1 bsd-core/nouveau_notifier.c | 1 bsd-core/nouveau_object.c | 1 bsd-core/nouveau_reg.h | 1 bsd-core/nouveau_sgdma.c | 357 bsd-core/nouveau_state.c | 1 bsd-core/nouveau_swmthd.c | 1 bsd-core/nouveau_swmthd.h | 1 bsd-core/nv04_fb.c | 1 bsd-core/nv04_fifo.c | 1 bsd-core/nv04_graph.c | 1 bsd-core/nv04_instmem.c | 1 bsd-core/nv04_mc.c | 1 bsd-core/nv04_timer.c | 1 bsd-core/nv10_fb.c | 1 bsd-core/nv10_fifo.c | 1 bsd-core/nv10_graph.c | 1 bsd-core/nv20_graph.c | 1 bsd-core/nv40_fb.c | 1 bsd-core/nv40_fifo.c | 1 bsd-core/nv40_graph.c | 1 bsd-core/nv40_mc.c | 1 bsd-core/nv50_fifo.c | 1 bsd-core/nv50_graph.c | 1 bsd-core/nv50_grctx.h | 1 bsd-core/nv50_instmem.c | 1 bsd-core/nv50_mc.c | 1 bsd-core/r128/Makefile | 23 bsd-core/r128_cce.c | 1 bsd-core/r128_drm.h | 1 bsd-core/r128_drv.c | 133 bsd-core/r128_drv.h | 1 bsd-core/r128_irq.c | 1 bsd-core/r128_state.c | 1 bsd-core/r300_cmdbuf.c | 1 bsd-core/r300_reg.h | 1 bsd-core/radeon/Makefile | 28 bsd-core/radeon_cp.c | 1 bsd-core/radeon_drm.h | 1 bsd-core/radeon_drv.c | 132 bsd-core/radeon_drv.h | 1 bsd-core/radeon_irq.c | 1 bsd-core/radeon_mem.c | 1 bsd-core/radeon_microcode.h | 1 bsd-core/radeon_state.c | 1 bsd-core/savage/Makefile | 23 bsd-core/savage_bci.c | 1 bsd-core/savage_drm.h | 1 bsd-core/savage_drv.c | 118 bsd-core/savage_drv.h | 1 bsd-core/savage_state.c | 1 bsd-core/sis/Makefile | 23 bsd-core/sis_drm.h | 1 bsd-core/sis_drv.c | 112 bsd-core/sis_drv.h | 1 bsd-core/sis_ds.c | 1 bsd-core/sis_ds.h | 1 bsd-core/sis_mm.c | 1 bsd-core/tdfx/Makefile | 23 bsd-core/tdfx_drv.c | 114 bsd-core/tdfx_drv.h | 1 bsd-core/via/Makefile | 24 bsd-core/via_3d_reg.h | 1 bsd-core/via_dma.c | 1 bsd-core/via_drm.h | 1 bsd-core/via_drv.c | 121 bsd-core/via_drv.h | 1 bsd-core/via_ds.c | 1 bsd-core/via_ds.h | 1 bsd-core/via_irq.c | 1 bsd-core/via_map.c | 1 bsd-core/via_mm.c | 1 bsd-core/via_mm.h | 1 bsd-core/via_verifier.c | 1 bsd-core/via_verifier.h | 1 bsd-core/via_video.c | 1 configure.ac | 64 include/Makefile.am | 1 include/drm/Makefile.am | 38 include/drm/drm.h | 782 + include/drm/drm_mode.h | 268 include/drm/drm_sarea.h | 82 include/drm/i810_drm.h | 281 include/drm/i830_drm.h | 342 include/drm/i915_drm.h | 760 + include/drm/mach64_drm.h | 256 include/drm/mga_drm.h | 419 include/drm/nouveau_drm.h | 220 include/drm/r128_drm.h | 326 include/drm/radeon_drm.h | 911 + include/drm/savage_drm.h | 210 include/drm/sis_drm.h | 67 include/drm/via_drm.h | 275 intel/Makefile.am | 50 intel/intel_atomic.h | 78 intel/intel_bufmgr.c | 244 intel/intel_bufmgr.h | 213 intel/intel_bufmgr_fake.c | 1610 ++ intel/intel_bufmgr_gem.c | 1823 +++ intel/intel_bufmgr_priv.h | 268 intel/intel_chipset.h | 77 intel/libdrm_intel.pc.in | 10 intel/mm.c | 271 intel/mm.h | 94 libdrm/ChangeLog | 20 libdrm/Makefile.am | 47 libdrm/TODO | 10 libdrm/intel/Makefile.am | 48 libdrm/intel/intel_atomic.h | 61 libdrm/intel/intel_bufmgr.c | 237 libdrm/intel/intel_bufmgr.h | 212 libdrm/intel/intel_bufmgr_fake.c | 1610 -- libdrm/intel/intel_bufmgr_gem.c | 1699 -- libdrm/intel/intel_bufmgr_priv.h | 254 libdrm/intel/intel_chipset.h | 77 libdrm/intel/mm.c | 271 libdrm/intel/mm.h | 94 libdrm/libdrm_lists.h | 89 libdrm/nouveau/Makefile.am | 39 libdrm/nouveau/libdrm_nouveau.pc.in | 10 libdrm/nouveau/nouveau_bo.c | 603 - libdrm/nouveau/nouveau_bo.h | 109 libdrm/nouveau/nouveau_channel.c | 126 libdrm/nouveau/nouveau_channel.h | 56 libdrm/nouveau/nouveau_class.h | 8389 -------------- libdrm/nouveau/nouveau_device.c | 194 libdrm/nouveau/nouveau_device.h | 33 libdrm/nouveau/nouveau_drmif.h | 57 libdrm/nouveau/nouveau_grobj.c | 138 libdrm/nouveau/nouveau_grobj.h | 48 libdrm/nouveau/nouveau_notifier.c | 146 libdrm/nouveau/nouveau_notifier.h | 63 libdrm/nouveau/nouveau_private.h | 128 libdrm/nouveau/nouveau_pushbuf.c | 333 libdrm/nouveau/nouveau_pushbuf.h | 177 libdrm/nouveau/nouveau_resource.c | 115 libdrm/nouveau/nouveau_resource.h | 48 libdrm/radeon/Makefile.am | 54 libdrm/radeon/libdrm_radeon.pc.in | 10 libdrm/radeon/radeon_bo.h | 215 libdrm/radeon/radeon_bo_gem.c | 343 libdrm/radeon/radeon_bo_gem.h | 43 libdrm/radeon/radeon_cs.h | 246 libdrm/radeon/radeon_cs_gem.c | 457 libdrm/radeon/radeon_cs_gem.h | 41 libdrm/radeon/radeon_cs_space.c | 234 libdrm/radeon/radeon_track.c | 141 libdrm/radeon/radeon_track.h | 64 libdrm/xf86drm.c | 2512 ---- libdrm/xf86drm.h | 670 - libdrm/xf86drmHash.c | 428 libdrm/xf86drmMode.c | 669 - libdrm/xf86drmMode.h | 364 libdrm/xf86drmRandom.c | 208 libdrm/xf86drmSL.c | 480 libdrm/xf86mm.h | 198 libdrm_intel.pc.in | 10 libdrm_lists.h | 89 linux-core/.gitignore | 1 linux-core/Config.in | 17 linux-core/Doxyfile | 1161 - linux-core/Kconfig | 83 linux-core/Makefile | 336 linux-core/Makefile.kernel | 63 linux-core/README.drm | 25 linux-core/ati_pcigart.c | 199 linux-core/drm-gem.txt | 805 - linux-core/drm.h | 1 linux-core/drmP.h | 1480 -- linux-core/drm_agpsupport.c | 509 linux-core/drm_auth.c | 189 linux-core/drm_bufs.c | 1608 -- linux-core/drm_compat.c | 153 linux-core/drm_compat.h | 221 linux-core/drm_context.c | 472 linux-core/drm_core.h | 35 linux-core/drm_dma.c | 179 linux-core/drm_drawable.c | 192 linux-core/drm_drv.c | 655 - linux-core/drm_fops.c | 497 linux-core/drm_gem.c | 444 linux-core/drm_hashtab.c | 202 linux-core/drm_hashtab.h | 67 linux-core/drm_internal.h | 1 linux-core/drm_ioc32.c | 1073 - linux-core/drm_ioctl.c | 351 linux-core/drm_irq.c | 769 - linux-core/drm_lock.c | 389 linux-core/drm_memory.c | 366 linux-core/drm_memory.h | 61 linux-core/drm_memory_debug.c | 399 linux-core/drm_memory_debug.h | 379 linux-core/drm_mm.c | 298 linux-core/drm_mode.h | 1 linux-core/drm_os_linux.h | 137 linux-core/drm_pci.c | 177 linux-core/drm_proc.c | 641 - linux-core/drm_regman.c | 200 linux-core/drm_sarea.h | 1 linux-core/drm_scatter.c | 228 linux-core/drm_sman.c | 353 linux-core/drm_sman.h | 176 linux-core/drm_stub.c | 375 linux-core/drm_sysfs.c | 216 linux-core/drm_vm.c | 672 - linux-core/drm_vm_nopage_compat.c | 267 linux-core/ffb_context.c | 582 - linux-core/ffb_drv.c | 329 linux-core/ffb_drv.h | 284 linux-core/i810_dma.c | 1301 -- linux-core/i810_drm.h | 263 linux-core/i810_drv.c | 104 linux-core/i810_drv.h | 242 linux-core/imagine_drv.c | 85 linux-core/linux | 1 linux-core/mach64_dma.c | 1 linux-core/mach64_drm.h | 1 linux-core/mach64_drv.c | 105 linux-core/mach64_drv.h | 1 linux-core/mach64_irq.c | 1 linux-core/mach64_state.c | 1 linux-core/mga_dma.c | 1 linux-core/mga_drm.h | 1 linux-core/mga_drv.c | 152 linux-core/mga_drv.h | 1 linux-core/mga_ioc32.c | 234 linux-core/mga_irq.c | 1 linux-core/mga_state.c | 1 linux-core/mga_ucode.h | 1 linux-core/mga_warp.c | 1 linux-core/nouveau_backlight.c | 268 linux-core/nouveau_bo.c | 296 linux-core/nouveau_dma.c | 1 linux-core/nouveau_dma.h | 1 linux-core/nouveau_drm.h | 1 linux-core/nouveau_drv.c | 120 linux-core/nouveau_drv.h | 1 linux-core/nouveau_fence.c | 119 linux-core/nouveau_fifo.c | 1 linux-core/nouveau_ioc32.c | 72 linux-core/nouveau_irq.c | 1 linux-core/nouveau_mem.c | 1 linux-core/nouveau_notifier.c | 1 linux-core/nouveau_object.c | 1 linux-core/nouveau_reg.h | 1 linux-core/nouveau_sgdma.c | 345 linux-core/nouveau_state.c | 1 linux-core/nouveau_swmthd.c | 1 linux-core/nouveau_swmthd.h | 1 linux-core/nv04_fb.c | 1 linux-core/nv04_fifo.c | 1 linux-core/nv04_graph.c | 1 linux-core/nv04_instmem.c | 1 linux-core/nv04_mc.c | 1 linux-core/nv04_timer.c | 1 linux-core/nv10_fb.c | 1 linux-core/nv10_fifo.c | 1 linux-core/nv10_graph.c | 1 linux-core/nv20_graph.c | 1 linux-core/nv40_fb.c | 1 linux-core/nv40_fifo.c | 1 linux-core/nv40_graph.c | 1 linux-core/nv40_mc.c | 1 linux-core/nv50_fifo.c | 1 linux-core/nv50_graph.c | 1 linux-core/nv50_grctx.h | 1 linux-core/nv50_instmem.c | 1 linux-core/nv50_mc.c | 1 linux-core/r128_cce.c | 1 linux-core/r128_drm.h | 1 linux-core/r128_drv.c | 113 linux-core/r128_drv.h | 1 linux-core/r128_ioc32.c | 222 linux-core/r128_irq.c | 1 linux-core/r128_state.c | 1 linux-core/r300_cmdbuf.c | 1 linux-core/r300_reg.h | 1 linux-core/radeon_cp.c | 1 linux-core/radeon_drm.h | 1 linux-core/radeon_drv.c | 157 linux-core/radeon_drv.h | 1 linux-core/radeon_ioc32.c | 424 linux-core/radeon_irq.c | 1 linux-core/radeon_mem.c | 1 linux-core/radeon_microcode.h | 1 linux-core/radeon_state.c | 1 linux-core/savage_bci.c | 1 linux-core/savage_drm.h | 1 linux-core/savage_drv.c | 96 linux-core/savage_drv.h | 1 linux-core/savage_state.c | 1 linux-core/sis_drm.h | 1 linux-core/sis_drv.c | 127 linux-core/sis_drv.h | 1 linux-core/sis_mm.c | 332 linux-core/tdfx_drv.c | 93 linux-core/tdfx_drv.h | 1 linux-core/via_3d_reg.h | 1 linux-core/via_dma.c | 1 linux-core/via_dmablit.c | 817 - linux-core/via_dmablit.h | 140 linux-core/via_drm.h | 1 linux-core/via_drv.c | 1 linux-core/via_drv.h | 1 linux-core/via_irq.c | 1 linux-core/via_map.c | 1 linux-core/via_mm.c | 196 linux-core/via_verifier.c | 1 linux-core/via_verifier.h | 1 linux-core/via_video.c | 1 linux-core/xgi_cmdlist.c | 325 linux-core/xgi_cmdlist.h | 66 linux-core/xgi_drm.h | 1 linux-core/xgi_drv.c | 430 linux-core/xgi_drv.h | 118 linux-core/xgi_fb.c | 130 linux-core/xgi_fence.c | 99 linux-core/xgi_ioc32.c | 140 linux-core/xgi_misc.c | 477 linux-core/xgi_misc.h | 37 linux-core/xgi_pcie.c | 127 linux-core/xgi_regs.h | 169 nouveau/Makefile.am | 40 nouveau/libdrm_nouveau.pc.in | 10 nouveau/nouveau_bo.c | 622 + nouveau/nouveau_bo.h | 112 nouveau/nouveau_channel.c | 126 nouveau/nouveau_channel.h | 56 nouveau/nouveau_class.h | 8515 ++++++++++++++ nouveau/nouveau_device.c | 194 nouveau/nouveau_device.h | 33 nouveau/nouveau_drmif.h | 57 nouveau/nouveau_grobj.c | 138 nouveau/nouveau_grobj.h | 48 nouveau/nouveau_notifier.c | 146 nouveau/nouveau_notifier.h | 63 nouveau/nouveau_private.h | 133 nouveau/nouveau_pushbuf.c | 411 nouveau/nouveau_pushbuf.h | 196 nouveau/nouveau_resource.c | 115 nouveau/nouveau_resource.h | 48 radeon/Makefile.am | 54 radeon/libdrm_radeon.pc.in | 10 radeon/radeon_bo.h | 229 radeon/radeon_bo_gem.c | 343 radeon/radeon_bo_gem.h | 43 radeon/radeon_cs.h | 246 radeon/radeon_cs_gem.c | 458 radeon/radeon_cs_gem.h | 41 radeon/radeon_cs_space.c | 234 radeon/radeon_track.c | 141 radeon/radeon_track.h | 64 scripts/create_bsd_pci_lists.sh | 40 scripts/create_linux_pci_lists.sh | 40 scripts/create_lk_drm.sh | 37 scripts/create_lk_gpu.sh | 58 scripts/drm-scripts-gentree.pl | 254 shared-core/Makefile.am | 41 shared-core/drm.h | 859 - shared-core/drm_internal.h | 40 shared-core/drm_mode.h | 273 shared-core/drm_pciids.txt | 594 - shared-core/drm_sarea.h | 84 shared-core/i915_dma.c | 1030 - shared-core/i915_drm.h | 746 - shared-core/i915_drv.h | 667 - shared-core/i915_irq.c | 534 shared-core/i915_mem.c | 386 shared-core/i915_reg.h | 1422 -- shared-core/i915_suspend.c | 520 shared-core/imagine_drv.h | 43 shared-core/mach64_dma.c | 1778 --- shared-core/mach64_drm.h | 256 shared-core/mach64_drv.h | 860 - shared-core/mach64_irq.c | 159 shared-core/mach64_state.c | 910 - shared-core/mga_dma.c | 1169 -- shared-core/mga_drm.h | 425 shared-core/mga_drv.h | 691 - shared-core/mga_irq.c | 177 shared-core/mga_state.c | 1139 - shared-core/mga_ucode.h |11645 -------------------- shared-core/mga_warp.c | 198 shared-core/nouveau_dma.c | 173 shared-core/nouveau_dma.h | 96 shared-core/nouveau_drm.h | 216 shared-core/nouveau_drv.h | 626 - shared-core/nouveau_fifo.c | 602 - shared-core/nouveau_irq.c | 588 - shared-core/nouveau_mem.c | 910 - shared-core/nouveau_notifier.c | 165 shared-core/nouveau_object.c | 1173 -- shared-core/nouveau_reg.h | 601 - shared-core/nouveau_state.c | 897 - shared-core/nouveau_swmthd.c | 191 shared-core/nouveau_swmthd.h | 33 shared-core/nv04_fb.c | 23 shared-core/nv04_fifo.c | 138 shared-core/nv04_graph.c | 516 shared-core/nv04_instmem.c | 159 shared-core/nv04_mc.c | 22 shared-core/nv04_timer.c | 53 shared-core/nv10_fb.c | 25 shared-core/nv10_fifo.c | 169 shared-core/nv10_graph.c | 914 - shared-core/nv20_graph.c | 913 - shared-core/nv40_fb.c | 62 shared-core/nv40_fifo.c | 209 shared-core/nv40_graph.c | 2190 --- shared-core/nv40_mc.c | 38 shared-core/nv50_fifo.c | 343 shared-core/nv50_graph.c | 338 shared-core/nv50_grctx.h |20935 ------------------------------------ shared-core/nv50_instmem.c | 331 shared-core/nv50_mc.c | 43 shared-core/r128_cce.c | 933 - shared-core/r128_drm.h | 326 shared-core/r128_drv.h | 526 shared-core/r128_irq.c | 116 shared-core/r128_state.c | 1681 -- shared-core/r300_cmdbuf.c | 1198 -- shared-core/r300_reg.h | 1778 --- shared-core/r600_microcode.h |14275 ------------------------ shared-core/radeon_cp.c | 1793 --- shared-core/radeon_drm.h | 907 - shared-core/radeon_drv.h | 1470 -- shared-core/radeon_irq.c | 415 shared-core/radeon_mem.c | 302 shared-core/radeon_microcode.h | 1844 --- shared-core/radeon_state.c | 3263 ----- shared-core/savage_bci.c | 1092 - shared-core/savage_drm.h | 209 shared-core/savage_drv.h | 575 shared-core/savage_state.c | 1165 -- shared-core/sis_drm.h | 67 shared-core/sis_drv.h | 90 shared-core/sis_ds.c | 299 shared-core/sis_ds.h | 146 shared-core/sis_mm.c | 386 shared-core/tdfx_drv.h | 47 shared-core/via_3d_reg.h | 1650 -- shared-core/via_dma.c | 763 - shared-core/via_drm.h | 282 shared-core/via_drv.c | 117 shared-core/via_drv.h | 197 shared-core/via_ds.c | 274 shared-core/via_ds.h | 104 shared-core/via_irq.c | 402 shared-core/via_map.c | 139 shared-core/via_mm.c | 347 shared-core/via_mm.h | 40 shared-core/via_verifier.c | 1121 - shared-core/via_verifier.h | 62 shared-core/via_video.c | 93 shared-core/xgi_drm.h | 137 tests/Makefile.am | 9 tests/modeprint/Makefile.am | 10 tests/modetest/Makefile.am | 10 tests/name_from_fd.c | 58 xf86drm.c | 2534 ++++ xf86drm.h | 716 + xf86drmHash.c | 428 xf86drmMode.c | 712 + xf86drmMode.h | 364 xf86drmRandom.c | 208 xf86drmSL.c | 480 xf86mm.h | 198 531 files changed, 28824 insertions(+), 160017 deletions(-)
New commits: commit db50f5127421ac8f4e3ce4eb7c27d27475781488 Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Dec 3 11:31:27 2009 -0500 Bump to 2.4.16 for release diff --git a/configure.ac b/configure.ac index 39bc81e..b884220 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AC_PREREQ(2.60) -AC_INIT([libdrm], 2.4.15, [dri-de...@lists.sourceforge.net], libdrm) +AC_INIT([libdrm], 2.4.16, [dri-de...@lists.sourceforge.net], libdrm) AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) commit bef7f88de9a1f40ec82cfd4d80c73802c640e5ed Author: Kristian Høgsberg <k...@bitplanet.net> Date: Thu Dec 3 11:27:16 2009 -0500 Enable experimental APIs for distcheck diff --git a/Makefile.am b/Makefile.am index de8bfe0..41e5a34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,8 @@ AUTOMAKE_OPTIONS = foreign +DISTCHECK_CONFIGURE_FLAGS = --enable-nouveau-experimental-api --enable-radeon-experimental-api + pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = libdrm.pc commit 57473c7f523f476ffa54c34e0c6312ffa66dcc5c Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 13:36:22 2009 +0000 intel: Free memory before inserting bo into cache. This has the unfortunate behaviour of releasing our malloc cache, but the alternative is for X to consume a couple of gigabytes of ram and die during testing. Fortunately the extra mallocs have little impact on performance whereas avoiding swap and death, lots. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index ac7297b..571ab5c 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -727,9 +727,6 @@ drm_intel_gem_bo_free(drm_intel_bo *bo) if (bo_gem->gtt_virtual) munmap(bo_gem->gtt_virtual, bo_gem->bo.size); - free(bo_gem->reloc_target_bo); - free(bo_gem->relocs); - /* Close this object */ memset(&close, 0, sizeof(close)); close.handle = bo_gem->gem_handle; @@ -788,6 +785,16 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time) DBG("bo_unreference final: %d (%s)\n", bo_gem->gem_handle, bo_gem->name); + /* release memory associated with this object */ + if (bo_gem->reloc_target_bo) { + free(bo_gem->reloc_target_bo); + bo_gem->reloc_target_bo = NULL; + } + if (bo_gem->relocs) { + free(bo_gem->relocs); + bo_gem->relocs = NULL; + } + bucket = drm_intel_gem_bo_bucket_for_size(bufmgr_gem, bo->size); /* Put the buffer into our internal cache for reuse if we can. */ tiling_mode = I915_TILING_NONE; commit 792fed1e2460f96459141b5a628dd5ab4fbb87db Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 13:12:39 2009 +0000 intel: Check and propagate errors from building reloc-tree Instead of forcing the caller to check after every emit_reloc(), we can flag the object as being in error, propagating that error upwards through the relocation tree, and failing the eventual batch buffer execution. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 239f36d..ac7297b 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -154,6 +154,11 @@ struct _drm_intel_bo_gem { char used_as_reloc_target; /** + * Boolean of whether we have encountered an error whilst building the relocation tree. + */ + char has_error; + + /** * Boolean of whether this buffer can be re-used */ char reusable; @@ -396,6 +401,17 @@ drm_intel_setup_reloc_list(drm_intel_bo *bo) bo_gem->relocs = malloc(max_relocs * sizeof(struct drm_i915_gem_relocation_entry)); bo_gem->reloc_target_bo = malloc(max_relocs * sizeof(drm_intel_bo *)); + if (bo_gem->relocs == NULL || bo_gem->reloc_target_bo == NULL) { + bo_gem->has_error = 1; + + free (bo_gem->relocs); + bo_gem->relocs = NULL; + + free (bo_gem->reloc_target_bo); + bo_gem->reloc_target_bo = NULL; + + return 1; + } return 0; } @@ -564,6 +580,7 @@ retry: bo_gem->validate_index = -1; bo_gem->reloc_tree_fences = 0; bo_gem->used_as_reloc_target = 0; + bo_gem->has_error = 0; bo_gem->tiling_mode = I915_TILING_NONE; bo_gem->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; bo_gem->reusable = 1; @@ -1178,10 +1195,22 @@ drm_intel_gem_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, drm_intel_bo_gem *target_bo_gem = (drm_intel_bo_gem *) target_bo; pthread_mutex_lock(&bufmgr_gem->lock); + if (bo_gem->has_error) { + pthread_mutex_unlock(&bufmgr_gem->lock); + return -ENOMEM; + } + + if (target_bo_gem->has_error) { + bo_gem->has_error = 1; + pthread_mutex_unlock(&bufmgr_gem->lock); + return -ENOMEM; + } /* Create a new relocation list if needed */ - if (bo_gem->relocs == NULL) - drm_intel_setup_reloc_list(bo); + if (bo_gem->relocs == NULL && drm_intel_setup_reloc_list(bo)) { + pthread_mutex_unlock(&bufmgr_gem->lock); + return -ENOMEM; + } /* Check overflow */ assert(bo_gem->reloc_count < bufmgr_gem->max_relocs); @@ -1268,9 +1297,13 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, drm_clip_rect_t * cliprects, int num_cliprects, int DR4) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; struct drm_i915_gem_execbuffer execbuf; int ret, i; + if (bo_gem->has_error) + return -ENOMEM; + pthread_mutex_lock(&bufmgr_gem->lock); /* Update indices and set up the validate list. */ drm_intel_gem_bo_process_reloc(bo); commit b73612e4fd69565aa2c5c2e9677f3e0af1945f7d Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 12:58:00 2009 +0000 intel: Repeat execbuffer after EINTR EAGAIN cannot be raised by the current code, but the system call maybe interrupted and so return EINTR. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index bb20f43..239f36d 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -1293,7 +1293,7 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER, &execbuf); - } while (ret != 0 && errno == EAGAIN); + } while (ret != 0 && errno == EINTR); if (ret != 0) { ret = -errno; commit acb4aa671507aa181b3ff50ccf26a1c0d705a309 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 12:40:26 2009 +0000 intel: Review use of errno. Hitting this error lead to a segfault: intel_bufmgr_gem.c:919: Error mapping buffer 48607 (pixmap): Cannot allocate memory. because the errno was reused as the function return value after being reset by the fprintf(), so caller thought the mapping had succeeded. The convention established by libdrm is that the return value is the negative errno and that uses of libdrm cannot trust the value of errno afterwards, but must use the return code. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index e9896e7..bb20f43 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -846,6 +846,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable) &mmap_arg); } while (ret == -1 && errno == EINTR); if (ret != 0) { + ret = -errno; fprintf(stderr, "%s:%d: Error mapping buffer %d (%s): %s .\n", __FILE__, __LINE__, bo_gem->gem_handle, @@ -871,6 +872,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable) &set_domain); } while (ret == -1 && errno == EINTR); if (ret != 0) { + ret = -errno; fprintf(stderr, "%s:%d: Error setting to CPU domain %d: %s\n", __FILE__, __LINE__, bo_gem->gem_handle, strerror(errno)); @@ -909,6 +911,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) &mmap_arg); } while (ret == -1 && errno == EINTR); if (ret != 0) { + ret = -errno; fprintf(stderr, "%s:%d: Error preparing buffer map %d (%s): %s .\n", __FILE__, __LINE__, @@ -923,13 +926,14 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) MAP_SHARED, bufmgr_gem->fd, mmap_arg.offset); if (bo_gem->gtt_virtual == MAP_FAILED) { + ret = -errno; fprintf(stderr, "%s:%d: Error mapping buffer %d (%s): %s .\n", __FILE__, __LINE__, bo_gem->gem_handle, bo_gem->name, strerror(errno)); pthread_mutex_unlock(&bufmgr_gem->lock); - return errno; + return ret; } } @@ -949,6 +953,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) } while (ret == -1 && errno == EINTR); if (ret != 0) { + ret = -errno; fprintf(stderr, "%s:%d: Error setting domain %d: %s\n", __FILE__, __LINE__, bo_gem->gem_handle, strerror(errno)); @@ -1077,12 +1082,13 @@ drm_intel_gem_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, &pread); } while (ret == -1 && errno == EINTR); if (ret != 0) { + ret = -errno; fprintf(stderr, "%s:%d: Error reading data from buffer %d: (%d %d) %s .\n", __FILE__, __LINE__, bo_gem->gem_handle, (int)offset, (int)size, strerror(errno)); } - return 0; + return ret; } /** Waits for all GPU rendering to the object to have completed. */ @@ -1289,17 +1295,20 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, &execbuf); } while (ret != 0 && errno == EAGAIN); - if (ret != 0 && errno == ENOMEM) { - fprintf(stderr, - "Execbuffer fails to pin. " - "Estimate: %u. Actual: %u. Available: %u\n", - drm_intel_gem_estimate_batch_space(bufmgr_gem->exec_bos, - bufmgr_gem-> - exec_count), - drm_intel_gem_compute_batch_space(bufmgr_gem->exec_bos, - bufmgr_gem-> - exec_count), - (unsigned int)bufmgr_gem->gtt_size); + if (ret != 0) { + ret = -errno; + if (errno == ENOSPC) { + fprintf(stderr, + "Execbuffer fails to pin. " + "Estimate: %u. Actual: %u. Available: %u\n", + drm_intel_gem_estimate_batch_space(bufmgr_gem->exec_bos, + bufmgr_gem-> + exec_count), + drm_intel_gem_compute_batch_space(bufmgr_gem->exec_bos, + bufmgr_gem-> + exec_count), + (unsigned int)bufmgr_gem->gtt_size); + } } drm_intel_update_buffer_offsets(bufmgr_gem); @@ -1317,7 +1326,7 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, bufmgr_gem->exec_count = 0; pthread_mutex_unlock(&bufmgr_gem->lock); - return 0; + return ret; } static int @@ -1606,7 +1615,7 @@ drm_intel_gem_check_aperture_space(drm_intel_bo **bo_array, int count) if (bufmgr_gem->available_fences) { total_fences = drm_intel_gem_total_fences(bo_array, count); if (total_fences > bufmgr_gem->available_fences) - return -1; + return -ENOSPC; } total = drm_intel_gem_estimate_batch_space(bo_array, count); @@ -1618,7 +1627,7 @@ drm_intel_gem_check_aperture_space(drm_intel_bo **bo_array, int count) DBG("check_space: overflowed available aperture, " "%dkb vs %dkb\n", total / 1024, (int)bufmgr_gem->gtt_size / 1024); - return -1; + return -ENOSPC; } else { DBG("drm_check_space: total %dkb vs bufgr %dkb\n", total / 1024, (int)bufmgr_gem->gtt_size / 1024); commit 9fec2a8cb28d814da4fdd97b25e9cc5c10768c87 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 10:42:51 2009 +0000 intel: Make bo_reference() inline for internal use. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index cf3943c..e9896e7 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -304,7 +304,7 @@ drm_intel_gem_dump_validation_list(drm_intel_bufmgr_gem *bufmgr_gem) } } -static void +static inline void drm_intel_gem_bo_reference(drm_intel_bo *bo) { drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; commit 9c8ad05e8bb1c954b804e40f2f975fed23c24550 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Wed Dec 2 10:41:39 2009 +0000 intel: Remove the extra reference while validating the reloc tree Buffers on the relocation tree are guarded by the reference to the batch object and so do not need an extra reference whilst constructing the list of execution buffer objects. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 3b4d3cf..cf3943c 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -187,7 +187,6 @@ static int drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, uint32_t stride); -static void drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo); static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo, time_t time); @@ -357,7 +356,6 @@ drm_intel_add_validate_buffer(drm_intel_bo *bo) bufmgr_gem->exec_objects[index].alignment = 0; bufmgr_gem->exec_objects[index].offset = 0; bufmgr_gem->exec_bos[index] = bo; - drm_intel_gem_bo_reference(bo); bufmgr_gem->exec_count++; } @@ -793,19 +791,6 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time) } } -static void drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo) -{ - drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; - - assert(atomic_read(&bo_gem->refcount) > 0); - if (atomic_dec_and_test(&bo_gem->refcount)) { - struct timespec time; - - clock_gettime(CLOCK_MONOTONIC, &time); - drm_intel_gem_bo_unreference_final(bo, time.tv_sec); - } -} - static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo, time_t time) { @@ -1327,7 +1312,6 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, /* Disconnect the buffer from the validate list */ bo_gem->validate_index = -1; - drm_intel_gem_bo_unreference_locked(bo); bufmgr_gem->exec_bos[i] = NULL; } bufmgr_gem->exec_count = 0; commit 8ffd2e142e38d19326a40ff66dc99d052ce22100 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Tue Dec 1 13:08:04 2009 +0000 intel: Wrap a few more syscalls with EINTR protection Having been bitten by a missing EINTR check during mmap_gtt(), I thought it prudent to add some more protection around the ioctls. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 6a113a6..3b4d3cf 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -413,7 +413,9 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo) memset(&busy, 0, sizeof(busy)); busy.handle = bo_gem->gem_handle; - ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy); + do { + ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy); + } while (ret == -1 && errno == EINTR); return (ret == 0 && busy.busy); } @@ -545,7 +547,11 @@ retry: memset(&create, 0, sizeof(create)); create.size = bo_size; - ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CREATE, &create); + do { + ret = ioctl(bufmgr_gem->fd, -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org