diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-06-30 16:44:22 -0700 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-07-04 12:03:26 +0100 |
commit | 3cc60bab465f6d22b64a7034ce75e47dd2163e6e (patch) | |
tree | 1e640d637d9f1e40cab6fd8a34e138ef98a63bb7 /lib | |
parent | 67e29a30d5da57fb6764a23ba9f6aa31ea2c15a8 (diff) |
lib/kms: Drop igt_pipe->need_set_{crtc, cursor}
The "need" flags on igt_pipe simply mirror the fb_changed field of the
primary/cursor planes. Drop them and just use fb_changed instead.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_kms.c | 18 | ||||
-rw-r--r-- | lib/igt_kms.h | 2 |
2 files changed, 6 insertions, 14 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index c0f4f6c5..1e7b901c 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -837,11 +837,14 @@ static int igt_output_commit(igt_output_t *output) { igt_display_t *display = output->display; igt_pipe_t *pipe; + igt_plane_t *primary; + igt_plane_t *cursor; int i; pipe = igt_output_get_driving_pipe(output); - if (pipe->need_set_crtc) { - igt_plane_t *primary = &pipe->planes[0]; + primary = igt_pipe_get_plane(pipe, IGT_PLANE_PRIMARY); + cursor = igt_pipe_get_plane(pipe, IGT_PLANE_CURSOR); + if (primary->fb_changed) { drmModeModeInfo *mode; uint32_t fb_id, crtc_id; int ret; @@ -887,16 +890,13 @@ static int igt_output_commit(igt_output_t *output) igt_assert(ret == 0); - pipe->need_set_crtc = false; primary->fb_changed = false; } - if (pipe->need_set_cursor) { - igt_plane_t *cursor; + if (cursor->fb_changed) { uint32_t gem_handle, crtc_id; int ret; - cursor = igt_pipe_get_plane(pipe, IGT_PLANE_CURSOR); crtc_id = output->config.crtc->crtc_id; gem_handle = igt_plane_get_fb_gem_handle(cursor); @@ -924,7 +924,6 @@ static int igt_output_commit(igt_output_t *output) igt_assert(ret == 0); - pipe->need_set_cursor = false; cursor->fb_changed = false; } @@ -1009,11 +1008,6 @@ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) plane->fb = fb; - if (plane->is_primary) - pipe->need_set_crtc = true; - else if (plane->is_cursor) - pipe->need_set_cursor = true; - plane->fb_changed = true; } diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 7d015b4d..88b695ab 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -120,8 +120,6 @@ typedef struct { struct igt_pipe { igt_display_t *display; enum pipe pipe; - unsigned int need_set_crtc : 1; - unsigned int need_set_cursor : 1; unsigned int need_wait_for_vblank : 1; #define IGT_MAX_PLANES 4 int n_planes; |