linux/drivers/gpu/drm/radeon
Marek Olšák dfadbbdb57 drm/ttm: add a way to bo_wait for either the last read or last write
Sometimes we want to know whether a buffer is busy and wait for it (bo_wait).
However, sometimes it would be more useful to be able to query whether
a buffer is busy and being either read or written, and wait until it's stopped
being either read or written. The point of this is to be able to avoid
unnecessary waiting, e.g. if a GPU has written something to a buffer and is now
reading that buffer, and a CPU wants to map that buffer for read, it needs to
only wait for the last write. If there were no write, there wouldn't be any
waiting needed.

This, or course, requires user space drivers to send read/write flags
with each relocation (like we have read/write domains in radeon, so we can
actually use those for something useful now).

Now how this patch works:

The read/write flags should passed to ttm_validate_buffer. TTM maintains
separate sync objects of the last read and write for each buffer, in addition
to the sync object of the last use of a buffer. ttm_bo_wait then operates
with one the sync objects.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-31 19:25:35 +01:00
..
reg_srcs drm/radeon/kms: add initial CS checker support for compute 2011-06-21 12:36:39 +10:00
.gitignore drm: create gitignore file for radeon 2009-09-25 13:08:21 +10:00
atom-bits.h
atom-names.h
atom-types.h
atom.c drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c 2011-08-04 14:39:06 +01:00
atom.h drm/radeon/kms: add ioport register access 2010-08-02 10:00:07 +10:00
atombios_crtc.c drm/radeon: ATOM Endian fix for atombios_crtc_program_pll() 2011-07-25 12:27:05 +01:00
atombios_dp.c drm/radeon/kms: don't try to be smart in the hpd handler 2011-08-15 09:44:12 +01:00
atombios.h drm/radeon/kms: add missing external encoder action 2011-06-17 09:28:01 +10:00
avivod.h [rfc] drm/radeon/kms: pm debugging check for vbl. 2010-02-23 09:46:21 +10:00
cayman_blit_shaders.c drm/radeon/kms: add blit support for cayman (v2) 2011-05-26 09:19:31 +10:00
cayman_blit_shaders.h drm/radeon/kms: add blit support for cayman (v2) 2011-05-26 09:19:31 +10:00
evergreen_blit_kms.c drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits 2011-07-13 07:47:13 +01:00
evergreen_blit_shaders.c drm/radeon/kms: evergreen/ni big endian fixes (v2) 2011-02-14 10:10:09 +10:00
evergreen_blit_shaders.h drm/radeon/kms: add drm blit support for evergreen 2010-10-06 11:46:30 +10:00
evergreen_cs.c drm/radeon: off by one in check_reg() functions 2011-08-04 14:22:10 +01:00
evergreen_reg.h drm/radeon/kms: add pageflip ioctl support (v3) 2010-11-22 11:51:08 +10:00
evergreen.c drm/radeon/kms: evergreen & ni reset SPI block on CP resume 2011-08-30 10:55:10 +01:00
evergreend.h Merge 3.0-rc7 into drm-core-next 2011-07-13 08:30:22 +01:00
Kconfig drm/radeon/kms: clean up the radeon kms Kconfig 2011-05-26 09:22:05 +10:00
Makefile drm/radeon: clean reg header files 2011-08-04 14:39:04 +01:00
mkregtable.c radeon mkregtable: Add missing fclose() calls 2011-02-14 09:22:54 +10:00
ni_reg.h drm/radeon/kms: add ni_reg.h 2011-01-07 14:11:38 +10:00
ni.c drm/radeon/kms: evergreen & ni reset SPI block on CP resume 2011-08-30 10:55:10 +01:00
nid.h drm/radeon/kms: fix typo in cayman reg offset 2011-07-02 07:09:19 +10:00
ObjectID.h drm/radeon/kms: upstream ObjectID.h updates 2010-11-23 09:23:14 +10:00
r100_track.h drm/radeon/kms: do bounds checking for 3D_LOAD_VBPNTR and bump array limit 2011-06-14 10:59:03 +10:00
r100.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-03-18 10:37:40 -07:00
r100d.h drm/radeon: Definition of R_0003C2_GENMO_WT seems wrong 2010-12-21 12:55:33 +10:00
r200.c drm/radeon/kms: optimize CS state checking for r100->r500 2011-02-14 09:23:27 +10:00
r300_cmdbuf.c drm/radeon: Fix sparc regression in r300_scratch() 2010-04-27 09:40:57 +10:00
r300_reg.h Fix common misspellings 2011-03-31 11:26:23 -03:00
r300.c Fix common misspellings 2011-03-31 11:26:23 -03:00
r300d.h drm/radeon/kms: manage r300 CMASK RAM access and allow CMASK clear 2011-01-06 13:00:45 +10:00
r420.c drm: Fix printk typo 'failled' 2011-02-17 16:52:46 +01:00
r420d.h drm/radeon/kms: Convert RS400/RS480 to new init path & fix legacy VGA (V3) 2009-10-02 08:51:46 +10:00
r500_reg.h drm/radeon/kms: add pageflip ioctl support (v3) 2010-11-22 11:51:08 +10:00
r520.c drm: Fix printk typo 'failled' 2011-02-17 16:52:46 +01:00
r520d.h drm/radeon/kms: Convert R520 to new init path and associated cleanup 2009-09-29 11:15:56 +10:00
r600_audio.c radeon: consolidate asic-specific function decls for r600 & later 2011-02-23 10:35:20 +10:00
r600_blit_kms.c Merge commit '5359533801e3dd3abca5b7d3d985b0b33fd9fe8b' into drm-core-next 2011-03-16 11:34:41 +10:00
r600_blit_shaders.c drm/radeon/kms: 6xx/7xx big endian fixes 2011-02-14 09:23:38 +10:00
r600_blit_shaders.h drm/radeon: add some missing copyright headers 2010-09-13 20:26:04 +10:00
r600_blit.c drm/radeon: 6xx/7xx non-kms endian fixes 2011-02-14 09:23:35 +10:00
r600_cp.c drm/radeon: Writeback endian fixes 2011-07-25 12:14:56 +01:00
r600_cs.c drm/radeon: off by one in check_reg() functions 2011-08-04 14:22:10 +01:00
r600_hdmi.c Fix common misspellings 2011-03-31 11:26:23 -03:00
r600_reg.h drm/radeon/kms: fix r6xx+ scanout on BE systems 2011-01-27 13:54:13 +10:00
r600.c drm/radeon: Add a rmb() in IH processing 2011-07-25 12:42:39 +01:00
r600d.h drm/radeon/kms: fix typo in IH_CNTL swap bitfield 2011-07-07 17:47:12 +10:00
radeon_acpi.c drm/radeon: tone down overchatty acpi debug messages. 2010-08-04 11:16:56 +10:00
radeon_agp.c drm/radeon/kms: fix agp mode setup on cards that use pcie bridges 2010-08-20 08:48:55 +10:00
radeon_asic.c drm/radeon/kms: set dma_copy to NULL for r6xx+ 2011-06-21 12:32:41 +10:00
radeon_asic.h drm/radeon/kms: add radeon_asic entry for cayman 2011-03-03 11:56:50 +10:00
radeon_atombios.c drm/radeon/kms: handle special cases for vddc 2011-06-24 11:11:53 +10:00
radeon_atpx_handler.c drm/radeon/kms: ATPX switcheroo fixes 2011-05-09 09:14:35 +10:00
radeon_benchmark.c drm/radeon: embed struct drm_gem_object 2011-02-23 10:33:03 +10:00
radeon_bios.c drm/radeon/kms: fix typo in read_disabled vbios code 2011-07-12 06:58:59 +01:00
radeon_clocks.c DRM: Radeon: Fix section mismatch. 2011-07-25 12:01:56 +01:00
radeon_combios.c drm/radeon/kms: add s/r quirk for Compaq Presario V5245EU 2011-08-30 10:55:20 +01:00
radeon_connectors.c drm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector 2011-08-23 13:24:55 +01:00
radeon_cp.c DRM: remove drm_pci_device_is_pcie 2011-07-13 08:14:52 +01:00
radeon_cs.c drm/ttm: add a way to bo_wait for either the last read or last write 2011-08-31 19:25:35 +01:00
radeon_cursor.c drm/radeon: fix order of doing things in radeon_crtc_cursor_set 2011-05-09 09:16:05 +10:00
radeon_device.c drm/radeon: Make vramlimit parameter actually work. 2011-08-22 09:55:19 +01:00
radeon_display.c drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI) 2011-08-04 14:39:50 +01:00
radeon_drv.c drm/radeon/kms: fix version comment due to merge timing 2011-08-04 14:22:08 +01:00
radeon_drv.h Fix common misspellings 2011-03-31 11:26:23 -03:00
radeon_encoders.c drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos 2011-08-12 10:48:08 +01:00
radeon_family.h drm/radeon/kms: add family ids for llano APUs 2011-06-02 10:47:37 +10:00
radeon_fb.c Merge remote branch 'intel/drm-intel-next' of ../drm-next into drm-core-next 2011-03-14 14:15:13 +10:00
radeon_fence.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
radeon_gart.c drm/radeon/nouveau: fix build regression on alpha due to Xen changes. 2011-05-11 13:08:02 +10:00
radeon_gem.c drm/radeon: fixup refcounts in radeon dumb create ioctl. 2011-03-17 13:58:34 +10:00
radeon_i2c.c drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI) 2011-08-04 14:39:50 +01:00
radeon_ioc32.c drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
radeon_irq_kms.c drm/radeon/kms: Initialize pageflip spinlocks. 2011-01-24 11:01:26 +10:00
radeon_irq.c drm: radeon: fix error value sign 2010-11-18 14:55:46 +10:00
radeon_kms.c drm/radeon/kms: add info query for backend map 2011-07-18 08:13:08 +01:00
radeon_legacy_crtc.c drivers:video:aty:radeon_base Fix typo occationally to occasionally 2011-03-22 16:31:59 +09:00
radeon_legacy_encoders.c drm/radeon: Fix KMS legacy backlight support if CONFIG_BACKLIGHT_CLASS_DEVICE=m. 2011-04-09 16:20:36 +10:00
radeon_legacy_tv.c drm/radeon/kms: move a bunch of modesetting debug to correct debug usage. 2010-08-02 10:47:07 +10:00
radeon_mem.c drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible 2011-07-25 20:57:13 -07:00
radeon_mode.h drm/radeon/kms: don't try to be smart in the hpd handler 2011-08-15 09:44:12 +01:00
radeon_object.c drm/radeon: fix up dereferencing of busy objects. 2011-03-01 15:01:14 +10:00
radeon_object.h drm/ttm: add a way to bo_wait for either the last read or last write 2011-08-31 19:25:35 +01:00
radeon_pm.c drm/radeon/kms: add missing vddci setting on NI+ 2011-07-26 12:30:34 +01:00
radeon_reg.h Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2011-07-26 09:21:09 -07:00
radeon_ring.c Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
radeon_state.c Fix common misspellings 2011-03-31 11:26:23 -03:00
radeon_test.c drm/radeon: Explicitly print GTT/VRAM offsets on test failure. 2011-08-22 09:54:52 +01:00
radeon_trace_points.c drm/radeon: add initial tracepoint support. 2010-12-16 14:37:47 +10:00
radeon_trace.h drm/radeon: add initial tracepoint support. 2010-12-16 14:37:47 +10:00
radeon_ttm.c drm/radeon/alpha: Add Alpha support to Radeon DRM code 2011-08-22 09:31:08 +01:00
radeon.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
rs100d.h drm/radeon/kms: Convert R100 to new init path (V2) 2009-10-02 08:51:49 +10:00
rs400.c drm: Fix printk typo 'failled' 2011-02-17 16:52:46 +01:00
rs400d.h drm/radeon/kms: Convert RS400/RS480 to new init path & fix legacy VGA (V3) 2009-10-02 08:51:46 +10:00
rs600.c Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2011-07-26 09:21:09 -07:00
rs600d.h drm/radeon/kms: enable misc pm power state features on r5xx, rs6xx 2010-05-18 18:21:42 +10:00
rs690.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-03-18 10:37:40 -07:00
rs690d.h drm/radeon/kms: display watermark updates (v2) 2010-03-31 14:54:47 +10:00
rv200d.h drm/radeon/kms: Convert R100 to new init path (V2) 2009-10-02 08:51:49 +10:00
rv250d.h drm/radeon/kms: Convert R100 to new init path (V2) 2009-10-02 08:51:49 +10:00
rv350d.h drm/radeon/kms: Convert RS400/RS480 to new init path & fix legacy VGA (V3) 2009-10-02 08:51:46 +10:00
rv515.c drm: Fix printk typo 'failled' 2011-02-17 16:52:46 +01:00
rv515d.h drm/radeon/kms: simplify & improve GPU reset V2 2010-04-06 11:21:11 +10:00
rv770.c drm/radeon/kms: add info query for backend map 2011-07-18 08:13:08 +01:00
rv770d.h drm/radeon/kms: 6xx/7xx big endian fixes 2011-02-14 09:23:38 +10:00