From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F058F4C74; Mon, 23 Jun 2025 22:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750716015; cv=none; b=YJMPHWDaujYhV0t7RTI2qq+/UZ1335HVMRB2NCTdSxdB5vEuLiJ+P0FLUS/GxNxO5leF32AavXYDYKele0alHEg1Ny8WA42/corkoTbl6sViI3g1Mlm1uZeX914rcMqlZXURu4A67WjtmwhcqnFyDJj7zhdLpk9vhHIGsbGhFno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750716015; c=relaxed/simple; bh=RYaDL+Yjgv0epGTuPPz7pCPlhz5M3nnXHbK2n9X2ULQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PZcWw0OMnCD4WKQ8o5JeFxpPi+gY7xtnx3tRyF1hUM8FmYJYrMP2RU0oFshfEPE0V3kaG59uPykGpqqul8YQOHAZHKj+GUXcLdUVJffFos8cbE4L+q4yckZFPdDROhdsHb+pm63gsQTg/RDYTCPJ6vNt79FZjbjLdh3YjybMI6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uXYGBYzj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uXYGBYzj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F762C4CEEA; Mon, 23 Jun 2025 22:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750716014; bh=RYaDL+Yjgv0epGTuPPz7pCPlhz5M3nnXHbK2n9X2ULQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uXYGBYzjD6Dv9V5uGBWA+io65RydzW39hwv4ZAZROdiOhT2HqVZfaEzrCczPixIIb PcBWHQr+AB+LIzMzOzm65hqon7qjgBwoT+dLzywDoTIw2yJcWt43t9XyMdv32z/Ifc 4BLLlaO6E8nDUXodGq/BTGpmREMCKaBR12GILt/0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Amber Lin , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 297/411] drm/amdkfd: Set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB Date: Mon, 23 Jun 2025 15:07:21 +0200 Message-ID: <20250623130641.125146802@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130632.993849527@linuxfoundation.org> References: <20250623130632.993849527@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Amber Lin [ Upstream commit ab9fcc6362e0699fc1150aa1d8503c40fce2c1e1 ] When submitting MQD to CP, set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB bit so it'll allow SDMA preemption if there is a massive command buffer of long-running SDMA commands. Signed-off-by: Amber Lin Acked-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c index ddaafcd7b8256..d3503072654f3 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c @@ -403,6 +403,10 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd, m->sdma_engine_id = q->sdma_engine_id; m->sdma_queue_id = q->sdma_queue_id; m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT; + /* Allow context switch so we don't cross-process starve with a massive + * command buffer of long-running SDMA commands + */ + m->sdmax_rlcx_ib_cntl |= SDMA0_GFX_IB_CNTL__SWITCH_INSIDE_IB_MASK; q->is_active = QUEUE_IS_ACTIVE(*q); } -- 2.39.5