When plane restriction feature enabled in sevice os, there could be the
case that there're some CRTC's without a primary plane. If we don't
assign any plane of pipe A to sos, like i915.avail_planes_per_pipe
=0x000F00, it will cause kernel panic when booting because it assumes
primary plane existing in intel_find_initial_plane_obj().
Added a check to the primary plane in CRTC to avoid such kind of issue.
Signed-off-by: Min He <min.he@...>
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 01b432438bac..6aecd4c150d1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15058,7 +15058,7 @@ int intel_modeset_init(struct drm_device *dev)
for_each_intel_crtc(dev, crtc) {
struct intel_initial_plane_config plane_config = {};
- if (!crtc->active)
+ if (!crtc->active || !crtc->base.primary)
continue;
/*
--
2.17.0