mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/amdkfd: Move mqd_on_vram out of v9 mqd manager
This will allow it to be used outside of gfx9 Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: David Francis <David.Francis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
88ed96abbb
commit
698684953e
|
|
@ -315,3 +315,17 @@ bool kfd_check_hiq_mqd_doorbell_id(struct kfd_node *node, uint32_t doorbell_id,
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool mqd_on_vram(struct amdgpu_device *adev)
|
||||
{
|
||||
if (adev->apu_prefer_gtt)
|
||||
return false;
|
||||
|
||||
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
|
||||
case IP_VERSION(9, 4, 3):
|
||||
case IP_VERSION(9, 5, 0):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,4 +201,6 @@ uint64_t kfd_mqd_stride(struct mqd_manager *mm,
|
|||
struct queue_properties *q);
|
||||
bool kfd_check_hiq_mqd_doorbell_id(struct kfd_node *node, uint32_t doorbell_id,
|
||||
uint32_t inst);
|
||||
bool mqd_on_vram(struct amdgpu_device *adev);
|
||||
|
||||
#endif /* KFD_MQD_MANAGER_H_ */
|
||||
|
|
|
|||
|
|
@ -115,20 +115,6 @@ static void set_priority(struct v9_mqd *m, struct queue_properties *q)
|
|||
m->cp_hqd_pipe_priority = pipe_priority_map[q->priority];
|
||||
}
|
||||
|
||||
static bool mqd_on_vram(struct amdgpu_device *adev)
|
||||
{
|
||||
if (adev->apu_prefer_gtt)
|
||||
return false;
|
||||
|
||||
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
|
||||
case IP_VERSION(9, 4, 3):
|
||||
case IP_VERSION(9, 5, 0):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static struct kfd_mem_obj *allocate_mqd(struct mqd_manager *mm,
|
||||
struct queue_properties *q)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user