sync code with last improvements from OpenBSD
This commit is contained in:
parent
5903cbe575
commit
62d64fa864
841 changed files with 83929 additions and 40755 deletions
|
@ -47,7 +47,6 @@ const unsigned int amdgpu_ctx_num_entities[AMDGPU_HW_IP_NUM] = {
|
|||
bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
|
||||
{
|
||||
switch (ctx_prio) {
|
||||
case AMDGPU_CTX_PRIORITY_UNSET:
|
||||
case AMDGPU_CTX_PRIORITY_VERY_LOW:
|
||||
case AMDGPU_CTX_PRIORITY_LOW:
|
||||
case AMDGPU_CTX_PRIORITY_NORMAL:
|
||||
|
@ -55,6 +54,7 @@ bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
|
|||
case AMDGPU_CTX_PRIORITY_VERY_HIGH:
|
||||
return true;
|
||||
default:
|
||||
case AMDGPU_CTX_PRIORITY_UNSET:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,8 @@ amdgpu_ctx_to_drm_sched_prio(int32_t ctx_prio)
|
|||
{
|
||||
switch (ctx_prio) {
|
||||
case AMDGPU_CTX_PRIORITY_UNSET:
|
||||
return DRM_SCHED_PRIORITY_UNSET;
|
||||
pr_warn_once("AMD-->DRM context priority value UNSET-->NORMAL");
|
||||
return DRM_SCHED_PRIORITY_NORMAL;
|
||||
|
||||
case AMDGPU_CTX_PRIORITY_VERY_LOW:
|
||||
return DRM_SCHED_PRIORITY_MIN;
|
||||
|
|
|
@ -2215,8 +2215,12 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
|
|||
adev->flags |= AMD_IS_PX;
|
||||
|
||||
if (!(adev->flags & AMD_IS_APU)) {
|
||||
parent = pci_upstream_bridge(adev->pdev);
|
||||
#ifdef notyet
|
||||
parent = pcie_find_root_port(adev->pdev);
|
||||
adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
|
||||
#else
|
||||
adev->has_pr3 = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
amdgpu_amdkfd_device_probe(adev);
|
||||
|
|
|
@ -410,7 +410,10 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
|
|||
continue;
|
||||
}
|
||||
|
||||
r = amdgpu_vm_clear_freed(adev, vm, NULL);
|
||||
/* Reserve fences for two SDMA page table updates */
|
||||
r = dma_resv_reserve_fences(resv, 2);
|
||||
if (!r)
|
||||
r = amdgpu_vm_clear_freed(adev, vm, NULL);
|
||||
if (!r)
|
||||
r = amdgpu_vm_handle_moved(adev, vm);
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ static inline bool amdgpu_bo_in_cpu_visible_vram(struct amdgpu_bo *bo)
|
|||
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
|
||||
struct amdgpu_res_cursor cursor;
|
||||
|
||||
if (bo->tbo.resource->mem_type != TTM_PL_VRAM)
|
||||
if (!bo->tbo.resource || bo->tbo.resource->mem_type != TTM_PL_VRAM)
|
||||
return false;
|
||||
|
||||
amdgpu_res_first(bo->tbo.resource, 0, amdgpu_bo_size(bo), &cursor);
|
||||
|
|
|
@ -1147,7 +1147,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)
|
|||
bool bL1SS = false;
|
||||
bool bClkReqSupport = true;
|
||||
|
||||
if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_aspm_support_quirk())
|
||||
if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_pcie_dynamic_switching_supported())
|
||||
return;
|
||||
|
||||
if (adev->flags & AMD_IS_APU ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue