kms_rotation_crc: Changing as per DRM rotation
PATCH 1/1 kms_rotation_crc: Changing as per DRM rotation
DRM rotation is counter clockwise. So changing the test accordingly.
Signed-off-by Sonika Jindal <[email protected]>
--- tests/kms_rotation_crc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
tests/kms_rotation_crc.c +6 -4
@@ -81,19 +81,20 @@ paint_squares(data_t *data, struct igt_fb *fb, drmModeModeInfo *mode,* "rotation" is used for creating ref rotated fb and * "data->rotation" is used to determine the required size * while creating unrotated fb. +* Also, drm rotation is counter clockwise. */ -if (rotation ==IGT_ROTATION_90 ) { +if (rotation ==IGT_ROTATION_270 ) {/* Paint 4 squares with width == height in Blue, Red, -Green, White Clockwise order to look like 90 degree rotated*/ +Green, White Clockwise order to look like 270 degree rotated*/ w = h = mode->vdisplay;igt_paint_color (cr,0 ,0 , w /2 , h /2 ,0.0 ,0.0 ,1.0 );igt_paint_color (cr, w /2 ,0 , w /2 , h /2 ,1.0 ,0.0 ,0.0 );igt_paint_color (cr,0 , h /2 , w /2 , h /2 ,1.0 ,1.0 ,1.0 );igt_paint_color (cr, w /2 , h /2 , w /2 , h /2 ,0.0 ,1.0 ,0.0 ); - }else if (rotation ==IGT_ROTATION_270 ) { + }else if (rotation ==IGT_ROTATION_90 ) {/* Paint 4 squares with width == height in Green, White, -Blue, Red Clockwise order to look like 270 degree rotated*/ +Blue, Red Clockwise order to look like 90 degree rotated*/ w = h = mode->vdisplay;igt_paint_color (cr,0 ,0 , w /2 , h /2 ,0.0 ,1.0 ,0.0 );igt_paint_color (cr, w /2 ,0 , w /2 , h /2 ,1.0 ,1.0 ,1.0 );
@@ -389,6 +390,7 @@ igt_maintest_plane_rotation (&data,IGT_PLANE_CURSOR ); } +/* Rotation is counter clockwise */ igt_subtest_f("primary-rotation-90") {igt_require (gen >=9 ); data.rotation =IGT_ROTATION_90 ;
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx