drm/i915/display: Do not reset display when there is none

Display is always disabled and enabled when resetting any engine, but if
there is no display it should not do anything with display and only
reset the needed engines.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-3-lucas.demarchi@intel.com
This commit is contained in:
José Roberto de Souza 2020-11-06 14:55:26 -08:00 committed by Lucas De Marchi
parent e669ad6f1c
commit 2c5688057f

View File

@ -4858,6 +4858,9 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)
struct drm_atomic_state *state;
int ret;
if (!HAS_DISPLAY(dev_priv))
return;
/* reset doesn't touch the display */
if (!dev_priv->params.force_reset_modeset_test &&
!gpu_reset_clobbers_display(dev_priv))
@ -4918,6 +4921,9 @@ void intel_display_finish_reset(struct drm_i915_private *dev_priv)
struct drm_atomic_state *state;
int ret;
if (!HAS_DISPLAY(dev_priv))
return;
/* reset doesn't touch the display */
if (!test_bit(I915_RESET_MODESET, &dev_priv->gt.reset.flags))
return;