diff options
author | Maxime Ripard <maxime@cerno.tech> | 2020-09-14 18:11:40 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2020-09-14 18:11:40 +0200 |
commit | 00af6729b52ede86a08173c8d5f2c8cd9fa3390d (patch) | |
tree | 6a8cec3575d5cd49fffadb372b85da5475a266b0 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | drm: fix double free for gbo in drm_gem_vram_init and drm_gem_vram_create (diff) | |
parent | Merge v5.9-rc5 into drm-next (diff) | |
download | linux-00af6729b52ede86a08173c8d5f2c8cd9fa3390d.tar.xz linux-00af6729b52ede86a08173c8d5f2c8cd9fa3390d.zip |
Merge drm/drm-next into drm-misc-next
Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic
properly.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index eaff4c4506eb..ac043baac05d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -380,6 +380,9 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev, if (r) return r; + if ((*bo_ptr) == NULL) + return 0; + /* * Remove the original mem node and create a new one at the request * position. @@ -558,7 +561,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo = kzalloc(sizeof(struct amdgpu_bo), GFP_KERNEL); if (bo == NULL) return -ENOMEM; - drm_gem_private_object_init(adev->ddev, &bo->tbo.base, size); + drm_gem_private_object_init(adev_to_drm(adev), &bo->tbo.base, size); INIT_LIST_HEAD(&bo->shadow_list); bo->vm_bo = NULL; bo->preferred_domains = bp->preferred_domain ? bp->preferred_domain : @@ -1305,7 +1308,7 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, } /** - * amdgpu_bo_move_notify - notification about a BO being released + * amdgpu_bo_release_notify - notification about a BO being released * @bo: pointer to a buffer object * * Wipes VRAM buffers whose contents should not be leaked before the |