Release xcp drm memory after unplug xcp device
Subsystems (2)
v5 cover Release xcp drm memory after unplug xcp device
Fix xcp drm memory release after executing PCIe remove. Fix xcp drm memory alloc after executing PCIe insert.
Changes from V4->V5:
- amdgpu:
- - Delete "if" check in the loop.
Changes from V3->V4:
- amdgpu:
- - Remove redundant initialization for "i".
- - Simplify checks.
Changes from V2->V3:
- amdgpu:
- - Add Gerry as a Signed-off.
- - Unified commit author.
Changes from V1->V2:
- cover-letter:
- - Revise title version number.
- amdgpu:
- - Remove // comments.
- - Add Gerry as a co-developr.
Meng Li (1):
drm/amd/amdgpu: Release xcp drm memory after unplug
drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 1 + drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c | 56 +++++++++++++++++---- drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.h | 1 + 3 files changed, 49 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0
PATCH v5 1/1 drm/amd/amdgpu: Release xcp drm memory after unplug
Add a new API amdgpu_xcp_drm_dev_free().
After unplug xcp device, need to release xcp drm memory etc.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 1 + drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c | 56 +++++++++++++++++---- drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.h | 1 + 3 files changed, 49 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c +1 -0
@@ -394,6 +394,7 @@ void amdgpu_xcp_dev_unplug(struct amdgpu_device *adev) p_ddev->primary->dev = adev->xcp_mgr->xcp[i].pdev; p_ddev->driver = adev->xcp_mgr->xcp[i].driver; p_ddev->vma_offset_manager = adev->xcp_mgr->xcp[i].vma_offset_manager; +amdgpu_xcp_drm_dev_free (p_ddev); } }
drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c +47 -9
89 lines not on this page · raw message
drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.h +1 -0
@@ -25,5 +25,6 @@#define _AMDGPU_XCP_DRV_H_int amdgpu_xcp_drm_dev_alloc (struct drm_device **ddev); +void amdgpu_xcp_drm_dev_free (struct drm_device *ddev);void amdgpu_xcp_drv_release (void );#endif /* _AMDGPU_XCP_DRV_H_ */
Signature · 1 line
2.43.0