Skip to content

Commit 84ec374

Browse files
Ryan Tayloralexdeucher
authored andcommitted
drm/amdgpu: create amdgpu_vkms (v4)
Modify the VKMS driver into an api that dce_virtual can use to create virtual displays that obey drm's atomic modesetting api. v2: Made local functions static. v3: Switched vkms_output kzalloc for kcalloc. Cleanup patches by moving display mode fixes to this patch. v4: Update atomic_check and atomic_update to comply with new kms api. Signed-off-by: Ryan Taylor <[email protected]> Reported-by: kernel test robot <[email protected]> Suggested-by: Alex Deucher <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent d7b5dae commit 84ec374

File tree

7 files changed

+493
-11
lines changed

7 files changed

+493
-11
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ amdgpu-y += \
120120
amdgpu-y += \
121121
dce_v10_0.o \
122122
dce_v11_0.o \
123+
amdgpu_vkms.o \
123124
dce_virtual.o
124125

125126
# add GFX block

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ struct amdgpu_device {
916916

917917
/* display */
918918
bool enable_virtual_display;
919+
struct amdgpu_vkms_output *amdgpu_vkms_output;
919920
struct amdgpu_mode_info mode_info;
920921
/* For pre-DCE11. DCE11 and later are in "struct amdgpu_device->dm" */
921922
struct work_struct hotplug_work;

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
12311231
int ret, retry = 0;
12321232
bool supports_atomic = false;
12331233

1234-
if (!amdgpu_virtual_display &&
1234+
if (amdgpu_virtual_display ||
12351235
amdgpu_device_asic_has_dc_support(flags & AMD_ASIC_MASK))
12361236
supports_atomic = true;
12371237

drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
344344
}
345345

346346
/* disable all the possible outputs/crtcs before entering KMS mode */
347-
if (!amdgpu_device_has_dc_support(adev))
347+
if (!amdgpu_device_has_dc_support(adev) && !amdgpu_virtual_display)
348348
drm_helper_disable_unused_functions(adev_to_drm(adev));
349349

350350
drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);

0 commit comments

Comments
 (0)