]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Use standard form -EDEADLK check
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 30 Sep 2021 10:41:31 +0000 (13:41 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 1 Oct 2021 13:04:34 +0000 (16:04 +0300)
Unify how we check for -EDEADLK vs. other errors from
crtc vs. encoder compute_config() calls.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930104133.30854-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index 5f8f233f0e3cc1e87ea4e55779b049a0d3c27908..59bb346aa36ec0a1ae87e7db01bed46f68ede410 100644 (file)
@@ -7537,11 +7537,10 @@ encoder_retry:
 
                ret = encoder->compute_config(encoder, pipe_config,
                                              connector_state);
+               if (ret == -EDEADLK)
+                       return ret;
                if (ret < 0) {
-                       if (ret != -EDEADLK)
-                               drm_dbg_kms(&i915->drm,
-                                           "Encoder config failure: %d\n",
-                                           ret);
+                       drm_dbg_kms(&i915->drm, "Encoder config failure: %d\n", ret);
                        return ret;
                }
        }