Skip to content
Permalink
Browse files
drm/amdgpu: create amdgpu_vkms
Modify the VKMS driver into an api that dce_virtual can use to create
virtual displays that obey drm's atomic modesetting api.

Signed-off-by: Ryan Taylor <Ryan.Taylor@amd.com>
  • Loading branch information
Ryan Taylor authored and intel-lab-lkp committed Jul 12, 2021
1 parent db50386 commit 96f64e3b91a195cc37720de206b86c3f0378abbb
Show file tree
Hide file tree
Showing 7 changed files with 457 additions and 11 deletions.
@@ -119,6 +119,7 @@ amdgpu-y += \
amdgpu-y += \
dce_v10_0.o \
dce_v11_0.o \
amdgpu_vkms.o \
dce_virtual.o

# add GFX block
@@ -909,6 +909,7 @@ struct amdgpu_device {

/* display */
bool enable_virtual_display;
struct amdgpu_vkms_output *amdgpu_vkms_output;
struct amdgpu_mode_info mode_info;
/* For pre-DCE11. DCE11 and later are in "struct amdgpu_device->dm" */
struct work_struct hotplug_work;
@@ -1223,7 +1223,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
int ret, retry = 0;
bool supports_atomic = false;

if (!amdgpu_virtual_display &&
if (amdgpu_virtual_display ||
amdgpu_device_asic_has_dc_support(flags & AMD_ASIC_MASK))
supports_atomic = true;

@@ -344,7 +344,7 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
}

/* disable all the possible outputs/crtcs before entering KMS mode */
if (!amdgpu_device_has_dc_support(adev))
if (!amdgpu_device_has_dc_support(adev) && !amdgpu_virtual_display)
drm_helper_disable_unused_functions(adev_to_drm(adev));

drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);

0 comments on commit 96f64e3

Please sign in to comment.