[Intel-gfx] [PATCH i-g-t 2/3] lib/igt_kms: Set new rotation property before displaying

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Oct 16 03:59:48 PDT 2015


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

This is not really tested that much apart that it doesn't break
kms_rotation_crc and it makes one new test case work.

It only serves as proof of concept to demonstrate a particular bug.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Vivek Kasireddy <vivek.kasireddy at intel.com>
Cc: Damien Lespiau <damien.lespiau at intel.com>
---
 lib/igt_kms.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 51d735d29970..5c9b358ae23f 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1316,6 +1316,14 @@ static int igt_drm_plane_commit(igt_plane_t *plane,
 	igt_assert(igt_plane_supports_rotation(plane) ||
 		   !plane->rotation_changed);
 
+	if (plane->rotation_changed) {
+		ret = igt_plane_set_property(plane, plane->rotation_property,
+				       plane->rotation);
+
+		plane->rotation_changed = false;
+		CHECK_RETURN(ret, fail_on_error);
+	}
+
 	fb_id = igt_plane_get_fb_id(plane);
 	crtc_id = output->config.crtc->crtc_id;
 
@@ -1377,14 +1385,6 @@ static int igt_drm_plane_commit(igt_plane_t *plane,
 	plane->position_changed = false;
 	plane->size_changed = false;
 
-	if (plane->rotation_changed) {
-		ret = igt_plane_set_property(plane, plane->rotation_property,
-				       plane->rotation);
-
-		plane->rotation_changed = false;
-		CHECK_RETURN(ret, fail_on_error);
-	}
-
 	return 0;
 }
 
-- 
1.9.1



More information about the Intel-gfx mailing list