diff options
author | Christian König <christian.koenig@amd.com> | 2017-10-09 09:18:43 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-19 15:27:04 -0400 |
commit | e55f2b646df3318e24f12b8388ab6e5cccb3e92d (patch) | |
tree | de65b871c6ad10ddfc97a9b74b953d46b72e27f1 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | 14e47f93c5cc4a1237dbacc137e174706093b69c (diff) |
drm/amdgpu: move the VRAM lost counter per context
Instead of per device track the VRAM lost per context and return ECANCELED
instead of ENODEV.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index f759836d10ef..ff1a416a66c9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -790,21 +790,6 @@ void amdgpu_driver_lastclose_kms(struct drm_device *dev) | |||
790 | } | 790 | } |
791 | 791 | ||
792 | /** | 792 | /** |
793 | * amdgpu_kms_vram_lost - check if VRAM was lost for this client | ||
794 | * | ||
795 | * @adev: amdgpu device | ||
796 | * @fpriv: client private | ||
797 | * | ||
798 | * Check if all CS is blocked for the client because of lost VRAM | ||
799 | */ | ||
800 | bool amdgpu_kms_vram_lost(struct amdgpu_device *adev, | ||
801 | struct amdgpu_fpriv *fpriv) | ||
802 | { | ||
803 | return fpriv->vram_lost_counter != | ||
804 | atomic_read(&adev->vram_lost_counter); | ||
805 | } | ||
806 | |||
807 | /** | ||
808 | * amdgpu_driver_open_kms - drm callback for open | 793 | * amdgpu_driver_open_kms - drm callback for open |
809 | * | 794 | * |
810 | * @dev: drm dev pointer | 795 | * @dev: drm dev pointer |
@@ -860,7 +845,6 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) | |||
860 | 845 | ||
861 | amdgpu_ctx_mgr_init(&fpriv->ctx_mgr); | 846 | amdgpu_ctx_mgr_init(&fpriv->ctx_mgr); |
862 | 847 | ||
863 | fpriv->vram_lost_counter = atomic_read(&adev->vram_lost_counter); | ||
864 | file_priv->driver_priv = fpriv; | 848 | file_priv->driver_priv = fpriv; |
865 | 849 | ||
866 | out_suspend: | 850 | out_suspend: |