drm/amd/display: Unhardcode cursor size reported back to UMD.
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Wed, 22 Feb 2017 19:24:11 +0000 (14:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:20:33 +0000 (17:20 -0400)
This will return back MAX cursor size for given ASIC.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 97d949a..c559c71 100644 (file)
@@ -311,8 +311,8 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
        /* TODO: Add_display_info? */
 
        /* TODO use dynamic cursor width */
-       adev->ddev->mode_config.cursor_width = 128;
-       adev->ddev->mode_config.cursor_height = 128;
+       adev->ddev->mode_config.cursor_width = adev->dm.dc->caps.max_cursor_size;
+       adev->ddev->mode_config.cursor_height = adev->dm.dc->caps.max_cursor_size;
 
        if (drm_vblank_init(adev->ddev, adev->dm.display_indexes_num)) {
                DRM_ERROR(