linux/drivers/gpu/drm/radeon
Marek Olšák e70f224c19 drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS
This adds a new optional chunk to the CS ioctl that specifies optional flags
to the CS parser. Why this is useful is explained below. Note that some regs
no longer need the NOP relocation packet if this feature is enabled.
Tested on r300g and r600g with this flag disabled and enabled.

Assume there are two contexts sharing the same mipmapped tiled texture.
One context wants to render into the first mipmap and the other one
wants to render into the last mipmap. As you probably know, the hardware
has a MACRO_SWITCH feature, which turns off macro tiling for small mipmaps,
but that only applies to samplers.
(at least on r300-r500, though later hardware likely behaves the same)

So we want to just re-set the tiling flags before rendering (writing
packets), right? ... No. The contexts run in parallel, so they may
set the tiling flags simultaneously and then fire their command streams
also simultaneously. The last one setting the flags wins, the other one
loses.

Another problem is when one context wants to render into the first and
the last mipmap in one CS. Impossible. It must flush before changing
tiling flags and do the rendering into the smaller mipmaps in another CS.

Yet another problem is that writing copy_blit in userspace would be a mess
involving re-setting tiling flags to please the kernel, and causing races
with other contexts at the same time.

The only way out of this is to send tiling flags with each CS, ideally
with each relocation. But we already do that through the registers.
So let's just use what we have in the registers.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-20 07:53:13 +00:00
..
reg_srcs drm/radeon/kms: add initial CS checker support for compute 2011-06-21 12:36:39 +10:00
.gitignore
atom-bits.h
atom-names.h
atom-types.h
atom.c drm/radeon/kms/atom: fix handling of FB scratch indices 2011-10-19 09:47:47 +01:00
atom.h drm/radeon/kms/atom: fix handling of FB scratch indices 2011-10-19 09:47:47 +01:00
atombios_crtc.c drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks() 2011-11-11 14:15:05 +00:00
atombios_dp.c drm/radeon/kms: make an aux failure debug only 2011-11-11 11:06:50 +00:00
atombios_encoders.c drm/radeon/kms: make atombios_dig_transmitter_setup() version based 2011-11-01 16:05:22 +00:00
atombios.h drm/radeon/kms: add missing external encoder action 2011-06-17 09:28:01 +10:00
avivod.h
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: flush read cache for gtt with fence on r6xx and newer GPU V3 2011-11-01 16:02:07 +00: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/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00: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/pm: add a proper pm profile init function for fusion 2011-11-11 14:15:37 +00:00
evergreend.h drm/radeon/kms: demystify evergreen blit code 2011-10-18 10:06:23 +01:00
Kconfig drm/radeon/kms: clean up the radeon kms Kconfig 2011-05-26 09:22:05 +10:00
Makefile drm/radeon/kms: move atom encoder setup to a new file 2011-11-01 16:05:07 +00: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 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08: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: Remove more bogus inlines in the radeon driver. 2011-10-18 09:44:52 +01:00
r100.c Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08: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: Make GPU/CPU page size handling consistent in blit code (v2) 2011-09-18 19:44:36 +01:00
r300_cmdbuf.c drm/radeon: Move more code out of line 2011-10-18 09:53:05 +01:00
r300_reg.h Fix common misspellings 2011-03-31 11:26:23 -03:00
r300.c drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00: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
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
r600_audio.c radeon: consolidate asic-specific function decls for r600 & later 2011-02-23 10:35:20 +10:00
r600_blit_kms.c drm/radeon: flush read cache for gtt with fence on r6xx and newer GPU V3 2011-11-01 16:02:07 +00: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: drop inlines in r600_blit.c 2011-10-18 09:44:38 +01:00
r600_cp.c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
r600_cs.c drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00: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/kms: optimize r600_pm_profile_init 2011-11-11 14:15:40 +00:00
r600d.h drm/radeon/kms: demystify r600 blit code 2011-10-18 10:06:23 +01: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/pm: add a proper pm profile init function for fusion 2011-11-11 14:15:37 +00:00
radeon_asic.h drm/radeon/kms/pm: add a proper pm profile init function for fusion 2011-11-11 14:15:37 +00:00
radeon_atombios.c drm/radeon/kms: fix segfault in pm rework 2011-11-15 19:44:03 +00:00
radeon_atpx_handler.c drm/radeon/kms: ATPX switcheroo fixes 2011-05-09 09:14:35 +10:00
radeon_benchmark.c drm/radeon/benchmark: signedness bug in radeon_benchmark_move() 2011-11-11 11:16:12 +00: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/kms: set a default max_pixel_clock 2011-08-31 14:06:19 +01:00
radeon_combios.c drm/radeon/kms/combios: fix dynamic allocation of PM clock modes 2011-11-12 17:46:40 +00:00
radeon_connectors.c drm/radeon/kms: set HPD polarity in hpd_init() 2011-11-03 17:53:18 +00:00
radeon_cp.c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
radeon_cs.c drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00:00
radeon_cursor.c drm/radeon: Set cursor x/y to 0 when x/yorigin > 0. 2011-10-03 18:37:37 +01:00
radeon_device.c drm/radeon: Make sure CS mutex is held across GPU reset. 2011-11-11 11:02:10 +00:00
radeon_display.c drm/radeon/kms: remove useless radeon_ddc_dump() 2011-11-01 16:05:27 +00:00
radeon_drv.c drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00:00
radeon_drv.h Fix common misspellings 2011-03-31 11:26:23 -03:00
radeon_encoders.c drm/radeon/kms: move atom encoder setup to a new file 2011-11-01 16:05:07 +00: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 Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2011-10-28 05:54:23 -07:00
radeon_gart.c drm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2 2011-11-04 10:39:51 +00:00
radeon_gem.c Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags" 2011-10-27 18:15:10 +02:00
radeon_i2c.c Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08:00
radeon_ioc32.c
radeon_irq_kms.c drm/radeon/kms: add MSI module parameter 2011-11-03 17:53:14 +00:00
radeon_irq.c drm/radeon: Move more code out of line 2011-10-18 09:53:05 +01:00
radeon_kms.c Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags" 2011-10-27 18:15:10 +02:00
radeon_legacy_crtc.c drm/radeon/kms: remove extraneous calls to radeon_pm_compute_clocks() 2011-11-11 14:15:05 +00: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: Move more code out of line 2011-10-18 09:53:05 +01: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: always do extended edid probe 2011-11-01 16:05:31 +00:00
radeon_object.c Revert "drm/ttm: add a way to bo_wait for either the last read or last write" 2011-10-27 18:28:37 +02:00
radeon_object.h Revert "drm/radeon/kms: add a new gem_wait ioctl with read/write flags" 2011-10-27 18:15:10 +02:00
radeon_pm.c drm/radeon/kms/pm: add a proper pm profile init function for fusion 2011-11-11 14:15:37 +00: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 drm/radeon: Move more code out of line 2011-10-18 09:53:05 +01:00
radeon_state.c drm/radeon: Move more code out of line 2011-10-18 09:53:05 +01: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/kms: Make GPU/CPU page size handling consistent in blit code (v2) 2011-09-18 19:44:36 +01:00
radeon.h drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS 2011-11-20 07:53:13 +00:00
rs100d.h
rs400.c drm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2 2011-11-04 10:39:51 +00:00
rs400d.h
rs600.c drm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2 2011-11-04 10:39:51 +00: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
rv250d.h
rv350d.h
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: consolidate GART code, fix segfault after GPU lockup V2 2011-11-04 10:39:51 +00:00
rv770d.h drm/radeon/kms: 6xx/7xx big endian fixes 2011-02-14 09:23:38 +10:00