]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
Merge tag 'backlight-next-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.c
index ec9e45004bff3391d902ca13f1b2a732803d13e7..93b2c5a48a7123e217e6752e83891755262b8ee7 100644 (file)
@@ -88,12 +88,14 @@ static void amdgpu_bo_destroy(struct ttm_buffer_object *tbo)
        if (bo->gem_base.import_attach)
                drm_prime_gem_destroy(&bo->gem_base, bo->tbo.sg);
        drm_gem_object_release(&bo->gem_base);
-       amdgpu_bo_unref(&bo->parent);
+       /* in case amdgpu_device_recover_vram got NULL of bo->parent */
        if (!list_empty(&bo->shadow_list)) {
                mutex_lock(&adev->shadow_list_lock);
                list_del_init(&bo->shadow_list);
                mutex_unlock(&adev->shadow_list_lock);
        }
+       amdgpu_bo_unref(&bo->parent);
+
        kfree(bo->metadata);
        kfree(bo);
 }
This page took 0.037527 seconds and 4 git commands to generate.