summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-07-08 16:02:05 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-11 15:12:21 +0100
commit068efd8d9fc5ae02e928622a989d91b3e9c851d0 (patch)
tree4d1492c96731774736ce5a5fc8850c0e575d4545 /lib/igt_kms.h
parentb2eb48576f2422591fe338e21a46757b2e331985 (diff)
igt_kms: Add support for setting plane rotation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r--lib/igt_kms.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index ef87ee1e..53856879 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -71,6 +71,14 @@ enum igt_commit_style {
/* We'll add atomic here eventually. */
};
+typedef enum {
+ /* this maps to the kernel API */
+ IGT_ROTATION_0 = 1 << 0,
+ IGT_ROTATION_90 = 1 << 1,
+ IGT_ROTATION_180 = 1 << 2,
+ IGT_ROTATION_270 = 1 << 3,
+} igt_rotation_t;
+
#include "igt_fb.h"
struct kmstest_connector_config {
@@ -155,6 +163,7 @@ typedef struct {
unsigned int fb_changed : 1;
unsigned int position_changed : 1;
unsigned int panning_changed : 1;
+ unsigned int rotation_changed : 1;
/*
* drm_plane can be NULL for primary and cursor planes (when not
* using the atomic modeset API)
@@ -168,6 +177,7 @@ typedef struct {
int crtc_x, crtc_y;
/* panning offset within the fb */
unsigned int pan_x, pan_y;
+ igt_rotation_t rotation;
} igt_plane_t;
struct igt_pipe {
@@ -223,6 +233,7 @@ static inline bool igt_plane_supports_rotation(igt_plane_t *plane)
void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb);
void igt_plane_set_position(igt_plane_t *plane, int x, int y);
void igt_plane_set_panning(igt_plane_t *plane, int x, int y);
+void igt_plane_set_rotation(igt_plane_t *plane, igt_rotation_t rotation);
void igt_wait_for_vblank(int drm_fd, enum pipe pipe);