clear-pkgs-linux-iot-lts2018/0524-drm-i915-fix-a-kernel-...

39 lines
1.4 KiB
Diff
Raw Normal View History

From ceac5daf35a36a6232be1c1c4564b9c78c795ea8 Mon Sep 17 00:00:00 2001
From: Min He <min.he@intel.com>
Date: Tue, 14 Aug 2018 02:24:22 +0000
Subject: [PATCH 524/550] drm/i915: fix a kernel panic issue of plane
restriction
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@intel.com>
Reviewed-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1155
---
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 8a9450e37008..34770b9d9764 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15532,7 +15532,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.19.1