diff mbox

[RFCv2,04/10] drm/i915: Restrict plane loops to only operate on overlay planes

Message ID 1394237002-18041-5-git-send-email-matthew.d.roper@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matt Roper March 8, 2014, 12:03 a.m. UTC
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 <intel-gfx@lists.freedesktop.org>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 6 ++++++
 drivers/gpu/drm/i915/intel_pm.c      | 3 +++
 2 files changed, 9 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6f15627..53f7c9c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3421,6 +3421,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);
 }
@@ -3432,6 +3435,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 c8347ae..4a534c4 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2129,6 +2129,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;