Commit ecc874a6 authored by Pierre-Loup A. Griffais's avatar Pierre-Loup A. Griffais Committed by Alex Deucher
Browse files

drm/amd/display: Create plane rotation property



It's otherwise properly supported, just needs exposing to userspace.

Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarPierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fea7d919
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5866,6 +5866,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
	uint32_t formats[32];
	int num_formats;
	int res = -EPERM;
	unsigned int supported_rotations;

	num_formats = get_plane_formats(plane, plane_cap, formats,
					ARRAY_SIZE(formats));
@@ -5900,6 +5901,13 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
			DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE);
	}

	supported_rotations =
		DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
		DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270;

	drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
					   supported_rotations);

	drm_plane_helper_add(plane, &dm_plane_helper_funcs);

	/* Create (reset) the plane state */