From patchwork Wed Mar 19 00:22:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 3849911 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 68F189F369 for ; Wed, 19 Mar 2014 00:22:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D63132037D for ; Wed, 19 Mar 2014 00:22:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C28602038E for ; Wed, 19 Mar 2014 00:22:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 554854A1A7; Tue, 18 Mar 2014 17:21:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 65AF74A0DD; Tue, 18 Mar 2014 17:21:56 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 18 Mar 2014 17:17:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,681,1389772800"; d="scan'208";a="494726574" Received: from mdroper-hswdev.fm.intel.com (HELO mdroper-hswdev) ([10.1.134.215]) by fmsmga001.fm.intel.com with ESMTP; 18 Mar 2014 17:21:55 -0700 Received: from mattrope by mdroper-hswdev with local (Exim 4.82) (envelope-from ) id 1WQ4I4-0004VJ-R8; Tue, 18 Mar 2014 17:23:28 -0700 From: Matt Roper To: dri-devel@lists.freedesktop.org Date: Tue, 18 Mar 2014 17:22:50 -0700 Message-Id: <1395188579-17191-6-git-send-email-matthew.d.roper@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1395188579-17191-1-git-send-email-matthew.d.roper@intel.com> References: <1395188579-17191-1-git-send-email-matthew.d.roper@intel.com> Cc: Intel Graphics Development Subject: [Intel-gfx] [RFCv3 05/14] drm/i915: Restrict plane loops to only operate on overlay planes 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 Before we add additional types of planes to the DRM plane list, ensure that existing loops over all planes continue to operate only on "overlay" planes and ignore primary & cursor planes. Cc: Intel Graphics Development Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 6 ++++++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c6743f0..048052a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3535,6 +3535,9 @@ static void intel_enable_planes(struct drm_crtc *crtc) struct intel_plane *intel_plane; list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head) + if (intel_plane->base.type != DRM_PLANE_TYPE_OVERLAY) + continue; + if (intel_plane->pipe == pipe) intel_plane_restore(&intel_plane->base); } @@ -3546,6 +3549,9 @@ static void intel_disable_planes(struct drm_crtc *crtc) struct intel_plane *intel_plane; list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head) + if (intel_plane->base.type != DRM_PLANE_TYPE_OVERLAY) + continue; + if (intel_plane->pipe == pipe) intel_plane_disable(&intel_plane->base); } diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 1d0f346..3a1b569 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2132,6 +2132,9 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, list_for_each_entry(plane, &dev->mode_config.plane_list, head) { struct intel_plane *intel_plane = to_intel_plane(plane); + if (plane->type != DRM_PLANE_TYPE_OVERLAY) + continue; + if (intel_plane->pipe == pipe) p->spr = intel_plane->wm;