Unbind AMD GPU without restarting the display manager

Solution 1:

Technically it is possible. However, AMD didn't implement it for Linux.

static void
amdgpu_pci_remove(struct pci_dev *pdev)
{
    struct drm_device *dev = pci_get_drvdata(pdev);

#ifdef MODULE
    if (THIS_MODULE->state != MODULE_STATE_GOING)
#endif
        DRM_ERROR("Hotplug removal is not supported\n");
    drm_dev_unplug(dev);
    amdgpu_driver_unload_kms(dev);
    pci_disable_device(pdev);
    pci_set_drvdata(pdev, NULL);
    drm_dev_put(dev);
}

Source: https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c?h=drm-next-5.7