[RFCv3 05/14] drm/i915: Restrict plane loops to only operate on overlay planes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx>
---
 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;
 
-- 
1.8.5.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux