drm/amdgpu: Enable DRIVER_ATOMIC flag for DAL.
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Tue, 30 May 2017 20:49:59 +0000 (16:49 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:07:30 +0000 (18:07 -0400)
This flag is needed to pass several of IGT test cases.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c

index 27d46a9..a350fc9 100644 (file)
@@ -2071,6 +2071,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
        adev->audio_endpt_rreg = &amdgpu_block_invalid_rreg;
        adev->audio_endpt_wreg = &amdgpu_block_invalid_wreg;
 
+       if (amdgpu_device_has_dc_support(adev))
+               adev->ddev->driver->driver_features |= DRIVER_ATOMIC;
+
 
        DRM_INFO("initializing kernel modesetting (%s 0x%04X:0x%04X 0x%04X:0x%04X 0x%02X).\n",
                 amdgpu_asic_name[adev->asic_type], pdev->vendor, pdev->device,
index 2484dac..90fa8e8 100644 (file)
@@ -348,7 +348,8 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
        drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
 
        /* disable all the possible outputs/crtcs before entering KMS mode */
-       drm_helper_disable_unused_functions(adev->ddev);
+       if (!amdgpu_device_has_dc_support(adev))
+               drm_helper_disable_unused_functions(adev->ddev);
 
        drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
        return 0;