From patchwork Wed Sep 12 15:47:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 1445051 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 457BD3FE79 for ; Wed, 12 Sep 2012 15:48:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 430359EBE1 for ; Wed, 12 Sep 2012 08:48:18 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id F2FBB9E7E9 for ; Wed, 12 Sep 2012 08:47:20 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 12 Sep 2012 08:47:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,410,1344236400"; d="scan'208";a="192099156" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by orsmga001.jf.intel.com with SMTP; 12 Sep 2012 08:47:18 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 12 Sep 2012 18:47:17 +0300 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Subject: [RFC][PATCH 1/4] drm/i915: Try to commit single pipe in one go Date: Wed, 12 Sep 2012 18:47:04 +0300 Message-Id: <1347464827-14187-2-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1347464827-14187-1-git-send-email-ville.syrjala@linux.intel.com> References: <1347464827-14187-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Ville Syrjälä --- drivers/gpu/drm/i915/intel_atomic.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index e439c04..e9eaa8a 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -907,6 +907,7 @@ static int apply_config(struct drm_device *dev, for (i = 0; i < dev->mode_config.num_crtc; i++) { struct intel_crtc_state *st = &s->crtc[i]; struct intel_crtc *intel_crtc = to_intel_crtc(st->crtc); + int j; if (st->mode_dirty) { ret = crtc_mode_set(st->crtc); @@ -925,21 +926,21 @@ static int apply_config(struct drm_device *dev, intel_crtc->cursor_height, intel_crtc->cursor_bo, intel_crtc->cursor_addr); - } - for (i = 0; i < dev->mode_config.num_plane; i++) { - struct intel_plane_state *st = &s->plane[i]; - struct drm_plane *plane = st->plane; + for (j = 0; j < dev->mode_config.num_plane; j++) { + struct intel_plane_state *pst = &s->plane[j]; + struct drm_plane *plane = pst->plane; - if (!s->plane[i].dirty) - continue; + if (!pst->dirty) + continue; - if (!plane->crtc) - continue; + if (plane->crtc != st->crtc) + continue; - ret = intel_commit_plane(plane, plane->crtc, plane->fb, &st->coords, false); - if (ret) - return ret; + ret = intel_commit_plane(plane, plane->crtc, plane->fb, &pst->coords, false); + if (ret) + return ret; + } } for (i = 0; i < dev->mode_config.num_crtc; i++) {