|
@@ -1272,16 +1272,12 @@ int amdgpu_cs_wait_ioctl(struct drm_device *dev, void *data,
|
|
|
{
|
|
|
union drm_amdgpu_wait_cs *wait = data;
|
|
|
struct amdgpu_device *adev = dev->dev_private;
|
|
|
- struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
|
|
unsigned long timeout = amdgpu_gem_timeout(wait->in.timeout);
|
|
|
struct amdgpu_ring *ring = NULL;
|
|
|
struct amdgpu_ctx *ctx;
|
|
|
struct dma_fence *fence;
|
|
|
long r;
|
|
|
|
|
|
- if (amdgpu_kms_vram_lost(adev, fpriv))
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
ctx = amdgpu_ctx_get(filp->driver_priv, wait->in.ctx_id);
|
|
|
if (ctx == NULL)
|
|
|
return -EINVAL;
|
|
@@ -1350,16 +1346,12 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
|
|
|
struct drm_file *filp)
|
|
|
{
|
|
|
struct amdgpu_device *adev = dev->dev_private;
|
|
|
- struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
|
|
union drm_amdgpu_fence_to_handle *info = data;
|
|
|
struct dma_fence *fence;
|
|
|
struct drm_syncobj *syncobj;
|
|
|
struct sync_file *sync_file;
|
|
|
int fd, r;
|
|
|
|
|
|
- if (amdgpu_kms_vram_lost(adev, fpriv))
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
fence = amdgpu_cs_get_fence(adev, filp, &info->in.fence);
|
|
|
if (IS_ERR(fence))
|
|
|
return PTR_ERR(fence);
|
|
@@ -1521,15 +1513,12 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data,
|
|
|
struct drm_file *filp)
|
|
|
{
|
|
|
struct amdgpu_device *adev = dev->dev_private;
|
|
|
- struct amdgpu_fpriv *fpriv = filp->driver_priv;
|
|
|
union drm_amdgpu_wait_fences *wait = data;
|
|
|
uint32_t fence_count = wait->in.fence_count;
|
|
|
struct drm_amdgpu_fence *fences_user;
|
|
|
struct drm_amdgpu_fence *fences;
|
|
|
int r;
|
|
|
|
|
|
- if (amdgpu_kms_vram_lost(adev, fpriv))
|
|
|
- return -ENODEV;
|
|
|
/* Get the fences from userspace */
|
|
|
fences = kmalloc_array(fence_count, sizeof(struct drm_amdgpu_fence),
|
|
|
GFP_KERNEL);
|