[Intel-gfx] [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Nov 21 14:15:10 UTC 2017


>From gen10 onwards 16bpp 90/270 plane rotation is supported on hardware.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Testcase: https://patchwork.freedesktop.org/series/33132/
---
 drivers/gpu/drm/i915/intel_atomic_plane.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 8be50309..bed5d11 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -123,14 +123,17 @@ static bool intel_plane_valid_rotation(const struct drm_plane_state *plane_state
 		}
 
 		/*
-		 * 90/270 is not allowed with RGB64 16:16:16:16,
-		 * RGB 16-bit 5:6:5, and Indexed 8-bit.
+		 * 90/270 is not allowed with RGB64 16:16:16:16 and
+		 * Indexed 8-bit. RGB 16-bit. 5:6:5 is allowed gen10 onwards.
 		 * TBD: Add RGB64 case once its added in supported format
 		 * list.
 		 */
 		switch (plane_state->fb->format->format) {
-		case DRM_FORMAT_C8:
 		case DRM_FORMAT_RGB565:
+			if (INTEL_GEN(dev_priv) >= 10)
+				break;
+			/* fall through */
+		case DRM_FORMAT_C8:
 			DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
 				      drm_get_format_name(plane_state->fb->format->format,
 							  &format_name));
-- 
2.7.4



More information about the Intel-gfx mailing list