diff options
| author | Jens Axboe <axboe@kernel.dk> | 2019-04-22 11:47:36 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2019-04-22 11:47:36 -0400 |
| commit | 5c61ee2cd5860e41c8ab98837761ffaa93eb4dfe (patch) | |
| tree | 0c78e25f5020eeee47863092ccbb2a3f56bea8a9 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | cdf3e3deb747d5e193dee617ed37c83060eb576f (diff) | |
| parent | 085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff) | |
Merge tag 'v5.1-rc6' into for-5.2/block
Pull in v5.1-rc6 to resolve two conflicts. One is in BFQ, in just a
comment, and is trivial. The other one is a conflict due to a later fix
in the bio multi-page work, and needs a bit more care.
* tag 'v5.1-rc6': (770 commits)
Linux 5.1-rc6
block: make sure that bvec length can't be overflow
block: kill all_q_node in request_queue
x86/cpu/intel: Lower the "ENERGY_PERF_BIAS: Set to normal" message's log priority
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
mm/kmemleak.c: fix unused-function warning
init: initialize jump labels before command line option parsing
kernel/watchdog_hld.c: hard lockup message should end with a newline
kcov: improve CONFIG_ARCH_HAS_KCOV help text
mm: fix inactive list balancing between NUMA nodes and cgroups
mm/hotplug: treat CMA pages as unmovable
proc: fixup proc-pid-vm test
proc: fix map_files test on F29
mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock
mm: swapoff: shmem_unuse() stop eviction without igrab()
mm: swapoff: take notice of completion sooner
mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES
mm: swapoff: shmem_find_swap_entries() filter out other types
slab: store tagged freelist for off-slab slabmgmt
...
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 4f8fb4ecde34..79fb302fb954 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
| @@ -3165,6 +3165,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) | |||
| 3165 | 3165 | ||
| 3166 | /* No need to recover an evicted BO */ | 3166 | /* No need to recover an evicted BO */ |
| 3167 | if (shadow->tbo.mem.mem_type != TTM_PL_TT || | 3167 | if (shadow->tbo.mem.mem_type != TTM_PL_TT || |
| 3168 | shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET || | ||
| 3168 | shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM) | 3169 | shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM) |
| 3169 | continue; | 3170 | continue; |
| 3170 | 3171 | ||
| @@ -3173,11 +3174,16 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) | |||
| 3173 | break; | 3174 | break; |
| 3174 | 3175 | ||
| 3175 | if (fence) { | 3176 | if (fence) { |
| 3176 | r = dma_fence_wait_timeout(fence, false, tmo); | 3177 | tmo = dma_fence_wait_timeout(fence, false, tmo); |
| 3177 | dma_fence_put(fence); | 3178 | dma_fence_put(fence); |
| 3178 | fence = next; | 3179 | fence = next; |
| 3179 | if (r <= 0) | 3180 | if (tmo == 0) { |
| 3181 | r = -ETIMEDOUT; | ||
| 3180 | break; | 3182 | break; |
| 3183 | } else if (tmo < 0) { | ||
| 3184 | r = tmo; | ||
| 3185 | break; | ||
| 3186 | } | ||
| 3181 | } else { | 3187 | } else { |
| 3182 | fence = next; | 3188 | fence = next; |
| 3183 | } | 3189 | } |
| @@ -3188,8 +3194,8 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) | |||
| 3188 | tmo = dma_fence_wait_timeout(fence, false, tmo); | 3194 | tmo = dma_fence_wait_timeout(fence, false, tmo); |
| 3189 | dma_fence_put(fence); | 3195 | dma_fence_put(fence); |
| 3190 | 3196 | ||
| 3191 | if (r <= 0 || tmo <= 0) { | 3197 | if (r < 0 || tmo <= 0) { |
| 3192 | DRM_ERROR("recover vram bo from shadow failed\n"); | 3198 | DRM_ERROR("recover vram bo from shadow failed, r is %ld, tmo is %ld\n", r, tmo); |
| 3193 | return -EIO; | 3199 | return -EIO; |
| 3194 | } | 3200 | } |
| 3195 | 3201 | ||
| @@ -3625,6 +3631,7 @@ static void amdgpu_device_get_min_pci_speed_width(struct amdgpu_device *adev, | |||
| 3625 | struct pci_dev *pdev = adev->pdev; | 3631 | struct pci_dev *pdev = adev->pdev; |
| 3626 | enum pci_bus_speed cur_speed; | 3632 | enum pci_bus_speed cur_speed; |
| 3627 | enum pcie_link_width cur_width; | 3633 | enum pcie_link_width cur_width; |
| 3634 | u32 ret = 1; | ||
| 3628 | 3635 | ||
| 3629 | *speed = PCI_SPEED_UNKNOWN; | 3636 | *speed = PCI_SPEED_UNKNOWN; |
| 3630 | *width = PCIE_LNK_WIDTH_UNKNOWN; | 3637 | *width = PCIE_LNK_WIDTH_UNKNOWN; |
| @@ -3632,6 +3639,10 @@ static void amdgpu_device_get_min_pci_speed_width(struct amdgpu_device *adev, | |||
| 3632 | while (pdev) { | 3639 | while (pdev) { |
| 3633 | cur_speed = pcie_get_speed_cap(pdev); | 3640 | cur_speed = pcie_get_speed_cap(pdev); |
| 3634 | cur_width = pcie_get_width_cap(pdev); | 3641 | cur_width = pcie_get_width_cap(pdev); |
| 3642 | ret = pcie_bandwidth_available(adev->pdev, NULL, | ||
| 3643 | NULL, &cur_width); | ||
| 3644 | if (!ret) | ||
| 3645 | cur_width = PCIE_LNK_WIDTH_RESRV; | ||
| 3635 | 3646 | ||
| 3636 | if (cur_speed != PCI_SPEED_UNKNOWN) { | 3647 | if (cur_speed != PCI_SPEED_UNKNOWN) { |
| 3637 | if (*speed == PCI_SPEED_UNKNOWN) | 3648 | if (*speed == PCI_SPEED_UNKNOWN) |
