From nobody Mon Feb 9 11:28:14 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39987C77B73 for ; Tue, 6 Jun 2023 14:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233302AbjFFOdj (ORCPT ); Tue, 6 Jun 2023 10:33:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233147AbjFFOdf (ORCPT ); Tue, 6 Jun 2023 10:33:35 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 263B11735 for ; Tue, 6 Jun 2023 07:33:20 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-30e407daab5so2591678f8f.0 for ; Tue, 06 Jun 2023 07:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686061998; x=1688653998; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=etnk6Bmfi+NsN3fMwvpGFNhakv5CYAq3q2C18ogo/QU=; b=r4mkCO7+F6PcaG6L5pBrXztZOCfvv1CoQeSFQeqwGopyq+CzI6qbgEWC9fduxPiiDh XtDOudYSaQOmT9xXbvpe5i2hAmAHMQs4lRIgF7PUe4jBfFxNVi2pSpYkKlRGMC9rFSxJ pJNj+4DrSg8ccP5n8R1teUhl3oAOJrlv/CWchMr3Ci7DzyCFvKTYsfp9/3dwz4mVfPXF GjZGe9iXmZWDii8Hk7qOo0dE4uC3SdnUvdpmAXQuKmbavca6BPxcvyZMjhAdRqb+KDJf lIQ3GWa+pfASHBYSLsxeZgq+e/FxNza4y3b088Upx0E/OnrlxgsJ8L0WlVovnl7HOVcs nJPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061998; x=1688653998; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=etnk6Bmfi+NsN3fMwvpGFNhakv5CYAq3q2C18ogo/QU=; b=OaI+8pN5gOWqVOjbnmAXcBDynUzc3jE4rsf29Nvmx8ikVFuaO+3hIXG0C3UteL5pD4 p1TOVX5FhS1fmkqtWwxD9D35HS2pZf4jZ32HOwPxS1z3ODXdexVQUpDvKfpVQEtfkspD d+G5K72Rca5ySL9efLuRf8TZk/ZVvEDsl7tVijwCGCVIlbG9C3d5Bl8zXwMwuChk7dIY VcVaJEL91l/y3Unk7z9o5Ui8+ed7CviHCsp9S8DcmaXmRfq1EYSjbVljYn6BbQCKgRTM QMjcUWUWXBFjqC4XF8BDTFGUkKN2l2M7oOn2MkPdcsEJecI6HStBGxdxHUJvWiRfCl2d ekAg== X-Gm-Message-State: AC+VfDzDaaclwhTUswtA+z3JdJmmNIxIG5EZGuu6brbsNHzAw6khlopz 3Csn7oCr8T6VrHGCG77wbI4= X-Google-Smtp-Source: ACHHUZ5KiIY5KwxOSxBzH2UQUnhP4/a60rnf7iCrHG1wFajmhi2f/DobS0/OOkSxpTE7+N6FDx414A== X-Received: by 2002:a5d:4bd0:0:b0:306:3945:65e9 with SMTP id l16-20020a5d4bd0000000b00306394565e9mr2211778wrt.3.1686061998296; Tue, 06 Jun 2023 07:33:18 -0700 (PDT) Received: from odroidc2.enunes.eu (ip-78-45-66-209.bb.vodafone.cz. [78.45.66.209]) by smtp.gmail.com with ESMTPSA id n16-20020a1c7210000000b003f736e28cd6sm8902642wmc.4.2023.06.06.07.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:33:17 -0700 (PDT) From: Erico Nunes To: yuq825@gmail.com, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org Cc: airlied@gmail.com, daniel@ffwll.ch, luben.tuikov@amd.com, christian.koenig@amd.com, linux-kernel@vger.kernel.org, Erico Nunes Subject: [PATCH] drm/lima: fix sched context destroy Date: Tue, 6 Jun 2023 16:32:47 +0200 Message-Id: <20230606143247.433018-1-nunes.erico@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Christian K=C3=B6nig Reviewed-by: Qiang Yu 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/lima_= 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 *pip= e, 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); } =20 struct dma_fence *lima_sched_context_queue_task(struct lima_sched_task *ta= sk) --=20 2.40.1