aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-10-19 20:47:19 -0400
committerDave Airlie <airlied@redhat.com>2017-10-19 20:47:19 -0400
commit6585d4274b0baf1d09318539c4a726a96b51af34 (patch)
tree179aacc9409db45966595893ae4842104b314442 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parent40d86701a625eed9e644281b9af228d6a52d8ed9 (diff)
parent96687ec0bb478088cb6941a7dca3bb6808a19313 (diff)
Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
Last set of features for 4.15. Highlights: - Add a bo flag to allow buffers to opt out of implicit sync - Add ctx priority setting interface - Lots more powerplay cleanups - Start to plumb through vram lost infrastructure for gpu reset - ttm support for huge pages - misc cleanups and bug fixes * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: (73 commits) drm/amd/powerplay: Place the constant on the right side of the test drm/amd/powerplay: Remove useless variable drm/amd/powerplay: Don't cast kzalloc() return value drm/amdgpu: allow GTT overcommit during bind drm/amdgpu: linear validate first then bind to GART drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table. drm/amd/pp: thermal control not enabled on vega10. drm/amdgpu: busywait KIQ register accessing (v4) drm/amdgpu: report more amdgpu_fence_info drm/amdgpu:don't check soft_reset for sriov drm/amdgpu:fix duplicated setting job's vram_lost drm/amdgpu:reduce wb to 512 slot drm/amdgpu: fix regresstion on SR-IOV gpu reset failed drm/amd/powerplay: Tidy up cz_dpm_powerup_vce() drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce() drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm() drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm() drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd() drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd() drm/amd/powerplay: Tidy up cz_start_dpm() ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 6982baeccd14..8b4ed8a98a18 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -40,9 +40,7 @@
40static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo) 40static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
41{ 41{
42 struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev); 42 struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev);
43 struct amdgpu_bo *bo; 43 struct amdgpu_bo *bo = ttm_to_amdgpu_bo(tbo);
44
45 bo = container_of(tbo, struct amdgpu_bo, tbo);
46 44
47 amdgpu_bo_kunmap(bo); 45 amdgpu_bo_kunmap(bo);
48 46
@@ -884,7 +882,7 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
884 if (!amdgpu_ttm_bo_is_amdgpu_bo(bo)) 882 if (!amdgpu_ttm_bo_is_amdgpu_bo(bo))
885 return; 883 return;
886 884
887 abo = container_of(bo, struct amdgpu_bo, tbo); 885 abo = ttm_to_amdgpu_bo(bo);
888 amdgpu_vm_bo_invalidate(adev, abo, evict); 886 amdgpu_vm_bo_invalidate(adev, abo, evict);
889 887
890 amdgpu_bo_kunmap(abo); 888 amdgpu_bo_kunmap(abo);
@@ -911,7 +909,7 @@ int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
911 if (!amdgpu_ttm_bo_is_amdgpu_bo(bo)) 909 if (!amdgpu_ttm_bo_is_amdgpu_bo(bo))
912 return 0; 910 return 0;
913 911
914 abo = container_of(bo, struct amdgpu_bo, tbo); 912 abo = ttm_to_amdgpu_bo(bo);
915 913
916 /* Remember that this BO was accessed by the CPU */ 914 /* Remember that this BO was accessed by the CPU */
917 abo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; 915 abo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;