drm/amdkfd: Fix scratch memory with HWS enabled
authorFelix Kuehling <Felix.Kuehling@amd.com>
Fri, 23 Mar 2018 19:30:33 +0000 (15:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:19 +0000 (07:52 +0200)
[ Upstream commit c70a36268799cf2f902b5a31e452571fcb96bfe9 ]

Program sh_hidden_private_base_vmid correctly in the map-process
PM4 packet.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c

index 1d312603de9fbb1624a98fbfac9a3d240490bf4b..308571b09c6b1c3bcd1d80d4c16a376abcebf988 100644 (file)
@@ -166,8 +166,7 @@ static int pm_create_map_process(struct packet_manager *pm, uint32_t *buffer,
        packet->sh_mem_ape1_base = qpd->sh_mem_ape1_base;
        packet->sh_mem_ape1_limit = qpd->sh_mem_ape1_limit;
 
-       /* TODO: scratch support */
-       packet->sh_hidden_private_base_vmid = 0;
+       packet->sh_hidden_private_base_vmid = qpd->sh_hidden_private_base;
 
        packet->gds_addr_lo = lower_32_bits(qpd->gds_context_area);
        packet->gds_addr_hi = upper_32_bits(qpd->gds_context_area);