From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.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 autolearn=ham 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 59B29C07E96 for ; Tue, 6 Jul 2021 09:14:45 +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 1A30461961 for ; Tue, 6 Jul 2021 09:14:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A30461961 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 7E22589D40; Tue, 6 Jul 2021 09:14:44 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8F6489D4B for ; Tue, 6 Jul 2021 09:14:43 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id p8so25221729wrr.1 for ; Tue, 06 Jul 2021 02:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=75TAy6lIhq9+7ZgnRMGd81syk1JNSvPfm9pffj8Q8NE=; b=W/oZKNuWYvwdqLSGJmCjf2UW6jBfH8vd+gthlYuS4Bl1b12+0rVA8/iVOnsmENkqVn LzU6wWjsOcRv2MgEqbV1DWwBoaasMpYy3yopzzggmuEA8M53zdm+1xVcXpmjnJjuowcX Axun3lmdtvEEDmbn+xT4db3cbt/GgcmbS45NM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=75TAy6lIhq9+7ZgnRMGd81syk1JNSvPfm9pffj8Q8NE=; b=uKrxBVAwAmUL6XLri96sPNzgCNlR416Lv3YNgIjIzzdvnjcxElpbiz3hG2HNGnFack xbl2zhqSs7i13i1fPXMq+t8FgAwnGAZTI5xuTTtJZD40mkOAEfPfatIb2bZeHMMqDq/y TMEQ9e5/QMu0yRbFBmTQXCqdLY4NXhJcAN6xSrUZUcaMDAh6J7Wdh2RrZwpgeEI/y00v QbWnjIuOBpcKgl7hbEvhLYnpC6l/6el/V7xxMAx7UQYyxJRpUpsk+9To8YcHbHSy/yOf kl5MAcBZJbfH1uoqvn5xRtyRt7raEjKcgf+BS89LPk6cDk9cw4dredDbvPv+PyXlGywZ 9qNg== X-Gm-Message-State: AOAM530KTENPA3WTiDE09HdbUQxdxkbEbDcLHouSmQxctqigMfqlQuwK PbRbM6jjBIBU8mme5e43M8suCQ== X-Google-Smtp-Source: ABdhPJyPJfD73lelLZCupcv2lSpGGamPRdcRZdZfHXLJ3m/DM2VFxA+/jlvKYAhz6hfJbDh58WJksg== X-Received: by 2002:a5d:5687:: with SMTP id f7mr21048115wrv.115.1625562882601; Tue, 06 Jul 2021 02:14:42 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u9sm16665971wmq.41.2021.07.06.02.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 02:14:42 -0700 (PDT) Date: Tue, 6 Jul 2021 11:14:39 +0200 From: Daniel Vetter To: Matthew Auld Subject: Re: [PATCH 2/2] drm/i915: prefer dma_fence_might_wait in wait_migration Message-ID: References: <20210706090559.1589544-1-matthew.auld@intel.com> <20210706090559.1589544-2-matthew.auld@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210706090559.1589544-2-matthew.auld@intel.com> X-Operating-System: Linux phenom 5.10.0-7-amd64 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 , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas =?iso-8859-1?Q?Hellstr=F6m?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jul 06, 2021 at 10:05:59AM +0100, Matthew Auld wrote: > dma_fence_might_wait is more interesting here, since it also teaches > lockdep about the fence critical section and wait_migration dependency. > > Suggested-by: Daniel Vetter > Signed-off-by: Matthew Auld > Cc: Thomas Hellström Reviewed-by: Daniel Vetter Ofc assuming nothing goes boom with lockdep :-) -Daniel > --- > drivers/gpu/drm/i915/gem/i915_gem_wait.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c > index f909aaa09d9c..190e221eaf81 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c > @@ -305,7 +305,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file) > int i915_gem_object_wait_migration(struct drm_i915_gem_object *obj, > unsigned int flags) > { > - might_sleep(); > + dma_fence_might_wait(); > /* NOP for now. */ > return 0; > } > -- > 2.26.3 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.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 autolearn=ham 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 8264DC07E9E for ; Tue, 6 Jul 2021 09:14:46 +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 4E1FA61961 for ; Tue, 6 Jul 2021 09:14:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E1FA61961 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEDE689D4B; Tue, 6 Jul 2021 09:14:44 +0000 (UTC) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2D9389D40 for ; Tue, 6 Jul 2021 09:14:43 +0000 (UTC) Received: by mail-wr1-x42d.google.com with SMTP id u8so25162969wrq.8 for ; Tue, 06 Jul 2021 02:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=75TAy6lIhq9+7ZgnRMGd81syk1JNSvPfm9pffj8Q8NE=; b=W/oZKNuWYvwdqLSGJmCjf2UW6jBfH8vd+gthlYuS4Bl1b12+0rVA8/iVOnsmENkqVn LzU6wWjsOcRv2MgEqbV1DWwBoaasMpYy3yopzzggmuEA8M53zdm+1xVcXpmjnJjuowcX Axun3lmdtvEEDmbn+xT4db3cbt/GgcmbS45NM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=75TAy6lIhq9+7ZgnRMGd81syk1JNSvPfm9pffj8Q8NE=; b=qrAtH6kgRaH0msg7FkC+c9OGhXj+H38B0+I3OTM39e7YXXOyh6elFdGJchIpBdz7L3 NjaMKrKQmCQ/WF5wmLCBI2VTbIZwypZVwLMGnLLzfGINgItlPlbcushbFzuYd4MLz7Dn hJhGsGScrw2sE3MDc2kfXkkARc2RPLdoYXU8B3NQpf4IVj3x/X4V9IdwCt8c7iU79oxl vK0WcSdneFQmMMwzuILo14w7wt+T5nkmIZ1lANqJMCl94ffEEiQ3E2G6fDqSqNgp4e9X iUm0SyvaUpVHARx0MdwWSdVSV+bLrP/ZPQ3cTUMJ5Uqh6ajuTuW6u/rZf3fWScE7z/Xx 26jQ== X-Gm-Message-State: AOAM532oA6R0KFijGtUY32CmezfKxvIx+VxIPUug+/CzxFK4vbTNakny b5CjvpEtJlqONBa3sQUHI14QXZFvj/bbXg== X-Google-Smtp-Source: ABdhPJyPJfD73lelLZCupcv2lSpGGamPRdcRZdZfHXLJ3m/DM2VFxA+/jlvKYAhz6hfJbDh58WJksg== X-Received: by 2002:a5d:5687:: with SMTP id f7mr21048115wrv.115.1625562882601; Tue, 06 Jul 2021 02:14:42 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u9sm16665971wmq.41.2021.07.06.02.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 02:14:42 -0700 (PDT) Date: Tue, 6 Jul 2021 11:14:39 +0200 From: Daniel Vetter To: Matthew Auld Message-ID: References: <20210706090559.1589544-1-matthew.auld@intel.com> <20210706090559.1589544-2-matthew.auld@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210706090559.1589544-2-matthew.auld@intel.com> X-Operating-System: Linux phenom 5.10.0-7-amd64 Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: prefer dma_fence_might_wait in wait_migration X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas =?iso-8859-1?Q?Hellstr=F6m?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, Jul 06, 2021 at 10:05:59AM +0100, Matthew Auld wrote: > dma_fence_might_wait is more interesting here, since it also teaches > lockdep about the fence critical section and wait_migration dependency. > = > Suggested-by: Daniel Vetter > Signed-off-by: Matthew Auld > Cc: Thomas Hellstr=F6m Reviewed-by: Daniel Vetter Ofc assuming nothing goes boom with lockdep :-) -Daniel > --- > drivers/gpu/drm/i915/gem/i915_gem_wait.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i= 915/gem/i915_gem_wait.c > index f909aaa09d9c..190e221eaf81 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c > @@ -305,7 +305,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *dat= a, struct drm_file *file) > int i915_gem_object_wait_migration(struct drm_i915_gem_object *obj, > unsigned int flags) > { > - might_sleep(); > + dma_fence_might_wait(); > /* NOP for now. */ > return 0; > } > -- = > 2.26.3 > = -- = Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx