drm/i915: don't crash if unable to setup stolen
Subsystems (2)
PATCH 1/1 drm/i915: don't crash if unable to setup stolen
On this baytrail NUC I would see:
*ERROR* conflict detected with stolen region: [0xbb000000 - 0xbf000000]
Since stolen region is not setup, dev_priv->mm.stolen would not be initialized, which results that vlv_pctx is not allocated in valleyview_setup_pctx() which results in things going BOOM in valleyview_check_pctx().
Things seem to work out much better if we check for NULL ptr first.
Signed-off-by Rob Clark <[email protected]>
--- drivers/gpu/drm/i915/intel_pm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +3 -0
@@ -4185,6 +4185,9 @@ static void valleyview_check_pctx(struct drm_i915_private *dev_priv) {unsigned long pctx_addr =I915_READ (VLV_PCBR ) & ~4095 ; +if (!dev_priv->vlv_pctx) +return ; +WARN_ON (pctx_addr != dev_priv->mm.stolen_base + dev_priv->vlv_pctx->stolen->start); }
Signature · 1 line
1.9.3