Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp204473rwd; Tue, 6 Jun 2023 21:33:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4L7RltJneE1DvqyCrWvJTIudprclOts0g6HHJKnw1/mppbIu1ck6rGtv/wpbn72xI6agFS X-Received: by 2002:a92:cc4a:0:b0:33c:1e76:c405 with SMTP id t10-20020a92cc4a000000b0033c1e76c405mr5076084ilq.31.1686112416704; Tue, 06 Jun 2023 21:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686112416; cv=none; d=google.com; s=arc-20160816; b=M+WPBSY+A5VH7LMUx81p5phf0PMdaacO4jrxV6ghRX/rQmP3bJcfCkUFuaRElUS4As amiWDxIh7khgOwuj8dsu+Qget9hhqd9ABv7hueb2BE9VZXA4HJrrKiixXCdpQO19tJVX c95cPpLXMdP9GlBjhwXLB2+geCn4bINYjOXrN+A7a+vnfK9uMpzVO0UtaGSGDy682Cpb aW0tXmiDe5XB8BJdJWhGYycFG1d/Hvr0IcbRKHte/j6uZzk0uF3d/VsBu14e/vEyuHzI rS4BsvDyluA6AjiwYP0h5x/FOWdhTvNQzId0Ml8A8xgowVb/HUWVY9YaIhlF6QEULBBg gngQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=qzNnbIFGDmDkhEhmpSYKhx8HoFZP0+6TO7nVNkdhbGs=; b=gL8TB+LPnDAW0qoyFlSgwo8RTasbksz6K0F6RHo21UySQ8EGeKjweE5ZwZbw2Cq04S sGRjS5JVfRDvuj8BbUZ5V7iEPXQt4Jh7PD8R89NPFWbOjL2qmIT6v6DEvdQ5NYx5/wEp +DRLpD5JEW07pKEmWS2ZXlPN4uvGyCBXA5G4M4LNn06isrFp59jabxsGiQboZTC4pbBk omGu2jE+X1r25Anq5dDn6WtHdB5KujB/vTrvA++pmACkbShUhgJCmPSr5rYsD4fUY+SW wvha57OUq+USV1UUwnAEfbxeGtPxkT+ltWfHlss9IAP6tAfQ+vWFSK81LFSloEW5pR+S MF3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DGorRqZw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a625801000000b0063286f81d35si8006402pfb.262.2023.06.06.21.33.11; Tue, 06 Jun 2023 21:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DGorRqZw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234352AbjFGEE3 (ORCPT + 99 others); Wed, 7 Jun 2023 00:04:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbjFGEE1 (ORCPT ); Wed, 7 Jun 2023 00:04:27 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288AB19BA for ; Tue, 6 Jun 2023 21:04:26 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5149e65c244so529679a12.3 for ; Tue, 06 Jun 2023 21:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686110664; x=1688702664; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qzNnbIFGDmDkhEhmpSYKhx8HoFZP0+6TO7nVNkdhbGs=; b=DGorRqZwWzsyURJ0vJmgdsljto3aQ/liBDe0M0+XeQ32e0jF+iKKwSFavNF+/GzWdR AqPMHsti2uaQFhWvFJp/3A7DHw6zKW/wGqda1QLNqeWLYl131cQvA24YMiw6wFii3+ml TLqPDbOh8kbHRg4NiSxicWvTFt9h04PKEObAWNdK6Idh3stld0f/+u10FWXqvBrKUFxq LZCsTvtBypiyvL8BydDnRpYHZhar/uRCoeYA0j6bM6akxGIOPbBs3Jj9m9MJkUD44NqK /DBbL3tqDFNBskTR3mIPNJIFveEY9bdg7SlO0yL5teUJzaYI5p7FKHPDJ4AwiducYbDB NBrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686110664; x=1688702664; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qzNnbIFGDmDkhEhmpSYKhx8HoFZP0+6TO7nVNkdhbGs=; b=WiFz9QsafuYgCImr9szvTEVXCoq/5vu8xgtuYZPEbzFsmbeTjprDEtNvLthjhUKWOK 1UYK85/PneGcg9RqTCDIb1j6PNGqLfRvAmIyWqhEhr74KdzRuCbfuQKcC0ak0PgmmO6+ ogfCFfXaX96EDG83MVUdShrRSLANnEwcER+Kr8ypLAbOyEnCGk+EuGTphonMGCT5j6NK +npChqdrclHXsPvHpu650694VB9yoirhPE7nNVqEZomV1qzB8qyaDdOehu611+2I39R0 ytuzesdnlBkYeFIFDhwPqEyLmA1DZkBP9FFWPTKQ+W2CD1NmVCkCMdkf6x1meN3TqSSL makQ== X-Gm-Message-State: AC+VfDzDW99HTF2K8Y8mixFSaa+xGrae9HqUmFy3Q5NTmE6LxlhVnfDT FqIx8JL3ug3PLdpq04yyFPqyH8Ov8g6F6TTN+rs= X-Received: by 2002:a17:907:7e9e:b0:974:52e6:93cb with SMTP id qb30-20020a1709077e9e00b0097452e693cbmr5459688ejc.50.1686110664054; Tue, 06 Jun 2023 21:04:24 -0700 (PDT) MIME-Version: 1.0 References: <20230606143247.433018-1-nunes.erico@gmail.com> In-Reply-To: From: Qiang Yu Date: Wed, 7 Jun 2023 12:04:12 +0800 Message-ID: Subject: Re: [Lima] [PATCH] drm/lima: fix sched context destroy To: Vasily Khoruzhick Cc: Erico Nunes , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org, luben.tuikov@amd.com, daniel@ffwll.ch, airlied@gmail.com, christian.koenig@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Qiang Yu Applied to drm-misc-fixes. On Wed, Jun 7, 2023 at 9:18=E2=80=AFAM Vasily Khoruzhick wrote: > > On Tue, Jun 6, 2023 at 7:33=E2=80=AFAM Erico Nunes wrote: > > > > The drm sched entity must be flushed before finishing, to account for > > jobs potentially still in flight at that time. > > Lima did not do this flush until now, so switch the destroy call to the > > drm_sched_entity_destroy() wrapper which will take care of that. > > > > This fixes a regression on lima which started since the rework in > > commit 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini= ") > > where some specific types of applications may hang indefinitely. > > > > Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini= ") > > Signed-off-by: Erico Nunes > > Reviewed-by: Vasily Khoruzhick > > > --- > > drivers/gpu/drm/lima/lima_sched.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/l= ima_sched.c > > index ff003403fbbc..ffd91a5ee299 100644 > > --- a/drivers/gpu/drm/lima/lima_sched.c > > +++ b/drivers/gpu/drm/lima/lima_sched.c > > @@ -165,7 +165,7 @@ int lima_sched_context_init(struct lima_sched_pipe = *pipe, > > void lima_sched_context_fini(struct lima_sched_pipe *pipe, > > struct lima_sched_context *context) > > { > > - drm_sched_entity_fini(&context->base); > > + drm_sched_entity_destroy(&context->base); > > } > > > > struct dma_fence *lima_sched_context_queue_task(struct lima_sched_task= *task) > > -- > > 2.40.1 > >