aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-12 23:56:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-12 23:56:10 -0400
commit16e205cf42da1f497b10a4a24f563e6c0d574eec (patch)
tree0a7e7670eca5973084a15c0cdc398cf37626e2af /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentaffb028071492048ce1d8fa37e5e4236152b02cc (diff)
parenta10beabba213924d876f2d10ca9351aeab93f58a (diff)
Merge tag 'drm-fixes-for-v4.17-rc1' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "One omap, and one alsa pm fix (we merged the breaking patch via drm tree). Otherwise it's two bunches of amdgpu fixes, removing an unneeded file, some DC fixes, HDMI audio regression fix, and some vega12 fixes" * tag 'drm-fixes-for-v4.17-rc1' of git://people.freedesktop.org/~airlied/linux: (27 commits) Revert "drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)" Revert "drm/amd/display: fix dereferencing possible ERR_PTR()" drm/amd/display: Fix regamma not affecting full-intensity color values drm/amd/display: Fix FBC text console corruption drm/amd/display: Only register backlight device if embedded panel connected drm/amd/display: fix brightness level after resume from suspend drm/amd/display: HDMI has no sound after Panel power off/on drm/amdgpu: add MP1 and THM hw ip base reg offset drm/amdgpu: fix null pointer panic with direct fw loading on gpu reset drm/radeon: add PX quirk for Asus K73TK drm/omap: fix crash if there's no video PLL drm/amdgpu: Fix memory leaks at amdgpu_init() error path drm/amdgpu: Fix PCIe lane width calculation drm/radeon: Fix PCIe lane width calculation drm/amdgpu/si: implement get/set pcie_lanes asic callback drm/amdgpu: Add support for SRBM selection v3 Revert "drm/amdgpu: Don't change preferred domian when fallback GTT v5" drm/amd/powerply: fix power reading on Fiji drm/amd/powerplay: Enable ACG SS feature drm/amdgpu/sdma: fix mask in emit_pipeline_sync ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index fac4b6067efd..6d08cde8443c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -356,7 +356,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, unsigned long size,
356 struct amdgpu_bo *bo; 356 struct amdgpu_bo *bo;
357 unsigned long page_align; 357 unsigned long page_align;
358 size_t acc_size; 358 size_t acc_size;
359 u32 domains;
360 int r; 359 int r;
361 360
362 page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT; 361 page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT;
@@ -418,23 +417,12 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, unsigned long size,
418#endif 417#endif
419 418
420 bo->tbo.bdev = &adev->mman.bdev; 419 bo->tbo.bdev = &adev->mman.bdev;
421 domains = bo->preferred_domains; 420 amdgpu_ttm_placement_from_domain(bo, domain);
422retry: 421
423 amdgpu_ttm_placement_from_domain(bo, domains);
424 r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type, 422 r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type,
425 &bo->placement, page_align, &ctx, acc_size, 423 &bo->placement, page_align, &ctx, acc_size,
426 NULL, resv, &amdgpu_ttm_bo_destroy); 424 NULL, resv, &amdgpu_ttm_bo_destroy);
427 425 if (unlikely(r != 0))
428 if (unlikely(r && r != -ERESTARTSYS)) {
429 if (bo->flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
430 bo->flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
431 goto retry;
432 } else if (domains != bo->preferred_domains) {
433 domains = bo->allowed_domains;
434 goto retry;
435 }
436 }
437 if (unlikely(r))
438 return r; 426 return r;
439 427
440 if (adev->gmc.visible_vram_size < adev->gmc.real_vram_size && 428 if (adev->gmc.visible_vram_size < adev->gmc.real_vram_size &&