]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: enable TMZ bit in sdma copy pkt for sdma v4
authorAaron Liu <aaron.liu@amd.com>
Tue, 15 Oct 2019 08:47:44 +0000 (16:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 20:20:29 +0000 (16:20 -0400)
Enable sdma TMZ mode via setting TMZ bit in sdma copy pkt
for sdma v4

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

index 4cabab0976819bf96f39271f651e910fa6168735..c0ca9a8229e116dec09c88286e17dab65e053333 100644 (file)
@@ -2462,7 +2462,8 @@ static void sdma_v4_0_emit_copy_buffer(struct amdgpu_ib *ib,
                                       bool tmz)
 {
        ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_COPY) |
-               SDMA_PKT_HEADER_SUB_OP(SDMA_SUBOP_COPY_LINEAR);
+               SDMA_PKT_HEADER_SUB_OP(SDMA_SUBOP_COPY_LINEAR) |
+               SDMA_PKT_COPY_LINEAR_HEADER_TMZ(tmz ? 1 : 0);
        ib->ptr[ib->length_dw++] = byte_count - 1;
        ib->ptr[ib->length_dw++] = 0; /* src/dst endian swap */
        ib->ptr[ib->length_dw++] = lower_32_bits(src_offset);