Skip to contentSkip to conversation

drm/amdkfd: Set gws_mask to 64 bit 1s

PATCH In review Zeng, Oak 2 participants 3 messages Jun 14, 2019 – Jun 20, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Zeng, Oak

author
#0 lore raw

PATCH 1/1 drm/amdkfd: Set gws_mask to 64 bit 1s

Previous kfd doesn't use gws so this mask was set to 0. Set it to 64 bit 1s because now kfd can use all 64 gws resources.

Change-Id Ic8217d6d135099f3395017bbc9c0fe94a739aa93
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -2
index e5c6db1..250798b 100644
@@ -993,8 +993,8 @@ static int set_sched_resources(struct device_queue_manager *dqm)
 
 		res.queue_mask |= (1ull << i);
 	}
-	res.gws_mask = res.oac_mask = res.gds_heap_base =
-						res.gds_heap_size = 0;
+	res.gws_mask = 0xFFFFFFFFFFFFFFFF;
+	res.oac_mask = res.gds_heap_base = res.gds_heap_size = 0;
 
 	pr_debug("Scheduling resources:\n"
 			"vmid mask: 0x%8X\n"
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1560527975-18868-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

Hi Felix,

Can you take a look of this change?

Regards,
Oak

-----Original Message-----
From: Zeng, Oak <[email protected]>
Sent: Friday, June 14, 2019 12:00 PM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>; Zeng, Oak <[email protected]>
Subject: [PATCH] drm/amdkfd: Set gws_mask to 64 bit 1s

Previous kfd doesn't use gws so this mask was set to 0. Set it to 64 bit 1s because now kfd can use all 64 gws resources.

Change-Id Ic8217d6d135099f3395017bbc9c0fe94a739aa93
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -2
index e5c6db1..250798b 100644
@@ -993,8 +993,8 @@ static int set_sched_resources(struct device_queue_manager *dqm)
 
 		res.queue_mask |= (1ull << i);
 	}
-	res.gws_mask = res.oac_mask = res.gds_heap_base =
-						res.gds_heap_size = 0;
+	res.gws_mask = 0xFFFFFFFFFFFFFFFF;
+	res.oac_mask = res.gds_heap_base = res.gds_heap_size = 0;
 
 	pr_debug("Scheduling resources:\n"
 			"vmid mask: 0x%8X\n"

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
In reply to a message not in the archive
Quoted 15 lines · Oak

Previous kfd doesn't use gws so this mask was set to 0. Set it to 64 bit 1s because now kfd can use all 64 gws resources.

Change-Id Ic8217d6d135099f3395017bbc9c0fe94a739aa93
---
  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0 -0
index e5c6db1..250798b 100644

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static int set_sched_resources(struct device_queue_manager *dqm) · line 996

Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -2
@@ -993,8 +993,8 @@ static int set_sched_resources(struct device_queue_manager *dqm)
 
  		res.queue_mask |= (1ull << i);
  	}
-	res.gws_mask = res.oac_mask = res.gds_heap_base =
-						res.gds_heap_size = 0;
+	res.gws_mask = 0xFFFFFFFFFFFFFFFF;

I think this is correct (counting 16 Fs). But if you want to set all 64 bits, ~0ull may be less error prone.

Either way, this patch is Reviewed-by: Felix Kuehling <[email protected]>

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static int set_sched_resources(struct device_queue_manager *dqm) · line 1000

Quoted 4 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -0
+	res.oac_mask = res.gds_heap_base = res.gds_heap_size = 0;
 
  	pr_debug("Scheduling resources:\n"
  			"vmid mask: 0x%8X\n"

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx