linux/drivers/gpu/drm/radeon
Pavel Ondračka f896e86273 drm/radeon: fix r100_copy_blit for large BOs
r100_copy_blit() copies BOs as 1024-pixel-wide ARGB8888 blits, so one
GPU page becomes one blit row. Large copies are split into chunks of at
most 8191 rows.

The kernel register header names the packet coordinate dwords SRC_Y_X
and DST_Y_X. In the BITBLT_MULTI description in
R5xx_Acceleration_v1.5.pdf docs, these correspond to [SRC_X1 | SRC_Y1]
and [DST_X1 | DST_Y1], which are signed 13-bit coordinates in the
-8192..8191 range. The old code kept SRC/DST_PITCH_OFFSET at the BO base
and used SRC_Y_X/DST_Y_X as the chunk address, so large BO moves could
exceed that coordinate range.

Compute per-chunk SRC/DST_PITCH_OFFSET bases and emit zero source and
destination coordinates. r100_copy_blit() already packs
SRC/DST_PITCH_OFFSET as pitch plus base offset, so large chunk addresses
belong there rather than in the coordinate fields.

This fixes Prison Architect corruption with 4096x4096 mipped textures
after they are evicted to GTT under memory pressure on RV530.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/6716
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 87be26aee7)
Cc: stable@vger.kernel.org
2026-06-17 18:19:00 -04:00
..
reg_srcs
.gitignore drm/radeon: fix incorrrect SPDX-License-Identifiers 2022-06-21 17:54:53 -04:00
atom-bits.h drm/radeon: Clean up errors in ni_dpm.c 2024-01-18 15:39:02 -05:00
atom-names.h
atom-types.h
atom.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
atom.h drm/radeon: check PS, WS index 2024-01-15 18:35:37 -05:00
atombios_crtc.c drm/radeon: Do not implement mode_set_base_atomic callback 2025-12-02 09:20:36 +01:00
atombios_dp.c drm/display: dp: change drm_dp_dpcd_read_link_status() return value 2025-03-25 16:20:38 +02:00
atombios_encoders.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
atombios_i2c.c drm/radeon: check PS, WS index 2024-01-15 18:35:37 -05:00
atombios.h drm/radeon: fixing typo in macro name 2025-05-22 12:02:01 -04:00
avivod.h
btc_dpm.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
btc_dpm.h
btcd.h
cayman_blit_shaders.h drm/radeon: change cayman_default_state table from global to static 2022-04-11 13:50:35 -04:00
ci_dpm.c drm/radeon: add missing revision check for CI 2026-05-05 09:56:48 -04:00
ci_dpm.h drm/radeon: Clean up errors in ci_dpm.h 2024-01-18 15:40:19 -05:00
ci_smc.c
cik_blit_shaders.h drm/radeon: change cik_default_state table from global to static 2022-04-26 11:43:51 -04:00
cik_reg.h
cik_sdma.c
cik.c drm/radeon: replace nested min calls with min3 2026-04-17 15:41:13 -04:00
cik.h
cikd.h
clearstate_cayman.h drm/radeon: Clean up errors in clearstate_cayman.h 2024-01-18 15:40:15 -05:00
clearstate_ci.h drm/radeon: Clean up errors in clearstate_ci.h 2024-01-18 15:40:13 -05:00
clearstate_defs.h
clearstate_evergreen.h drm/radeon: Fix warning using plain integer as NULL 2023-11-17 09:29:54 -05:00
clearstate_si.h drm/radeon: that open brace { should be on the previous line 2023-07-27 14:47:29 -04:00
cypress_dpm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cypress_dpm.h
dce3_1_afmt.c drm/radeon: include drm/drm_edid.h only where needed 2023-12-13 15:28:31 -05:00
dce6_afmt.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
dce6_afmt.h
evergreen_blit_shaders.h drm/radeon/kms: change evergreen_default_state table from global to static 2022-04-19 13:58:32 -04:00
evergreen_cs.c drm/radeon/evergreen_cs: Add missing NULL prefix check in surface check 2026-05-19 11:49:56 -04:00
evergreen_dma.c
evergreen_hdmi.c drm/radeon: convert to using is_hdmi and has_audio from display info 2024-05-23 14:37:24 +03:00
evergreen_hdmi.h
evergreen_reg.h drm/radeon: Clean up errors in evergreen_reg.h 2024-01-18 15:39:55 -05:00
evergreen_smc.h drm/radeon/dpm: Clean up errors in evergreen_smc.h 2024-01-18 15:40:17 -05:00
evergreen.c drm/radeon: Convert legacy DRM logging in evergreen.c to drm_* helpers 2025-12-16 13:29:15 -05:00
evergreen.h drm/radeon/evergreen: Remove the repeated declaration 2021-05-25 23:47:24 -04:00
evergreend.h
Kconfig PCI: Add CONFIG_MMU dependency 2025-04-23 15:40:30 -05:00
kv_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
kv_dpm.h
kv_smc.c drm/radeon: Clean up errors in kv_smc.c 2024-01-18 15:39:53 -05:00
Makefile drm/radeon: Only build fbdev if DRM_FBDEV_EMULATION is set 2023-03-31 11:18:42 -04:00
mkregtable.c
ni_dma.c
ni_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ni_dpm.h drm/radeon/ni_dpm: Clean up errors in ni_dpm.c 2024-01-18 15:38:59 -05:00
ni_reg.h
ni.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
ni.h
nid.h
nislands_smc.h drm/radeon/ni_dpm: Clean up errors in nislands_smc.h 2024-01-18 15:40:36 -05:00
ObjectID.h
ppsmc.h
pptable.h drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[] 2026-01-05 17:23:41 -05:00
r100_track.h
r100.c drm/radeon: fix r100_copy_blit for large BOs 2026-06-17 18:19:00 -04:00
r100d.h
r200.c drm/radeon: use dev_warn_once() in CS parsers 2025-09-05 17:38:42 -04:00
r300_reg.h gpu/drm/radeon: Clean up errors in evergreen.c 2024-01-18 15:39:50 -05:00
r300.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
r300d.h
r420.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
r420d.h
r500_reg.h
r520.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
r520d.h
r600_cs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
r600_dma.c
r600_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
r600_dpm.h drm/radeon: Clean up errors in r600_dpm.h 2024-01-18 15:38:52 -05:00
r600_hdmi.c drm/radeon/radeon_audio: Remove unused r600_hdmi_audio_workaround 2025-04-22 08:51:45 -04:00
r600_reg.h
r600.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
r600.h
r600d.h
radeon_acpi.c ACPI: AC: Define ACPI_AC_CLASS in one place 2026-03-13 16:48:28 +01:00
radeon_acpi.h drm/radeon: Fix missing prototypes in radeon_atpx_handler.c 2023-06-15 11:06:58 -04:00
radeon_agp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_asic.c drm/radeon: Clean up errors in radeon_asic.c 2024-01-18 15:39:16 -05:00
radeon_asic.h drm/radeon/radeon_audio: Remove unused r600_hdmi_audio_workaround 2025-04-22 08:51:45 -04:00
radeon_atombios.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
radeon_atombios.h
radeon_atpx_handler.c drm/radeon: Clean up errors in radeon_atpx_handler.c 2024-01-18 15:38:46 -05:00
radeon_audio.c drm/radeon/radeon_connectors: use struct drm_edid instead of struct edid 2026-05-27 10:51:15 -04:00
radeon_audio.h drm/radeon: Clean up errors in radeon_audio.h 2024-01-18 15:39:27 -05:00
radeon_benchmark.c
radeon_bios.c drm/radeon: Use pci_get_base_class() to reduce duplicated code 2023-09-28 16:54:54 -05:00
radeon_clocks.c
radeon_combios.c drm/radeon/radeon_connectors: use struct drm_edid instead of struct edid 2026-05-27 10:51:15 -04:00
radeon_connectors.c drm/radeon/radeon_connectors: remove radeon_connector_free_edid 2026-05-27 10:51:19 -04:00
radeon_cs.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
radeon_cursor.c
radeon_device.c drm/radeon: Test for fbdev GEM object with generic helper 2026-03-06 16:31:42 -05:00
radeon_device.h
radeon_display.c drm/radeon: add WQ_PERCPU to alloc_workqueue users 2026-04-03 13:52:39 -04:00
radeon_dp_auxch.c drm/radeon: Do not use deprecated drm log API 2023-01-18 10:00:03 +01:00
radeon_drv.c drm/amdgpu: Use amdgpu by default for CIK APUs too 2026-04-03 14:04:57 -04:00
radeon_drv.h drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
radeon_encoders.c drm/radeon: Fix encoder->possible_clones 2024-10-15 11:25:01 -04:00
radeon_family.h
radeon_fbdev.c drm/radeon: Test for fbdev GEM object with generic helper 2026-03-06 16:31:42 -05:00
radeon_fence.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_gart.c drm/radeon: Use vmalloc_array and vcalloc to simplify code 2025-08-18 17:06:24 -04:00
radeon_gem.c drm/radeon: fix integer overflow in radeon_align_pitch() 2026-04-17 15:41:16 -04:00
radeon_i2c.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_ib.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
radeon_irq_kms.c drm/radeon: Make MSI address limit based on the device DMA limit 2026-01-31 01:11:48 +01:00
radeon_kms.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_kms.h drm/radeon: Convert to Linux IRQ interfaces 2021-08-10 20:13:49 +02:00
radeon_legacy_crtc.c drm/radeon: Do not implement mode_set_base_atomic callback 2025-12-02 09:20:36 +01:00
radeon_legacy_encoders.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_legacy_encoders.h
radeon_legacy_tv.c drm/radeon: Move assignment outside if condition 2023-07-27 14:47:34 -04:00
radeon_mn.c dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3 2022-04-07 12:53:54 +02:00
radeon_mode.h drm/radeon/radeon_connectors: use struct drm_edid instead of struct edid 2026-05-27 10:51:15 -04:00
radeon_object.c drm/radeon: switch over to drm_exec v2 2024-11-20 13:59:34 +01:00
radeon_object.h drm/radeon: switch over to drm_exec v2 2024-11-20 13:59:34 +01:00
radeon_pm.c drm/radeon/pm: Remove redundant ternary operators 2025-09-05 17:38:40 -04:00
radeon_pm.h
radeon_prime.c drm/gem: Acquire reservation lock in drm_gem_{pin/unpin}() 2024-03-11 13:33:50 +01:00
radeon_prime.h
radeon_reg.h
radeon_ring.c drm/radeon: fix memory leak in radeon_ring_restore() on lock failure 2026-04-17 15:41:16 -04:00
radeon_sa.c drm/radeon: make fence wait in suballocator uninterrruptable 2023-09-07 17:45:34 +02:00
radeon_semaphore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_sync.c Linux 5.18-rc5 2022-05-03 16:08:48 +10:00
radeon_test.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_trace_points.c
radeon_trace.h drm/ttm: rework on ttm_resource to use size_t type 2022-10-27 11:42:58 +02:00
radeon_ttm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
radeon_ttm.h drm/radeon: Implement mmap as GEM object function 2021-05-26 20:56:29 +02:00
radeon_ucode.c
radeon_ucode.h
radeon_uvd.c drm/radeon/uvd: Replace nested max() with single max3() 2025-03-19 15:51:40 -04:00
radeon_vce.c drm/radeon: convert VCE logging to drm_* helpers 2026-01-20 17:28:06 -05:00
radeon_vm.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
radeon.h drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rs100d.h
rs400.c drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M 2025-03-05 10:43:01 -05:00
rs400d.h
rs600.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
rs600d.h
rs690.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
rs690d.h
rs780_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
rs780_dpm.h
rs780d.h
rv6xx_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
rv6xx_dpm.h drm/radeon/kms: Clean up errors in rv6xx_dpm.h 2024-01-18 15:39:14 -05:00
rv6xxd.h
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
rv515d.h
rv730_dpm.c
rv730d.h
rv740_dpm.c drm/radeon: fix possible division-by-zero errors 2023-06-09 10:44:47 -04:00
rv740d.h
rv770_dma.c
rv770_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
rv770_dpm.h
rv770_smc.c drm/radeon: that open brace { should be on the previous line 2023-07-27 14:47:31 -04:00
rv770_smc.h drm/radeon: Clean up errors in rv770_smc.h 2024-01-18 15:39:45 -05:00
rv770.c drm/radeon: change rdev->ddev to rdev_to_drm(rdev) 2024-07-23 17:31:59 -04:00
rv770.h
rv770d.h
si_blit_shaders.h drm/radeon: change si_default_state table from global to static 2022-04-06 10:20:25 -04:00
si_dma.c
si_dpm.c drm/radeon: apply state adjust rules to some additional HAINAN vairants 2026-03-17 18:04:15 -04:00
si_dpm.h drm/radeon: Clean up errors in si_dpm.h 2024-01-18 15:39:35 -05:00
si_reg.h
si_smc.c
si.c drm/radeon: replace nested min calls with min3 2026-04-17 15:41:13 -04:00
si.h
sid.h drm/radeon: fix MAX_POWER_SHIFT value 2025-04-07 15:18:32 -04:00
sislands_smc.h drm/radeon/si_dpm: open brace '{' following struct go on the same line 2023-07-25 13:47:27 -04:00
smu7_discrete.h drm/radeon: Clean up errors in smu7_discrete.h 2024-01-18 15:39:04 -05:00
smu7_fusion.h drm/radeon/kms: Clean up errors in smu7_fusion.h 2024-01-18 15:40:06 -05:00
smu7.h drm/radeon/kms: Clean up errors in smu7.h 2024-01-18 15:40:08 -05:00
sumo_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
sumo_dpm.h
sumo_smc.c
sumod.h
trinity_dpm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
trinity_dpm.h drm/radeon/dpm: Clean up errors in trinity_dpm.h 2024-01-18 15:39:09 -05:00
trinity_smc.c
trinityd.h
uvd_v1_0.c drm/radeon: convert UVD v1.0 logging to drm_* helpers 2026-01-08 11:43:13 -05:00
uvd_v2_2.c
uvd_v3_1.c
uvd_v4_2.c
vce_v1_0.c drm/radeon: OLAND boards don't have VCE 2021-02-18 16:43:09 -05:00
vce_v2_0.c
vce.h