Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp999020pxy; Wed, 28 Apr 2021 19:52:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIfDqNLX/BrZmnszqYhYG/3idKoTLyms2TNZdMCuUqZ4oFt2TfXIkt4OISbsi5OkPtDsHa X-Received: by 2002:a65:6095:: with SMTP id t21mr29940069pgu.383.1619664722565; Wed, 28 Apr 2021 19:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619664722; cv=none; d=google.com; s=arc-20160816; b=egrdtnXTGgTUQM/guwPeYE/owO/yXQk6rQwQh6FnvhMASplXyzQUPMTRcbZ3GFo9hb oae7fcTcY4MgnM/gIHOmiLJ9ofTH3vI31n2zikWbuiFxr6U2Ovbw7KNRqGbmwq2q8dBb od8JKbgh2FUW0gmADSPPWzTO8SafALag94CPS3mvnrkcEbv11BYgyVAeDPS4jdX/7hDq 9LdCT47md06FCB1+ugG0FRv2OKKYmc6Ea4DpF7UP18tXilTZMbpwJM6XeV4hKShnRb2f mQDHPxWn/I6EMVYm0lvpexMQ1uk5QeLJaC29SIeNYUaUeQuArTg/Xe0N0UHAWc9pF5i6 S/jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vAQaxL3PPIsjuaXZq4jh3Wky598EwD41WSai3DcapXE=; b=AjdrO1xzkXBr5cqqmv60sftxVDGgrB++N5kYazhzPdExSl8nD35N4oEVPL/fED3HcB FJ63HOBEHJQDqtC0j0XOxU68BgC2W/Tn5l4GMS2f9EkZ1lYHCw7uc/dv9UnUl4A4Uoc5 37M2ELt0rglE3BbI5yNwNpUDjcLQlNVMeMy10JhPXm13zYIQOsp8+hKJ7kt63EOEyHsD vBs64XvVSogcr6eIDdp+pNmfy4RhTfxLt1fYcAJt1WfEvzLFsNLXJ3qbmb5rf5Ki8hfe G57savY3OGg+KzYY8eWhdGfiVX1ZWM4aJkI8/0Pp38eTU0dGX6rXViQ47Osho2ajpLkt 5skw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si1951932pln.196.2021.04.28.19.51.48; Wed, 28 Apr 2021 19:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231874AbhD2CwF (ORCPT + 99 others); Wed, 28 Apr 2021 22:52:05 -0400 Received: from mail-m121142.qiye.163.com ([115.236.121.142]:63170 "EHLO mail-m121142.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbhD2CwF (ORCPT ); Wed, 28 Apr 2021 22:52:05 -0400 X-Greylist: delayed 542 seconds by postgrey-1.27 at vger.kernel.org; Wed, 28 Apr 2021 22:52:04 EDT Received: from ubuntu.localdomain (unknown [36.152.145.181]) by mail-m121142.qiye.163.com (Hmail) with ESMTPA id B1253801C3; Thu, 29 Apr 2021 10:42:13 +0800 (CST) From: Bernard Zhao To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Bernard Zhao Subject: [PATCH] drm/i915: Use might_alloc() Date: Wed, 28 Apr 2021 19:42:11 -0700 Message-Id: <20210429024211.58245-1-bernard@vivo.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGUhISFZLSk5LGBpKSxpPSEJVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Okk6DAw6OT8QEkkyEktMCRA5 N00aFB1VSlVKTUpCTU1PSkhPSkxPVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlITVVK TklVSk9OVUpDSllXWQgBWUFJT0hINwY+ X-HM-Tid: 0a791b815ee5b037kuuub1253801c3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This maybe used lockdep through the fs_reclaim annotations. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/i915/i915_sw_fence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c index 2744558f3050..cc1b49cabb6c 100644 --- a/drivers/gpu/drm/i915/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/i915_sw_fence.c @@ -341,7 +341,7 @@ static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence, unsigned long flags; debug_fence_assert(fence); - might_sleep_if(gfpflags_allow_blocking(gfp)); + might_alloc(gfp); if (i915_sw_fence_done(signaler)) { i915_sw_fence_set_error_once(fence, signaler->error); @@ -477,7 +477,7 @@ int i915_sw_fence_await_dma_fence(struct i915_sw_fence *fence, int ret; debug_fence_assert(fence); - might_sleep_if(gfpflags_allow_blocking(gfp)); + might_alloc(gfp); if (dma_fence_is_signaled(dma)) { i915_sw_fence_set_error_once(fence, dma->error); @@ -576,7 +576,7 @@ int i915_sw_fence_await_reservation(struct i915_sw_fence *fence, int ret = 0, pending; debug_fence_assert(fence); - might_sleep_if(gfpflags_allow_blocking(gfp)); + might_alloc(gfp); if (write) { struct dma_fence **shared; -- 2.31.0