drm/i915: Mark initial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev...
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 7 Oct 2020 12:03:27 +0000 (15:03 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Oct 2020 16:44:45 +0000 (19:44 +0300)
commit2c1e63bab43081f462fa2ea2f9a5eed232876c1e
tree22799ee6917de8358fbfb6669c6bb2bac7daf8e5
parent4d6bde58a026c5cac263081c572aebe89bf32167
drm/i915: Mark initial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev init

Currently we leave the cache_level of the initial fb obj
set to NONE. This means on eLLC machines the first pin_to_display()
will try to switch it to WT which requires a vma unbind+bind.
If that happens during the fbdev initialization rcu does not
seem operational which causes the unbind to get stuck. To
most appearances this looks like a dead machine on boot.

Avoid the unbind by already marking the object cache_level
as WT when creating it. We still do an excplicit ggtt pin
which will rewrite the PTEs anyway, so they will match whatever
cache level we set.

Cc: <stable@vger.kernel.org> # v5.7+
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2381
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_display.c