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

38 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 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] 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 7d7211e54e6f..8211282a19aa 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15557,7 +15557,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;
/*
--
https://clearlinux.org