diff options
author | Dave Airlie <airlied@redhat.com> | 2024-06-27 17:18:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2024-06-27 17:18:49 +1000 |
commit | 365aa9f573995b46ca14a24165d85e31160e47b9 (patch) | |
tree | 392d9656fc902e8198ee89efe278c78376478f8a /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 541b1b0a8fc235bca355921eb7f3f59a8efa3e9a (diff) | |
parent | 1ecef5589320fd56af599b624d59c355d162ac7b (diff) |
Merge tag 'amd-drm-next-6.11-2024-06-22' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.11-2024-06-22:
amdgpu:
- HPD fixes
- PSR fixes
- DCC updates
- DCN 4.0.1 fixes
- FAMS fixes
- Misc code cleanups
- SR-IOV fixes
- GPUVM TLB flush cleanups
- Make VCN less verbose
- ACPI backlight fixes
- MES fixes
- Firmware loading cleanups
- Replay fixes
- LTTPR fixes
- Trap handler fixes
- Cursor and overlay fixes
- Primary plane zpos fixes
- DML 2.1 fixes
- RAS updates
- USB4 fixes
- MALL fixes
- Reserved VMID fix
- Silence UBSAN warnings
amdkfd:
- Misc code cleanups
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240622152523.2267072-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 8de2d05d0735..58906bf7448e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -295,8 +295,8 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, struct amdgpu_res_cursor src_mm, dst_mm; struct dma_fence *fence = NULL; int r = 0; - uint32_t copy_flags = 0; + struct amdgpu_bo *abo_src, *abo_dst; if (!adev->mman.buffer_funcs_enabled) { DRM_ERROR("Trying to move memory with ring turned off.\n"); @@ -325,8 +325,14 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev, if (r) goto error; + abo_src = ttm_to_amdgpu_bo(src->bo); + abo_dst = ttm_to_amdgpu_bo(dst->bo); if (tmz) copy_flags |= AMDGPU_COPY_FLAGS_TMZ; + if (abo_src->flags & AMDGPU_GEM_CREATE_GFX12_DCC) + copy_flags |= AMDGPU_COPY_FLAGS_READ_DECOMPRESSED; + if (abo_dst->flags & AMDGPU_GEM_CREATE_GFX12_DCC) + copy_flags |= AMDGPU_COPY_FLAGS_WRITE_COMPRESSED; r = amdgpu_copy_buffer(ring, from, to, cur_size, resv, &next, false, true, copy_flags); |