]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/display: Do not reset display when there is none
authorJosé Roberto de Souza <jose.souza@intel.com>
Fri, 6 Nov 2020 22:55:26 +0000 (14:55 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 11 Nov 2020 19:50:45 +0000 (11:50 -0800)
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
drivers/gpu/drm/i915/display/intel_display.c

index 3e0b2849ec2a6a9e8cdca88faf64e8c6c63583b3..3bf3088b0091a82878eb978051aab0a1a86b6459 100644 (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;