Skip to content

Commit

Permalink
drm/amdkcl: test whether drm checking on dev->dev_private
Browse files Browse the repository at this point in the history
introduced by v5.5-rc2-1531-ge62bf83aa1bb
This patch is caused by 'drm/amdgpu: Embed drm_device into amdgpu_device (v2)'

Signed-off-by: Yang Xiong <Yang.Xiong@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Change-Id: If527052c8053141eadd77cbf77e4fc16850808b5
  • Loading branch information
Yang Xiong authored and Yang Xiong committed Sep 3, 2020
1 parent d430036 commit f9896ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
if (adev == NULL) {
return -ENOMEM;
}
#endif
#ifdef AMDKCL_CHECK_DRM_DEVICE_DEV_PRIVATE
dev->dev_private = (void *)adev;
#endif

Expand Down
8 changes: 8 additions & 0 deletions include/kcl/backport/kcl_drm_backport.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ int _kcl_drm_syncobj_find_fence(struct drm_file *file_private,
#define AMDKCL_AMDGPU_DEBUGFS_CLEANUP
#endif

/*
* commit v5.5-rc2-1531-ge62bf83aa1bb
* drm/irq: remove check on dev->dev_private
*/
#if DRM_VERSION_CODE < DRM_VERSION(5, 6, 0)
#define AMDKCL_CHECK_DRM_DEVICE_DEV_PRIVATE
#endif

#ifndef HAVE_DRM_GEM_OBJECT_LOOKUP_2ARGS
static inline struct drm_gem_object *
_kcl_drm_gem_object_lookup(struct drm_file *filp, u32 handle)
Expand Down

0 comments on commit f9896ea

Please sign in to comment.