From patchwork Mon Jun 30 23:44:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 4455331 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 14D74BEEAA for ; Mon, 30 Jun 2014 23:44:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50178202F0 for ; Mon, 30 Jun 2014 23:44:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 71CB0201FA for ; Mon, 30 Jun 2014 23:44:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15A666E270; Mon, 30 Jun 2014 16:44:04 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 44D556E270 for ; Mon, 30 Jun 2014 16:44:02 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 30 Jun 2014 16:44:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,578,1400050800"; d="scan'208";a="451821248" Received: from mdroper-hswdev.fm.intel.com (HELO mdroper-hswdev) ([10.1.134.215]) by azsmga001.ch.intel.com with ESMTP; 30 Jun 2014 16:44:01 -0700 Received: from mattrope by mdroper-hswdev with local (Exim 4.82) (envelope-from ) id 1X1lFf-0002fR-2f; Mon, 30 Jun 2014 16:44:47 -0700 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Mon, 30 Jun 2014 16:44:22 -0700 Message-Id: <1404171870-10206-2-git-send-email-matthew.d.roper@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1404171870-10206-1-git-send-email-matthew.d.roper@intel.com> References: <1404171870-10206-1-git-send-email-matthew.d.roper@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/9] lib/kms: Drop igt_pipe->need_set_{crtc, cursor} X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- lib/igt_kms.c | 18 ++++++------------ 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 c0f4f6c..1e7b901 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 7d015b4..88b695a 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;