mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 11:58:32 -04:00
drm/amdgpu: add configurable grace period for unmap queues
The HWS schedule allows a grace period for wave completion prior to preemption for better performance by avoiding CWSR on waves that can potentially complete quickly. The debugger, on the other hand, will want to inspect wave status immediately after it actively triggers preemption (a suspend function to be provided). To minimize latency between preemption and debugger wave inspection, allow immediate preemption by setting the grace period to 0. Note that setting the preepmtion grace period to 0 will result in an infinite grace period being set due to a CP FW bug so set it to 1 for now. Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
33f3437ae1
commit
7cee6a6824
@@ -1350,6 +1350,8 @@ struct packet_manager_funcs {
|
||||
int (*unmap_queues)(struct packet_manager *pm, uint32_t *buffer,
|
||||
enum kfd_unmap_queues_filter mode,
|
||||
uint32_t filter_param, bool reset);
|
||||
int (*set_grace_period)(struct packet_manager *pm, uint32_t *buffer,
|
||||
uint32_t grace_period);
|
||||
int (*query_status)(struct packet_manager *pm, uint32_t *buffer,
|
||||
uint64_t fence_address, uint64_t fence_value);
|
||||
int (*release_mem)(uint64_t gpu_addr, uint32_t *buffer);
|
||||
@@ -1360,6 +1362,7 @@ struct packet_manager_funcs {
|
||||
int set_resources_size;
|
||||
int map_queues_size;
|
||||
int unmap_queues_size;
|
||||
int set_grace_period_size;
|
||||
int query_status_size;
|
||||
int release_mem_size;
|
||||
};
|
||||
@@ -1382,6 +1385,8 @@ int pm_send_unmap_queue(struct packet_manager *pm,
|
||||
|
||||
void pm_release_ib(struct packet_manager *pm);
|
||||
|
||||
int pm_update_grace_period(struct packet_manager *pm, uint32_t grace_period);
|
||||
|
||||
/* Following PM funcs can be shared among VI and AI */
|
||||
unsigned int pm_build_pm4_header(unsigned int opcode, size_t packet_size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user