From patchwork Sat Oct 2 15:45:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 12532231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E35D0C433EF for ; Sat, 2 Oct 2021 15:46:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B719D61B1E for ; Sat, 2 Oct 2021 15:46:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B719D61B1E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C18536F4B3; Sat, 2 Oct 2021 15:46:05 +0000 (UTC) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 760E76F4B3 for ; Sat, 2 Oct 2021 15:46:04 +0000 (UTC) Received: by mail-qt1-x82b.google.com with SMTP id j13so11952213qtq.6 for ; Sat, 02 Oct 2021 08:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YGu7HS3q7vp4215UEX9eUXFM4TcIudbW7tcMBeFTMTk=; b=OiuRE/Ldo7Sd00BHfv4yswSuYIra/5ssuWXmZ08qWBEe5v4/rvaMh2/dnRsQzPbtu3 UaKegs/sVIlqdIC52+ckyvYEVHr2vWysIEqW/VmXDr11uqc0p/Kz+OPI1Y0SAaKxSu+s AoQaZfzxyezhLCVmmTyXoxQeu/gaOSLF0Y128nzlMkGQI3hhj/B/IKg56PD0rzzlI73c IVyR+EgMN1nYHtB7qWX6TBL3uAE4BT+kzuZPshUL3D8SqpDpQRr4nM3iq8dyI+bTgrq2 dV82pev/vtQesJG9VirdiXPTRAu3DaxVvrAn3bdZ0afh8kv3hkGOPY3yE3Dp/tdyKnxp S1ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YGu7HS3q7vp4215UEX9eUXFM4TcIudbW7tcMBeFTMTk=; b=z7yLH+3kUyJudKJhwRXiAbZo+PjkAzBdjDeYVrSpNFSOAMQ6m9P6+IBquVd52xTtnF 1zMFgvTAl4cNQYrAUjtx7saTZmWvjmHZxDwpt2MSQyYuZc3mUOJ/cpZ01oEqzbm0Zzhk r01GEZWbkyopBP69InI1IpPEE9oRnIEpzEmyXeHc0OgfggZ6U+xAynE1xvzUshz/AnRW RmmyYkcQIeTwxlZbYeaoNseVxrX1GG9ZmtHVg2JV61SEsP0Jv6RXqtJiVFx0LZa0Bw0g m/eyQ6We4z/M7TdVhqh3BouMTbJehZU9I3VJrRiq+51EgnPRuLc6kebfc88xR0Lv426B 0dcg== X-Gm-Message-State: AOAM530QPwLIs9Ne42Cknu1sqV7uiuvCG7SJ6COKmFH7O/GtkVzLOrgd 3fOc93keEbYC6uZz64ezqtv8rBkFztGLEw== X-Google-Smtp-Source: ABdhPJyllzgtupSol7d1am+p/lwxqMzKKFuFG6BCrF9JhkWq+0Hc0Qlqw217LTXy6Qg0tWjQLwd2FQ== X-Received: by 2002:ac8:4248:: with SMTP id r8mr4091878qtm.288.1633189563563; Sat, 02 Oct 2021 08:46:03 -0700 (PDT) Received: from localhost ([167.100.64.199]) by smtp.gmail.com with ESMTPSA id v201sm4836651qkb.29.2021.10.02.08.46.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Oct 2021 08:46:03 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Cc: Sean Paul , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Fernando Ramos Subject: [PATCH 15/16] Revert "drm/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()" Date: Sat, 2 Oct 2021 11:45:41 -0400 Message-Id: <20211002154542.15800-15-sean@poorly.run> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20211002154542.15800-1-sean@poorly.run> References: <20211002154542.15800-1-sean@poorly.run> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sean Paul This reverts commit 399190e70816886e2bca1f3f3bc3d9c544af88e7. This patchset breaks on intel platforms and was previously NACK'd by Ville. Cc: Ville Syrjälä Cc: Fernando Ramos Signed-off-by: Sean Paul Acked-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 2bf01416d656..134a6acbd8fb 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -43,7 +43,6 @@ #include #include #include -#include #include "display/intel_audio.h" #include "display/intel_crt.h" @@ -13477,13 +13476,22 @@ void intel_display_resume(struct drm_device *dev) if (state) state->acquire_ctx = &ctx; - DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); + drm_modeset_acquire_init(&ctx, 0); - ret = __intel_display_resume(dev, state, &ctx); + while (1) { + ret = drm_modeset_lock_all_ctx(dev, &ctx); + if (ret != -EDEADLK) + break; - intel_enable_ipc(dev_priv); + drm_modeset_backoff(&ctx); + } + + if (!ret) + ret = __intel_display_resume(dev, state, &ctx); - DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); + intel_enable_ipc(dev_priv); + drm_modeset_drop_locks(&ctx); + drm_modeset_acquire_fini(&ctx); if (ret) drm_err(&dev_priv->drm,