From patchwork Wed Jun 2 16:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 12295313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAA8AC47083 for ; Wed, 2 Jun 2021 16:42:07 +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 A3064619BF for ; Wed, 2 Jun 2021 16:42:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3064619BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jlekstrand.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 134596ED12; Wed, 2 Jun 2021 16:42:02 +0000 (UTC) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4BD6C6ED0E for ; Wed, 2 Jun 2021 16:42:00 +0000 (UTC) Received: by mail-pf1-x42a.google.com with SMTP id t28so2611989pfg.10 for ; Wed, 02 Jun 2021 09:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jlekstrand-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gPVNq3xY6/pVhK42Qp957298GnOdq1x2LLqM9lPcSF0=; b=WwIZN77eYfoJ1K/hpdlXAfsBsosrcxsjt80seY3+/6dr7oWCnGj51ZBiJy2woMqt0C +8BJ2GHg+hJs8owJOO1RK3FyvbAnjwpmsAxzzS9InZP8e65RGM5pMTJ5VnDI93yx/6tX Nc4Yw/C6dYPdSU/dDxYD+tqgDTrAX+cE43hJGGQ/02vkv2+zwLemKDFEV7TNupN0txqk Xomz1eJ8T0MnOgpFjqXuqatz/OXsCRUCJzjvGKknUWG0h387SFc2N+/vueMreiMmzXVt LscFzQkInVvCrpP3aAEBmhPxNv8iEqsLmFe62VA9HIW6XUpha1PtAodV0fTkBsUcDvQI Wg5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gPVNq3xY6/pVhK42Qp957298GnOdq1x2LLqM9lPcSF0=; b=UlYseu5hUUwQyAw9S4c5eyNR1YuHA/UQ9dkvpan2+okj+9yqgfluxHLRcI7gKSZ9Yr YCCRI6kS1HCjp9Z4YL/i191zFAWVYW1jQQHDZNVOQY59KcTFbhOdyjGXvVzgmfQHEEOJ DWbSPUv5QFcK9WAJ3eSkooDSAPhzKQSfXyK99bez7OD2hmIbIplxRAXlRsLYu2v0cwlK LItwYWy8FXWLh5UryWa3ex1NwT0lf8NZ/R71RWYeZ4mIFjFSeQ+aVEH6JhpMtMV8Q/+6 aFyZLJFF2jTum0EDBa2sFZoLnqGM4vDG/Pn79QXzrB2OGAMMEdBQxC1mRY2yOOrM4Whq olfQ== X-Gm-Message-State: AOAM531l5Ojq3aXHpQgvqtKUgkdm55iSjxFJlI3CLIYVjHmybBIC5tVr DSXAyGI9lscHQqvzeyEDeafjPzoYaWTfWg== X-Google-Smtp-Source: ABdhPJxlqXWTNaqRa5erKgD5YGNKy4A/O7o19m2tpIvDsZcU/e33F551nOmmOZC0UVcLlzWTNFe8aA== X-Received: by 2002:a63:f344:: with SMTP id t4mr19286061pgj.314.1622652119744; Wed, 02 Jun 2021 09:41:59 -0700 (PDT) Received: from omlet.lan (jfdmzpr04-ext.jf.intel.com. [134.134.137.73]) by smtp.gmail.com with ESMTPSA id h6sm75803pjs.15.2021.06.02.09.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 09:41:59 -0700 (PDT) From: Jason Ekstrand To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Subject: [PATCH 4/5] Revert "drm/i915: Propagate errors on awaiting already signaled fences" Date: Wed, 2 Jun 2021 11:41:48 -0500 Message-Id: <20210602164149.391653-5-jason@jlekstrand.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210602164149.391653-1-jason@jlekstrand.net> References: <20210602164149.391653-1-jason@jlekstrand.net> 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: , Cc: Daniel Vetter , stable@vger.kernel.org, Jason Ekstrand , Jon Bloomfield , Jason Ekstrand , Marcin Slusarz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 9e31c1fe45d555a948ff66f1f0e3fe1f83ca63f7. Ever since that commit, we've been having issues where a hang in one client can propagate to another. In particular, a hang in an app can propagate to the X server which causes the whole desktop to lock up. Signed-off-by: Jason Ekstrand Reported-by: Marcin Slusarz Cc: # v5.6+ Cc: Jason Ekstrand Cc: Marcin Slusarz Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3080 Fixes: 9e31c1fe45d5 ("drm/i915: Propagate errors on awaiting already signaled fences") Signed-off-by: Daniel Vetter Reviewed-by: Jon Bloomfield --- drivers/gpu/drm/i915/i915_request.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 970d8f4986bbe..b796197c07722 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -1426,10 +1426,8 @@ i915_request_await_execution(struct i915_request *rq, do { fence = *child++; - if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) { - i915_sw_fence_set_error_once(&rq->submit, fence->error); + if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) continue; - } if (fence->context == rq->fence.context) continue; @@ -1527,10 +1525,8 @@ i915_request_await_dma_fence(struct i915_request *rq, struct dma_fence *fence) do { fence = *child++; - if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) { - i915_sw_fence_set_error_once(&rq->submit, fence->error); + if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) continue; - } /* * Requests on the same timeline are explicitly ordered, along