alistair23-linux/drivers/gpu/drm/radeon
Ilija Hadzic 52b53a0bf8 drm/radeon/kms/blit: fix blit copy for very large buffers
Evergreen and NI blit copy was broken if the buffer maps to a rectangle
whose one dimension is 16384 (max dimension allowed by these chips).
In the mainline kernel, the problem is exposed only when buffers are
very large (1G), but it's still a problem. The problem could be exposed
for smaller buffers if anyone modifies the algorithm for rectangle
construction in r600_blit_create_rect() (the reason why someone would
modify that algorithm is to tune the performance of buffer moves).

The root cause was in i2f() function which only operated on range between
0 and 16383. Fix this by extending the range of i2f() function to 0 to
32767.

While at it improve the function so that the range can be easily
extended in the future (if it becomes necessary), cleanup lines
over 80 characters, and replace in-line comments with one strategic
comment that explains the crux of the function.

Credits to michel@daenzer.net for pointing out the root cause of
the bug.

v2: Fix I2F_MAX_INPUT constant definition goof and warn only once
    if input argument is out of range. Edit the comment a little
    bit to avoid some linguistic confusion and make it look better
    in general.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-02 15:54:48 +00:00
..
reg_srcs
.gitignore
atom-bits.h
atom-names.h
atom-types.h
atom.c drm: introduce drm_can_sleep and use in intel/radeon drivers. (v2) 2012-01-06 10:01:35 +00:00
atom.h
atombios.h
atombios_crtc.c drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height. 2012-02-01 15:42:54 +00:00
atombios_dp.c drm/radeon/kms: fix TRAVIS panel setup 2012-02-02 15:26:50 +00:00
atombios_encoders.c drm/radeon/kms: refine TMDS dual link checks 2012-01-24 17:35:52 +00:00
avivod.h
cayman_blit_shaders.c
cayman_blit_shaders.h
evergreen.c drm/radeon/kms: add some missing semaphore init 2012-01-23 11:03:26 +00:00
evergreen_blit_kms.c drm/radeon: rename struct radeon_cp to radeon_ring 2011-12-20 19:50:56 +00:00
evergreen_blit_shaders.c
evergreen_blit_shaders.h
evergreen_cs.c drm/radeon/kms/ni: fix packet2 handling for VM IB parser 2012-01-13 09:00:16 +00:00
evergreen_reg.h Merge branch 'drm-radeon-testing' of ../drm-radeon-next into drm-core-next 2012-01-03 09:45:12 +00:00
evergreend.h drm/radeon/kms: add some missing semaphore init 2012-01-23 11:03:26 +00:00
Kconfig
Makefile drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
mkregtable.c
ni.c drm/radeon/kms: add some missing semaphore init 2012-01-23 11:03:26 +00:00
ni_reg.h
nid.h drm/radeon/kms: add some missing semaphore init 2012-01-23 11:03:26 +00:00
ObjectID.h
r100.c radeon: Call pci_clear_master() instead of open-coding it. 2012-01-13 09:02:34 +00:00
r100_track.h
r100d.h
r200.c drm/radeon: rename struct radeon_cp to radeon_ring 2011-12-20 19:50:56 +00:00
r300.c drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
r300_cmdbuf.c
r300_reg.h
r300d.h
r420.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
r420d.h
r500_reg.h drm/radeon/kms: define TMDS/LVTM HDMI enabling bits 2012-01-03 09:40:47 +00:00
r520.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
r520d.h
r600.c drm/radeon: make ib size variable 2012-01-05 10:03:33 +00:00
r600_audio.c drm/radeon/kms: support for audio on Evergreen 2011-12-19 18:40:26 +00:00
r600_blit.c
r600_blit_kms.c drm/radeon/kms/blit: fix blit copy for very large buffers 2012-02-02 15:54:48 +00:00
r600_blit_shaders.c
r600_blit_shaders.h
r600_cp.c drm/radeon/kms: add support for semaphores v3 2011-12-20 19:49:36 +00:00
r600_cs.c drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
r600_hdmi.c drm/radeon/kms: define TMDS/LVTM HDMI enabling bits 2012-01-03 09:40:47 +00:00
r600_reg.h
r600d.h drm/radeon/kms: add support for semaphores v3 2011-12-20 19:49:36 +00:00
radeon.h drm/radeon: avoid deadlock if GPU lockup is detected in ib_pool_get 2012-01-25 09:42:06 +00:00
radeon_acpi.c drm/radeon/kms: Skip ACPI call to ATIF when possible 2011-12-01 09:57:34 +00:00
radeon_agp.c
radeon_asic.c drm/radeon/kms: sync across multiple rings when doing bo moves v3 2012-01-06 09:16:38 +00:00
radeon_asic.h drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
radeon_atombios.c drm/radeon/kms/atom: fix possible segfault in pm setup 2012-01-03 09:17:16 +00:00
radeon_atpx_handler.c drm/radeon: fix use after free in ATRM bios reading code. 2012-02-02 15:25:16 +00:00
radeon_benchmark.c drm/radeon/benchmark: common modes sweep ignores 640x480@32 2012-01-05 14:40:49 +00:00
radeon_bios.c drm/radeon: finish getting bios earlier 2012-01-24 17:34:32 +00:00
radeon_clocks.c
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
radeon_cs.c drm/radeon/kms: check if vm is supported in VA ioctl 2012-01-09 12:10:09 +00:00
radeon_cursor.c
radeon_device.c drm/radeon/kms: disable output polling when suspended 2012-02-01 15:41:39 +00:00
radeon_display.c drm/radeon/kms: move disp eng pll setup to init path 2012-01-24 17:35:49 +00:00
radeon_drv.c drm/radeon/kms: Fix module parameter description format 2012-01-13 09:00:51 +00:00
radeon_drv.h
radeon_encoders.c drm/radeon/kms: refine TMDS dual link checks 2012-01-24 17:35:52 +00:00
radeon_family.h
radeon_fb.c drm: Replace pitch with pitches[] in drm_framebuffer 2011-12-20 10:06:27 +00:00
radeon_fence.c drm/radeon/kms: Add support for multi-ring sync in CS ioctl (v2) 2012-01-06 09:16:09 +00:00
radeon_gart.c drm/radeon: double lock typo in radeon_vm_bo_rmv() 2012-01-09 12:49:48 +00:00
radeon_gem.c drm/radeon/kms: check if vm is supported in VA ioctl 2012-01-09 12:10:09 +00:00
radeon_i2c.c drm/radeon/kms: Fix device tree linkage of DP i2c buses too 2012-02-01 15:45:34 +00:00
radeon_ioc32.c
radeon_irq.c
radeon_irq_kms.c drm/radeon/kms: Add an MSI quirk for Dell RS690 2012-01-23 11:00:48 +00:00
radeon_kms.c drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
radeon_legacy_crtc.c Merge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-next 2011-12-20 14:43:53 +00:00
radeon_legacy_encoders.c
radeon_legacy_tv.c
radeon_mem.c
radeon_mode.h drm/radeon/kms: refine TMDS dual link checks 2012-01-24 17:35:52 +00:00
radeon_object.c drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
radeon_object.h drm/radeon: GPU virtual memory support v22 2012-01-06 09:15:42 +00:00
radeon_pm.c drm/radeon: rename struct radeon_cp to radeon_ring 2011-12-20 19:50:56 +00:00
radeon_reg.h
radeon_ring.c drm/radeon: avoid deadlock if GPU lockup is detected in ib_pool_get 2012-01-25 09:42:06 +00:00
radeon_sa.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
radeon_semaphore.c drm/radeon: allocate semaphore from the ib pool 2012-01-05 10:03:53 +00:00
radeon_state.c
radeon_test.c drm/radeon/kms: add missing ring ready check in sync tests 2012-01-05 10:02:42 +00:00
radeon_trace.h
radeon_trace_points.c
radeon_ttm.c ttm: fix agp since ttm tt rework 2012-01-06 09:34:03 +00:00
rs100d.h
rs400.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
rs400d.h
rs600.c radeon: Call pci_clear_master() instead of open-coding it. 2012-01-13 09:02:34 +00:00
rs600d.h
rs690.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
rs690d.h
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
rv515d.h
rv770.c drm/radeon: introduce a sub allocator and convert ib pool to it v4 2011-12-20 19:52:12 +00:00
rv770d.h