diff options
author | Christian König <christian.koenig@amd.com> | 2021-03-08 19:35:14 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-03-24 04:25:15 +0100 |
commit | b503138e49ebe68d2874e3c14237e14ce37b1bf5 (patch) | |
tree | 787eb4bd274b716d3539bea43849609af7abb1be /drivers/gpu/drm/radeon/radeon_prime.c | |
parent | drm/amd/pm: correct the watermark settings for Polaris (diff) | |
download | linux-b503138e49ebe68d2874e3c14237e14ce37b1bf5.tar.xz linux-b503138e49ebe68d2874e3c14237e14ce37b1bf5.zip |
drm/radeon: also init GEM funcs in radeon_gem_prime_import_sg_table
Otherwise we will run into a NULL ptr deref.
Signed-off-by: Christian König <christian.koenig@amd.com>
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=212137
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_prime.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_prime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index ab29eb9e8667..42a87948e28c 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c @@ -56,6 +56,8 @@ struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, if (ret) return ERR_PTR(ret); + bo->tbo.base.funcs = &radeon_gem_object_funcs; + mutex_lock(&rdev->gem.mutex); list_add_tail(&bo->list, &rdev->gem.objects); mutex_unlock(&rdev->gem.mutex); |