summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
diff options
context:
space:
mode:
authorJames Zhu <James.Zhu@amd.com>2023-04-25 23:55:56 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 18:07:12 +0300
commit23105541727cd6b702c9ee66d98ba50a129fbd5e (patch)
treeaf36196b98271447f9fd33138fe3ec75bc6c640d /drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
parent20997c04b7168b1833da77f882eb5a6f246c4b96 (diff)
downloadlinux-23105541727cd6b702c9ee66d98ba50a129fbd5e.tar.xz
drm/amdgpu: save/restore part of xcp drm_device fields
Redirect xcp allocated drm_device::rdev/pdev/driver with amdgpu pci_device/drm_device setting. They need be saved before redirect and restored after unregister xcp drm_device. -v2: fix warning discarded-qualifiers Signed-off-by: James Zhu <James.Zhu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
index 9c5912b9d8bd..0f8026d64ea5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
@@ -77,6 +77,10 @@ struct amdgpu_xcp {
bool valid;
atomic_t ref_cnt;
struct drm_device *ddev;
+ struct drm_device *rdev;
+ struct drm_device *pdev;
+ struct drm_driver *driver;
+ struct drm_vma_offset_manager *vma_offset_manager;
struct amdgpu_sched gpu_sched[AMDGPU_HW_IP_NUM][AMDGPU_RING_PRIO_MAX];
};