summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
diff options
context:
space:
mode:
authorYi Sun <yi.sun@intel.com>2014-05-23 08:28:47 +0800
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-07 18:27:10 +0100
commitb5333b416f6a206a583684b0fba9265c0badbd6c (patch)
treeb1e816094759740c4de63e8452976128d0b88bac /lib/igt_kms.h
parentde538cfc7cd649216801829daffe602f4efee08a (diff)
kms_plane: Add panning test for primary plane
Get CRCs of a full red and a full blue surface as reference. Create a big framebuffer that is twice width and twice height as the current display mode. Fill the top left quarter with red, bottom right quarter with blue Check the scanned out image with the CRTC at position (0, 0) of the framebuffer and it should be the same CRC as the full red fb Check the scanned out image with the CRTC at position (hdisplay, vdisplay) and it should be the same CRC as the full blue fb v2: Fix a few things here and there (Damien) Cc: Lei Liu <lei.a.liu@intel.com> Cc: Yi Sun <yi.sun@intel.com> Signed-off-by: Lei Liu <lei.a.liu@intel.com> Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r--lib/igt_kms.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 95ba1129..a079fc24 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -113,6 +113,7 @@ typedef struct {
unsigned int is_cursor : 1;
unsigned int fb_changed : 1;
unsigned int position_changed : 1;
+ unsigned int panning_changed : 1;
/*
* drm_plane can be NULL for primary and cursor planes (when not
* using the atomic modeset API)
@@ -121,6 +122,8 @@ typedef struct {
struct igt_fb *fb;
/* position within pipe_src_w x pipe_src_h */
int crtc_x, crtc_y;
+ /* panning offset within the fb */
+ unsigned int pan_x, pan_y;
} igt_plane_t;
struct igt_pipe {
@@ -170,6 +173,7 @@ igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane 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_wait_for_vblank(int drm_fd, enum pipe pipe);